]> sourceware.org Git - cgen.git/commitdiff
2004-02-10 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.dot.com>
authorBen Elliston <bje@air.not.au>
Fri, 13 Feb 2004 02:55:15 +0000 (02:55 +0000)
committerBen Elliston <bje@air.not.au>
Fri, 13 Feb 2004 02:55:15 +0000 (02:55 +0000)
* cpu/m32r.opc (my_print_insn): Fixed incorrect output when
disassembling codes for 0x*2 addresses.

ChangeLog
cpu/m32r.opc

index c4e8aad2ee28f7e0de388f6a76001dae25cdcc62..9f8cb7fbebd6cc11f9f2894ffb25acb707987a7b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-10  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.dot.com>
+
+       * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
+       disassembling codes for 0x*2 addresses.
+
 2004-01-29  Dave Brolley  <brolley@redhat.com>
 
        * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
index ac87da3a5940d17772588327bda1f291fa0dad1a..2a3ac4477945fc9f458e359a4a89bb37d2e3f650 100644 (file)
@@ -273,7 +273,8 @@ my_print_insn (cd, pc, info)
 
   /* Read the base part of the insn.  */
 
-  status = (*info->read_memory_func) (pc, buf, buflen, info);
+  status = (*info->read_memory_func) (pc - ((!big_p && (pc & 3) != 0) ? 2 : 0),
+                                      buf, buflen, info);
   if (status != 0)
     {
       (*info->memory_error_func) (status, pc, info);
@@ -286,13 +287,13 @@ my_print_insn (cd, pc, info)
     return print_insn (cd, pc, info, buf, buflen);
 
   /* Print the first insn.  */
-  buf += (big_p ? 0 : 2);
   if ((pc & 3) == 0)
     {
+      buf += (big_p ? 0 : 2);
       if (print_insn (cd, pc, info, buf, 2) == 0)
        (*info->fprintf_func) (info->stream, UNKNOWN_INSN_MSG);
+      buf += (big_p ? 2 : -2);
     }
-  buf += (big_p ? 2 : -2);
 
   x = (big_p ? &buf[0] : &buf[1]);
   if (*x & 0x80)
This page took 0.032477 seconds and 5 git commands to generate.