config/tc-arm.c (do_iwmmxt_wldstd): Correct the offset range for WLDRD/WSTRD
authorNick Clifton <nickc@redhat.com>
Wed, 3 Aug 2005 09:50:43 +0000 (09:50 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 3 Aug 2005 09:50:43 +0000 (09:50 +0000)
  instruction.
gas/arm/iwmmxt-bad2.s: New file: Check for error messages about erroneous
  offsets in iwmmxt instructions.  Cannot be part of iwmmxt-bad.s because
  the errors there stop the assembler before it gets to check the offsets
  in instructions.
gas/arm/iwmmxt-bad2.d: New file.
gas/arm/iwmmxt-bad2.l: New file: Expected error messages.
gas/arm/iwmmxt.s: Change the offset values of the WLDRD, WSTRD and WSTRW
  instructions to be larger than +/-255.
gas/arm/iwmmxt.d: Fix the expected results for these instructions.

gas/ChangeLog
gas/config/tc-arm.c
gas/testsuite/ChangeLog
gas/testsuite/gas/arm/iwmmxt-bad2.d [new file with mode: 0644]
gas/testsuite/gas/arm/iwmmxt-bad2.l [new file with mode: 0644]
gas/testsuite/gas/arm/iwmmxt-bad2.s [new file with mode: 0644]
gas/testsuite/gas/arm/iwmmxt.d
gas/testsuite/gas/arm/iwmmxt.s

index e4ff266bf25d80f83f1a16310f727d97fe11bb0e..ac2b865211bedc56537ec38fccf5ee944c6b27de 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-02  Khem Raj  <kraj@mvista.com>
+
+       * config/tc-arm.c (do_iwmmxt_wldstd): Correct the offset range for
+       WLDRD/WSTRD instruction.
+
 2005-08-02  Alan Modra  <amodra@bigpond.net.au>
 
        * config/tc-ppc.c (md_apply_fix <ELF>): Don't warn on overflow
index 754bc4c395838df5f7f3f6c96c5bbea33f3aebf8..4033836765c4bfc4c0fffb8511998b6cd5645a5d 100644 (file)
@@ -5516,7 +5516,7 @@ static void
 do_iwmmxt_wldstd (void)
 {
   inst.instruction |= inst.operands[0].reg << 12;
-  encode_arm_cp_address (1, TRUE, FALSE, BFD_RELOC_ARM_CP_OFF_IMM_S2);
+  encode_arm_cp_address (1, TRUE, FALSE, 0);
 }
 
 static void
index 579441cb9c2786efc179ec05302ff924dfcf210a..2eabaf6c287b0c086f208f643b0e6f57e4b31b93 100644 (file)
@@ -1,3 +1,19 @@
+2005-08-03  Nick Clifton  <nickc@redhat.com>
+
+       * gas/arm/iwmmxt-bad2.s: New file: Check for error messages about
+       erroneous offsets in iwmmxt instructions.  Cannot be part of
+       iwmmxt-bad.s because the errors there stop the assembler before it
+       gets to check the offsets in instructions.
+       * gas/arm/iwmmxt-bad2.d: New file.
+       * gas/arm/iwmmxt-bad2.l: New file: Expected error messages.
+
+2005-08-02  Khem Raj  <kraj@mvista.com>
+
+       * gas/arm/iwmmxt.s: Change the offset values of the WLDRD, WSTRD
+       and WSTRW instructions to be larger than +/-255.
+       * gas/arm/iwmmxt.d: Fix the expected results for these
+       instructions.
+
 2005-07-29  Paul Brook  <paul@codesourcery.com>
 
        * gas/arm/thumb32.d: Fix expected output for writeback addressing
diff --git a/gas/testsuite/gas/arm/iwmmxt-bad2.d b/gas/testsuite/gas/arm/iwmmxt-bad2.d
new file mode 100644 (file)
index 0000000..c8587a4
--- /dev/null
@@ -0,0 +1,3 @@
+#name: iWMMXt CoProcessor offset errors
+#as: -mcpu=iwmmxt
+#error-output: iwmmxt-bad2.l
diff --git a/gas/testsuite/gas/arm/iwmmxt-bad2.l b/gas/testsuite/gas/arm/iwmmxt-bad2.l
new file mode 100644 (file)
index 0000000..3305bdf
--- /dev/null
@@ -0,0 +1,3 @@
+[^:]*: Assembler messages:
+[^:]*:1: Error: co-processor offset out of range
+[^:]*:2: Error: co-processor offset out of range
diff --git a/gas/testsuite/gas/arm/iwmmxt-bad2.s b/gas/testsuite/gas/arm/iwmmxt-bad2.s
new file mode 100644 (file)
index 0000000..1132e10
--- /dev/null
@@ -0,0 +1,2 @@
+       wldrd   wr1, [r0, #3]
+        wstrd   wr1, [r0, #0x400]
index f7d81ec281523e78c574a8149c16533b06980a3b..8565f528ad009f7683cfe18ca0922acbdee8c202 100644 (file)
@@ -74,7 +74,7 @@ Disassembly of section .text:
 0+108 <[^>]*> ed901024[        ]+wldrb[        ]+wr1, \[r0, #36\]
 0+10c <[^>]*> 0df12018[        ]+wldrheq[      ]+wr2, \[r1, #24\]!
 0+110 <[^>]*> 1cb23104[        ]+wldrwne[      ]+wr3, \[r2\], #16
-0+114 <[^>]*> 6dd34102[        ]+wldrdvs[      ]+wr4, \[r3, #8\]
+0+114 <[^>]*> 6d534153[        ]+wldrdvs[      ]+wr4, \[r3, #-332\]
 0+118 <[^>]*> fdb12105[        ]+wldrw[        ]+wcssf, \[r1, #20\]!
 0+11c <[^>]*> ee474109[        ]+wmacu[        ]+wr4, wr7, wr9
 0+120 <[^>]*> 2e6a810e[        ]+wmacscs[      ]+wr8, wr10, wr14
@@ -138,8 +138,8 @@ Disassembly of section .text:
 0+208 <[^>]*> ed811004[        ]+wstrb[        ]+wr1, \[r1, #4\]
 0+20c <[^>]*> ede11004[        ]+wstrh[        ]+wr1, \[r1, #4\]!
 0+210 <[^>]*> eca11101[        ]+wstrw[        ]+wr1, \[r1\], #4
-0+214 <[^>]*> edc11101[        ]+wstrd[        ]+wr1, \[r1, #4\]
-0+218 <[^>]*> fca13101[        ]+wstrw[        ]+wcasf, \[r1\], #4
+0+214 <[^>]*> edc111ff[        ]+wstrd[        ]+wr1, \[r1, #1020\]
+0+218 <[^>]*> fca1314b[        ]+wstrw[        ]+wcasf, \[r1\], #300
 0+21c <[^>]*> 3e1311ae[        ]+wsubbuscc[    ]+wr1, wr3, wr14
 0+220 <[^>]*> ee5311ae[        ]+wsubhus[      ]+wr1, wr3, wr14
 0+224 <[^>]*> 3e9311ae[        ]+wsubwuscc[    ]+wr1, wr3, wr14
index 5cf155137252a3d7a883bf2dcd54ae9c5bcc69c4..ba599c1046f5a3e847dfb86335e5b97dcb800a89 100644 (file)
@@ -88,7 +88,7 @@ iwmmxt:
        wldrb           wr1, [r0, #36]
        wldrheq         wr2, [r1, #24]!
        wldrwne         wr3, [r2], #16
-       wldrdvs         wr4, [r3, #8]
+       wldrdvs         wr4, [r3, #-332]
        wldrw           wcssf, [r1, #20]!
        
        wmacu           wr4, wr7, wr9
@@ -167,8 +167,8 @@ iwmmxt:
        wstrb           wr1, [r1, #4]
        wstrh           wr1, [r1, #4]!
        wstrw           wr1, [r1], #4
-       wstrd           wr1, [r1, #4]
-       wstrw           wcasf, [r1], #4
+       wstrd           wr1, [r1, #0x3FC]
+       wstrw           wcasf, [r1], #300
 
        wsubbusul       wr1, wr3, wr14
        wsubhus         wr1, wr3, wr14