diff options
author | Paul Brook <paul@codesourcery.com> | 2011-05-31 14:10:07 +0000 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2011-05-31 14:10:07 +0000 |
commit | b58843019a8b7cb79ea5335498bb06c1d59d5d03 (patch) | |
tree | 8c0423bee413248a4e75c1cbd3485a2178f46f5e /gas/testsuite | |
parent | 63e1a0fcbacd4cee2d74a2f31c84bce7807e5e77 (diff) | |
download | gdb-b58843019a8b7cb79ea5335498bb06c1d59d5d03.zip gdb-b58843019a8b7cb79ea5335498bb06c1d59d5d03.tar.gz gdb-b58843019a8b7cb79ea5335498bb06c1d59d5d03.tar.bz2 |
2011-05-31 Paul Brook <paul@codesourcery.com>
gas/
* config/tc-arm.c (arm_force_relocation): Resolve all pc-relative
loads.
gas/testsuite/
* gas/arm/ldr-global.d: New test.
* gas/arm/ldr-global.s: New test.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/ldr-global.d | 14 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/ldr-global.s | 22 |
3 files changed, 41 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 859bcbe..81fe89b 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2011-05-31 Paul Brook <paul@codesourcery.com> + * gas/arm/ldr-global.d: New test. + * gas/arm/ldr-global.s: New test. + +2011-05-31 Paul Brook <paul@codesourcery.com> + * arm/t2-branch-global.d: New test. * arm/t2-branch-global.s: New test. diff --git a/gas/testsuite/gas/arm/ldr-global.d b/gas/testsuite/gas/arm/ldr-global.d new file mode 100644 index 0000000..3528d4e --- /dev/null +++ b/gas/testsuite/gas/arm/ldr-global.d @@ -0,0 +1,14 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: PC-relative LDR from global + +.*: +file format .*arm.* + +Disassembly of section .text: +0+00 <[^>]*> e59f0010 ? ldr r0, \[pc, #16\] ; 0+18 <[^>]*> +0+04 <[^>]*> e1df00fc ? ldrsh r0, \[pc, #12\] ; 0+18 <[^>]*> +0+08 <[^>]*> ed9f0a02 ? vldr s0, \[pc, #8\] ; 0+18 <[^>]*> +0+0c <[^>]*> 4802 ? ldr r0, \[pc, #8\] ; \(0+18 <[^>]*>\) +0+0e <[^>]*> 4802 ? ldr r0, \[pc, #8\] ; \(0+18 <[^>]*>\) +0+10 <[^>]*> ed9f 0a01 ? vldr s0, \[pc, #4\] ; 0+18 <[^>]*> +0+14 <[^>]*> f8df 0000 ? ldr\.w r0, \[pc\] ; 0+18 <[^>]*> +#... diff --git a/gas/testsuite/gas/arm/ldr-global.s b/gas/testsuite/gas/arm/ldr-global.s new file mode 100644 index 0000000..ef3960c --- /dev/null +++ b/gas/testsuite/gas/arm/ldr-global.s @@ -0,0 +1,22 @@ +@ Test pc-relative loads from global objects defined in the same text segment. +@ See tc-arm.c:arm_force_relocation. +.arch armv7-a +.fpu vfp +.syntax unified +.text +foo_arm: + ldr r0, bar + ldrsh r0, bar + vldr s0, bar +.thumb +foo_thumb: + ldr r0, bar + ldr.n r0, bar + vldr s0, bar + ldr.w r0, bar + +.align 2 +.globl bar +bar: + .word 42 + |