This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[ARM] PATCH: Fix offset range for WLDRD/WSTRD instruction


Hi

Assembling a compiler output file for iwmmxt target I stumbled over this error.
Error: co-processor offset out of range


Which turned out to be a problem in assembler. WLDRD instruction can have offsets ranging from -1023 to +1023
It was using a check between -255 to +255


I also modified the test case to include this case in the testsuite.

Is it ok?

Thanks

Khem


gas


2005-08-02 Khem Raj <kraj@mvista.com>

   * config/tc-arm.c (do_iwmmxt_wldstd): Correct the offset range
   for WLDRD/WSTRD instruction.

gas/testsuite

2005-08-02 Khem Raj <kraj@mvista.com>

   * gas/arm/iwmmxt.s: Change the offset value of WLDRD instruction
         to be larger than +/-255.
   * gas/arm/iwmmxt.d: Fix the expected results for WLDRD instruction


? diff
? bfd/doc/bfd.info
? binutils/doc/binutils.info
? gas/doc/as.info
? ld/ld.info
Index: gas/config/tc-arm.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-arm.c,v
retrieving revision 1.215
diff -u -r1.215 tc-arm.c
--- gas/config/tc-arm.c	29 Jul 2005 17:39:35 -0000	1.215
+++ gas/config/tc-arm.c	2 Aug 2005 23:47:38 -0000
@@ -5516,7 +5516,7 @@
 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, TRUE, 0);
 }
 
 static void
Index: gas/testsuite/gas/arm/iwmmxt.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/iwmmxt.d,v
retrieving revision 1.4
diff -u -r1.4 iwmmxt.d
--- gas/testsuite/gas/arm/iwmmxt.d	18 May 2005 05:40:09 -0000	1.4
+++ gas/testsuite/gas/arm/iwmmxt.d	2 Aug 2005 23:47:38 -0000
@@ -74,7 +74,7 @@
 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
Index: gas/testsuite/gas/arm/iwmmxt.s
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/iwmmxt.s,v
retrieving revision 1.3
diff -u -r1.3 iwmmxt.s
--- gas/testsuite/gas/arm/iwmmxt.s	18 May 2005 05:40:09 -0000	1.3
+++ gas/testsuite/gas/arm/iwmmxt.s	2 Aug 2005 23:47:38 -0000
@@ -88,7 +88,7 @@
 	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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]