]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* config/tc-arm.c (do_iwmmxt_wldstbh): Don't multiply offset by 4
authorJoseph Myers <joseph@codesourcery.com>
Tue, 2 May 2006 14:42:30 +0000 (14:42 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 2 May 2006 14:42:30 +0000 (14:42 +0000)
here.
(md_apply_fix3): Multiply offset by 4 here for
BFD_RELOC_ARM_CP_OFF_IMM_S2 and BFD_RELOC_ARM_T32_CP_OFF_IMM_S2.

testsuite:
* gas/arm/iwmmxt.s: Increase offsets for wstrb and wstrh.
* gas/arm/iwmmxt.d: Update expected results.
* gas/arm/iwmmxt-bad2.s: Test wstrb, wstrh, wldrb and wldrh.
* gas/arm/iwmmxt-bad2.l: Update expected error messages.

gas/ChangeLog
gas/config/tc-arm.c
gas/testsuite/ChangeLog
gas/testsuite/gas/arm/iwmmxt-bad2.l
gas/testsuite/gas/arm/iwmmxt-bad2.s
gas/testsuite/gas/arm/iwmmxt.d
gas/testsuite/gas/arm/iwmmxt.s

index cb329d0baa17501e002cb9ea6292595dca10d8f7..016a286d2e3d0ede422044dc2c6a24b203391b5e 100644 (file)
@@ -1,3 +1,10 @@
+2006-05-02  Joseph Myers  <joseph@codesourcery.com>
+
+       * config/tc-arm.c (do_iwmmxt_wldstbh): Don't multiply offset by 4
+       here.
+       (md_apply_fix3): Multiply offset by 4 here for
+       BFD_RELOC_ARM_CP_OFF_IMM_S2 and BFD_RELOC_ARM_T32_CP_OFF_IMM_S2.
+
 2006-05-02  H.J. Lu  <hongjiu.lu@intel.com>
            Jan Beulich  <jbeulich@novell.com>
 
index 3b588ace9bb6ac3ed6280a1be7ec01ec9c13a08f..2e30f3910d2e143951f17e82265c6b3898b9001a 100644 (file)
@@ -7187,7 +7187,6 @@ do_iwmmxt_wldstbh (void)
 {
   int reloc;
   inst.instruction |= inst.operands[0].reg << 12;
-  inst.reloc.exp.X_add_number *= 4;
   if (thumb_mode)
     reloc = BFD_RELOC_ARM_T32_CP_OFF_IMM_S2;
   else
@@ -16500,6 +16499,7 @@ md_apply_fix (fixS *    fixP,
       if (value < -255 || value > 255)
        as_bad_where (fixP->fx_file, fixP->fx_line,
                      _("co-processor offset out of range"));
+      value *= 4;
       goto cp_off_common;
 
     case BFD_RELOC_ARM_THUMB_OFFSET:
index 52a1a5c2946381787f98df43aaccafeecb48760f..3abdfd0f4bbade6f47f51bfcb498e858763a08d7 100644 (file)
@@ -1,3 +1,10 @@
+2006-05-02  Joseph Myers  <joseph@codesourcery.com>
+
+       * gas/arm/iwmmxt.s: Increase offsets for wstrb and wstrh.
+       * gas/arm/iwmmxt.d: Update expected results.
+       * gas/arm/iwmmxt-bad2.s: Test wstrb, wstrh, wldrb and wldrh.
+       * gas/arm/iwmmxt-bad2.l: Update expected error messages.
+
 2006-04-29  H.J. Lu  <hongjiu.lu@intel.com>
 
        * gas/i386/fp.d: New file.
index 3305bdf57e0a0e8a65fcdbee52d6cadbe11842c3..1a43ebcdfbcda0f9f0a955f4a040c667b6f21a53 100644 (file)
@@ -1,3 +1,7 @@
 [^:]*: Assembler messages:
 [^:]*:1: Error: co-processor offset out of range
 [^:]*:2: Error: co-processor offset out of range
+[^:]*:3: Error: co-processor offset out of range
+[^:]*:4: Error: co-processor offset out of range
+[^:]*:5: Error: co-processor offset out of range
+[^:]*:6: Error: co-processor offset out of range
index 1132e10f7db094067e930aa9da961d602589cbc8..dc559a8927f66455df1bb305f7318f5800360bc2 100644 (file)
@@ -1,2 +1,6 @@
        wldrd   wr1, [r0, #3]
         wstrd   wr1, [r0, #0x400]
+        wstrb   wr1, [r0, #0x100]
+        wstrh   wr1, [r0, #0x100]
+        wldrb   wr1, [r0, #-0x100]
+        wldrh   wr1, [r0, #-0x100]
index 8565f528ad009f7683cfe18ca0922acbdee8c202..494199d2bc458b36e5c18c10248b5cb4183e7538 100644 (file)
@@ -135,8 +135,8 @@ Disassembly of section .text:
 0+1fc <[^>]*> ee65114b[        ]+wsrlhg[       ]+wr1, wr5, wcgr3
 0+200 <[^>]*> 4ea51148[        ]+wsrlwgmi[     ]+wr1, wr5, wcgr0
 0+204 <[^>]*> eee51149[        ]+wsrldg[       ]+wr1, wr5, wcgr1
-0+208 <[^>]*> ed811004[        ]+wstrb[        ]+wr1, \[r1, #4\]
-0+20c <[^>]*> ede11004[        ]+wstrh[        ]+wr1, \[r1, #4\]!
+0+208 <[^>]*> ed8110ff[        ]+wstrb[        ]+wr1, \[r1, #255\]
+0+20c <[^>]*> ed6110ff[        ]+wstrh[        ]+wr1, \[r1, #-255\]!
 0+210 <[^>]*> eca11101[        ]+wstrw[        ]+wr1, \[r1\], #4
 0+214 <[^>]*> edc111ff[        ]+wstrd[        ]+wr1, \[r1, #1020\]
 0+218 <[^>]*> fca1314b[        ]+wstrw[        ]+wcasf, \[r1\], #300
index ba599c1046f5a3e847dfb86335e5b97dcb800a89..0ebbad5cd3c7d8b3db47a15db748bf3a4272519e 100644 (file)
@@ -164,8 +164,8 @@ iwmmxt:
        wsrlwgmi        wr1, wr5, wcgr0
        wsrldg          wr1, wr5, wcgr1
 
-       wstrb           wr1, [r1, #4]
-       wstrh           wr1, [r1, #4]!
+       wstrb           wr1, [r1, #0xFF]
+       wstrh           wr1, [r1, #-0xFF]!
        wstrw           wr1, [r1], #4
        wstrd           wr1, [r1, #0x3FC]
        wstrw           wcasf, [r1], #300