This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
Re: CGEN patch
- To: cgen at sources dot redhat dot com
- Subject: Re: CGEN patch
- From: Richard Sandiford <rsandifo at cambridge dot redhat dot com>
- Date: Wed, 3 Jan 2001 10:52:27 +0000 (GMT)
Oops, I missed one. Checked against fr30. Please check in if OK.
2001-01-03 Richard Sandiford <r.sandiford@redhat.com>
* cgen-dis.in (read_insn): Use bfd_get_bits()
Index: opcodes/cgen-dis.in
===================================================================
RCS file: /cvs/src/src/opcodes/cgen-dis.in,v
retrieving revision 1.3
diff -c -r1.3 cgen-dis.in
*** cgen-dis.in 2000/11/07 17:20:25 1.3
--- cgen-dis.in 2001/01/03 10:49:49
***************
*** 211,231 ****
ex_info->valid = (1 << buflen) - 1;
ex_info->insn_bytes = buf;
! switch (buflen)
! {
! case 1:
! *insn_value = buf[0];
! break;
! case 2:
! *insn_value = info->endian == BFD_ENDIAN_BIG ? bfd_getb16 (buf) : bfd_getl16 (buf);
! break;
! case 4:
! *insn_value = info->endian == BFD_ENDIAN_BIG ? bfd_getb32 (buf) : bfd_getl32 (buf);
! break;
! default:
! abort ();
! }
!
return 0;
}
--- 211,217 ----
ex_info->valid = (1 << buflen) - 1;
ex_info->insn_bytes = buf;
! *insn_value = bfd_get_bits (buf, buflen * 8, info->endian == BFD_ENDIAN_BIG);
return 0;
}