aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2006-05-02 14:42:30 +0000
committerJoseph Myers <joseph@codesourcery.com>2006-05-02 14:42:30 +0000
commitdf7849c593594e81b635dfe06b488e333fc9b2ab (patch)
treed6aa3f4edd235c52e3ca6ded87f8f821f4382151 /gas
parent2d545b822e56d78c142866649b797aa7e831a661 (diff)
downloadgdb-df7849c593594e81b635dfe06b488e333fc9b2ab.zip
gdb-df7849c593594e81b635dfe06b488e333fc9b2ab.tar.gz
gdb-df7849c593594e81b635dfe06b488e333fc9b2ab.tar.bz2
* 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. 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.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-arm.c2
-rw-r--r--gas/testsuite/ChangeLog7
-rw-r--r--gas/testsuite/gas/arm/iwmmxt-bad2.l4
-rw-r--r--gas/testsuite/gas/arm/iwmmxt-bad2.s4
-rw-r--r--gas/testsuite/gas/arm/iwmmxt.d4
-rw-r--r--gas/testsuite/gas/arm/iwmmxt.s4
7 files changed, 27 insertions, 5 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index cb329d0..016a286 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -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>
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 3b588ac..2e30f39 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -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:
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 52a1a5c..3abdfd0 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -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.
diff --git a/gas/testsuite/gas/arm/iwmmxt-bad2.l b/gas/testsuite/gas/arm/iwmmxt-bad2.l
index 3305bdf..1a43ebc 100644
--- a/gas/testsuite/gas/arm/iwmmxt-bad2.l
+++ b/gas/testsuite/gas/arm/iwmmxt-bad2.l
@@ -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
diff --git a/gas/testsuite/gas/arm/iwmmxt-bad2.s b/gas/testsuite/gas/arm/iwmmxt-bad2.s
index 1132e10..dc559a8 100644
--- a/gas/testsuite/gas/arm/iwmmxt-bad2.s
+++ b/gas/testsuite/gas/arm/iwmmxt-bad2.s
@@ -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]
diff --git a/gas/testsuite/gas/arm/iwmmxt.d b/gas/testsuite/gas/arm/iwmmxt.d
index 8565f52..494199d 100644
--- a/gas/testsuite/gas/arm/iwmmxt.d
+++ b/gas/testsuite/gas/arm/iwmmxt.d
@@ -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
diff --git a/gas/testsuite/gas/arm/iwmmxt.s b/gas/testsuite/gas/arm/iwmmxt.s
index ba599c1..0ebbad5 100644
--- a/gas/testsuite/gas/arm/iwmmxt.s
+++ b/gas/testsuite/gas/arm/iwmmxt.s
@@ -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