diff options
author | obrien <obrien@FreeBSD.org> | 2001-11-01 09:24:29 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2001-11-01 09:24:29 +0000 |
commit | 14771d6bc7b7b3d565489864e6dfa8ecc3940fc5 (patch) | |
tree | f6b7f87e74b800b8b30b12aa6cb092434d708ac4 /contrib/binutils/opcodes/cgen-dis.c | |
parent | 7734e00828d1a0cbfe8bad4005c310db5ae83187 (diff) | |
download | FreeBSD-src-14771d6bc7b7b3d565489864e6dfa8ecc3940fc5.zip FreeBSD-src-14771d6bc7b7b3d565489864e6dfa8ecc3940fc5.tar.gz |
Halloween import of Binutils from the FSF 2.11 branch.
This fixes some IA-64 related bugs.
Diffstat (limited to 'contrib/binutils/opcodes/cgen-dis.c')
-rw-r--r-- | contrib/binutils/opcodes/cgen-dis.c | 55 |
1 files changed, 11 insertions, 44 deletions
diff --git a/contrib/binutils/opcodes/cgen-dis.c b/contrib/binutils/opcodes/cgen-dis.c index 78b1cd9..b4297bb 100644 --- a/contrib/binutils/opcodes/cgen-dis.c +++ b/contrib/binutils/opcodes/cgen-dis.c @@ -1,6 +1,7 @@ /* CGEN generic disassembler support code. - Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001 + Free Software Foundation, Inc. This file is part of the GNU Binutils and GDB, the GNU debugger. @@ -43,7 +44,7 @@ hash_insn_array (cd, insns, count, entsize, htable, hentbuf) CGEN_CPU_DESC cd; const CGEN_INSN * insns; int count; - int entsize; + int entsize ATTRIBUTE_UNUSED; CGEN_INSN_LIST ** htable; CGEN_INSN_LIST * hentbuf; { @@ -64,27 +65,10 @@ hash_insn_array (cd, insns, count, entsize, htable, hentbuf) to hash on, so set both up. */ value = CGEN_INSN_BASE_VALUE (insn); - switch (CGEN_INSN_MASK_BITSIZE (insn)) - { - case 8: - buf[0] = value; - break; - case 16: - if (big_p) - bfd_putb16 ((bfd_vma) value, buf); - else - bfd_putl16 ((bfd_vma) value, buf); - break; - case 32: - if (big_p) - bfd_putb32 ((bfd_vma) value, buf); - else - bfd_putl32 ((bfd_vma) value, buf); - break; - default: - abort (); - } - + bfd_put_bits ((bfd_vma) value, + buf, + CGEN_INSN_MASK_BITSIZE (insn), + big_p); hash = (* cd->dis_hash) (buf, value); hentbuf->next = htable[hash]; hentbuf->insn = insn; @@ -121,27 +105,10 @@ hash_insn_list (cd, insns, htable, hentbuf) to hash on, so set both up. */ value = CGEN_INSN_BASE_VALUE (ilist->insn); - switch (CGEN_INSN_MASK_BITSIZE (ilist->insn)) - { - case 8: - buf[0] = value; - break; - case 16: - if (big_p) - bfd_putb16 ((bfd_vma) value, buf); - else - bfd_putl16 ((bfd_vma) value, buf); - break; - case 32: - if (big_p) - bfd_putb32 ((bfd_vma) value, buf); - else - bfd_putl32 ((bfd_vma) value, buf); - break; - default: - abort (); - } - + bfd_put_bits((bfd_vma) value, + buf, + CGEN_INSN_MASK_BITSIZE (ilist->insn), + big_p); hash = (* cd->dis_hash) (buf, value); hentbuf->next = htable [hash]; hentbuf->insn = ilist->insn; |