* config/tc-m32c.c (md_convert_frag): Fix ADJNZ reloc math.
authorDJ Delorie <dj@redhat.com>
Tue, 25 Nov 2008 23:02:02 +0000 (23:02 +0000)
committerDJ Delorie <dj@redhat.com>
Tue, 25 Nov 2008 23:02:02 +0000 (23:02 +0000)
gas/ChangeLog
gas/config/tc-m32c.c

index b36db8e1dcb15aff0fc7d4b01e1079e25ad0346b..b78e7bf075cbacdb0e584d9e238eff625d54a7cd 100644 (file)
@@ -1,3 +1,7 @@
+2008-11-25  DJ Delorie  <dj@redhat.com>
+
+       * config/tc-m32c.c (md_convert_frag): Fix ADJNZ reloc math.
+
 2008-11-21  Sterling Augustine  <sterling@tensilica.com>
 
        * config/tc-xtensa.c (check_t1_t2_reads_and_writes): Call
index db9cc06849b2ebde90a10a416c26c0442e5ee7a8..ec0a80c7b0ada3e7b781ed30ea4be583c8e261ed 100644 (file)
@@ -866,22 +866,22 @@ md_convert_frag (bfd *   abfd ATTRIBUTE_UNUSED,
 
     case -M32C_MACRO_ADJNZ_2:
       rl_addend = 0x31;
-      op[2] = addend;
+      op[2] = addend - 2;
       operand = M32C_OPERAND_LAB_16_8;
       break;
     case -M32C_MACRO_ADJNZ_3:
       rl_addend = 0x41;
-      op[3] = addend;
+      op[3] = addend - 2;
       operand = M32C_OPERAND_LAB_24_8;
       break;
     case -M32C_MACRO_ADJNZ_4:
       rl_addend = 0x51;
-      op[4] = addend;
+      op[4] = addend - 2;
       operand = M32C_OPERAND_LAB_32_8;
       break;
     case -M32C_MACRO_ADJNZ_5:
       rl_addend = 0x61;
-      op[5] = addend;
+      op[5] = addend - 2;
       operand = M32C_OPERAND_LAB_40_8;
       break;