2005-07-21 Paul Brook <paul@codesourcery.com>
authorPaul Brook <paul@codesourcery.com>
Thu, 21 Jul 2005 13:11:28 +0000 (13:11 +0000)
committerPaul Brook <paul@codesourcery.com>
Thu, 21 Jul 2005 13:11:28 +0000 (13:11 +0000)
gas/
* config/tc-arm.c (encode_thumb32_addr_mode): Don't set
inst.reloc.pc_rel.
gas/testsuite/
* gas/arm/thumb32.s: Add tests for [pc, #imm] addressing modes.
* gas/arm/thumb32.d: Ditto.

gas/ChangeLog
gas/config/tc-arm.c
gas/testsuite/ChangeLog
gas/testsuite/gas/arm/thumb32.d
gas/testsuite/gas/arm/thumb32.s

index a81af5398687f45cc172870331d9cd0f6be1ff32..453ae6fdc62f293449d8aea440da7da1edfc6b95 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-21  Paul Brook  <paul@codesourcery.com>
+
+       * config/tc-arm.c (encode_thumb32_addr_mode): Don't set
+       inst.reloc.pc_rel.
+
 2005-07-20  Tavis Ormandy <taviso@gentoo.org>
 
        * messages.c: Use vsnprintf instead of vsprintf.
index dfdf7b554ff608127eee94f58a5d41973cbab0c5..0c9911f767289cb23b6f9fe47b6dc1709e7d8fd6 100644 (file)
@@ -5667,7 +5667,6 @@ encode_thumb32_addr_mode (int i, bfd_boolean is_t, bfd_boolean is_d)
            inst.instruction |= 0x00000100;
        }
       inst.reloc.type = BFD_RELOC_ARM_T32_OFFSET_IMM;
-      inst.reloc.pc_rel = is_pc;
     }
   else if (inst.operands[i].postind)
     {
index c8176e468d9ea8389b39bef282e2bc34ddc12297..a4f02c793a2def780c8a96cff8416158900efc5a 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-21  Paul Brook  <paul@codesourcery.com>
+
+       * gas/arm/thumb32.s: Add tests for [pc, #imm] addressing modes.
+       * gas/arm/thumb32.d: Ditto.
+
 2005-07-20  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
 
        * gas/m32r/rel32.exp: New file. 
index eec016289f3e5cf06562741123f41dee259dd8c8..a74253e0d703a40111e4ba827a1f681044d87285 100644 (file)
@@ -991,3 +991,23 @@ Disassembly of section .text:
 0+ca4 <[^>]+> fa52 f183        uxtab   r1, r2, r3
 0+ca8 <[^>]+> fa32 f183        uxtab16 r1, r2, r3
 0+cac <[^>]+> fa12 f183        uxtah   r1, r2, r3
+0+cb0 <[^>]+> f89f 12aa        ldrb\.w r1, \[pc, #682\]        ; 0+f5e <[^>]+>
+0+cb4 <[^>]+> f89f 1155        ldrb\.w r1, \[pc, #341\]        ; 0+e0d <[^>]+>
+0+cb8 <[^>]+> f81f 12aa        ldrb\.w r1, \[pc, #-682\]       ; 0+a12 <[^>]+>
+0+cbc <[^>]+> f81f 1155        ldrb\.w r1, \[pc, #-341\]       ; 0+b6b <[^>]+>
+0+cc0 <[^>]+> f99f 12aa        ldrsb\.w        r1, \[pc, #682\]        ; 0+f6e <[^>]+>
+0+cc4 <[^>]+> f99f 1155        ldrsb\.w        r1, \[pc, #341\]        ; 0+e1d <[^>]+>
+0+cc8 <[^>]+> f91f 12aa        ldrsb\.w        r1, \[pc, #-682\]       ; 0+a22 <[^>]+>
+0+ccc <[^>]+> f91f 1155        ldrsb\.w        r1, \[pc, #-341\]       ; 0+b7b <[^>]+>
+0+cd0 <[^>]+> f8bf 12aa        ldrh\.w r1, \[pc, #682\]        ; 0+f7e <[^>]+>
+0+cd4 <[^>]+> f8bf 1155        ldrh\.w r1, \[pc, #341\]        ; 0+e2d <[^>]+>
+0+cd8 <[^>]+> f83f 12aa        ldrh\.w r1, \[pc, #-682\]       ; 0+a32 <[^>]+>
+0+cdc <[^>]+> f83f 1155        ldrh\.w r1, \[pc, #-341\]       ; 0+b8b <[^>]+>
+0+ce0 <[^>]+> f9bf 12aa        ldrsh\.w        r1, \[pc, #682\]        ; 0+f8e <[^>]+>
+0+ce4 <[^>]+> f9bf 1155        ldrsh\.w        r1, \[pc, #341\]        ; 0+e3d <[^>]+>
+0+ce8 <[^>]+> f93f 12aa        ldrsh\.w        r1, \[pc, #-682\]       ; 0+a42 <[^>]+>
+0+cec <[^>]+> f93f 1155        ldrsh\.w        r1, \[pc, #-341\]       ; 0+b9b <[^>]+>
+0+cf0 <[^>]+> f8df 12aa        ldr\.w  r1, \[pc, #682\]        ; 0+f9e <[^>]+>
+0+cf4 <[^>]+> f8df 1155        ldr\.w  r1, \[pc, #341\]        ; 0+e4d <[^>]+>
+0+cf8 <[^>]+> f85f 12aa        ldr\.w  r1, \[pc, #-682\]       ; 0+a52 <[^>]+>
+0+cfc <[^>]+> f85f 1155        ldr\.w  r1, \[pc, #-341\]       ; 0+bab <[^>]+>
index 7db255aab160ce7b1333bcdfe580db7b96a7b7f5..4baf4ff24c1ddad8b10806792787c855884ba7a1 100644 (file)
@@ -733,3 +733,15 @@ xta:
        uxtab   r1, r2, r3
        uxtab16 r1, r2, r3
        uxtah   r1, r2, r3
+
+       .macro  ldpcimm op
+       \op     r1, [pc, #0x2aa]
+       \op     r1, [pc, #0x155]
+       \op     r1, [pc, #-0x2aa]
+       \op     r1, [pc, #-0x155]
+       .endm
+       ldpcimm ldrb
+       ldpcimm ldrsb
+       ldpcimm ldrh
+       ldpcimm ldrsh
+       ldpcimm ldr