This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

cgen-dis.in patch


Hi,

I would like to commit the following patch.  It fixes some disassembly
problems for instructions that are longer than 32 bits.  I've tested it
on a handful of ports and it doesn't cause any regressions.  If anyone
is going to object, please do so quickly as this is a bit urgent.

Thanks,

John
Index: opcodes/cgen-dis.in
===================================================================
RCS file: /cvs/src/src/opcodes/cgen-dis.in,v
retrieving revision 1.11
diff -c -3 -p -r1.11 cgen-dis.in
*** cgen-dis.in	2001/07/12 02:32:25	1.11
--- cgen-dis.in	2001/10/05 20:12:53
*************** print_insn (cd, pc, info, buf, buflen)
*** 232,240 ****
    CGEN_INSN_INT insn_value;
    const CGEN_INSN_LIST *insn_list;
    CGEN_EXTRACT_INFO ex_info;
  
    /* Extract base part of instruction, just in case CGEN_DIS_* uses it. */
!   insn_value = cgen_get_insn_value (cd, buf, buflen * 8);
  
    /* Fill in ex_info fields like read_insn would.  Don't actually call
       read_insn, since the incoming buffer is already read (and possibly
--- 232,244 ----
    CGEN_INSN_INT insn_value;
    const CGEN_INSN_LIST *insn_list;
    CGEN_EXTRACT_INFO ex_info;
+   int basesize;
  
    /* Extract base part of instruction, just in case CGEN_DIS_* uses it. */
!   basesize = cd->base_insn_bitsize < buflen * 8 ?
!                                      cd->base_insn_bitsize : buflen * 8;
!   insn_value = cgen_get_insn_value (cd, buf, basesize);
! 
  
    /* Fill in ex_info fields like read_insn would.  Don't actually call
       read_insn, since the incoming buffer is already read (and possibly

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]