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]
Other format: [Raw text]

[PATCH] objdump target msp430


Hi!

disassembly for this target have a bug:

echo "add &0x200, &0x172" > test.s
msp430-gcc -c test.s
objdump -D test.o:

[...]
   0: 92 52 00 02  rla &0x0200  ;
   4: 72 01 
[...]

insted of:

[...]
   0: 92 52 00 02  add &0x0200,&0x0172 ;0x0200
   4: 72 01 
[...]


There is simple patch:


*** binutils-031223/opcodes/msp430-dis.c.org Mon Dec 30 20:25:14 2002
--- binutils-031223/opcodes/msp430-dis.c Tue Dec 23 12:52:14 2003
***************
*** 490,496 ****
--- 490,499 ----
     else if (regd == 2)
       {
         /* Absolute.  */
+        short src;
+        src = msp430dis_opcode (addr + 4, info);
         dst = msp430dis_opcode (addr + 2, info);
+        if (src != dst) return 0;
         cmd_len += 4;
         *cycles = 6;
         sprintf (op1, "&0x%04x", PS (dst));


Albert


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