diff options
author | Julian Brown <julian@codesourcery.com> | 2012-11-28 16:53:01 +0000 |
---|---|---|
committer | Julian Brown <julian@codesourcery.com> | 2012-11-28 16:53:01 +0000 |
commit | d406f3e430b5a156b943895791f2d081e78c8194 (patch) | |
tree | edf2785b15c2370ff2b1d168e0cde28e2bbe6b73 /gas/testsuite | |
parent | 945bf7131824a5af68e72be4f29b04d20010b83b (diff) | |
download | gdb-d406f3e430b5a156b943895791f2d081e78c8194.zip gdb-d406f3e430b5a156b943895791f2d081e78c8194.tar.gz gdb-d406f3e430b5a156b943895791f2d081e78c8194.tar.bz2 |
gas/
* config/tc-arm.c (md_apply_fix): Fix conversion of BL to BLX for
local targets in Thumb mode.
gas/testsuite/
* gas/arm/bl-local-2.s: New test.
* gas/arm/bl-local-2.d: New.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/bl-local-2.d | 21 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/bl-local-2.s | 41 |
3 files changed, 67 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 17374f5..d95504e 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-11-28 Julian Brown <julian@codesourcery.com> + + * gas/arm/bl-local-2.s: New test. + * gas/arm/bl-local-2.d: New. + 2012-11-27 Roland McGrath <mcgrathr@google.com> * lib/gas-defs.exp (run_dump_test): If as options include diff --git a/gas/testsuite/gas/arm/bl-local-2.d b/gas/testsuite/gas/arm/bl-local-2.d new file mode 100644 index 0000000..da7a49b --- /dev/null +++ b/gas/testsuite/gas/arm/bl-local-2.d @@ -0,0 +1,21 @@ +#name: bl local conversion to blx +#objdump: -drw --prefix-addresses --show-raw-insn +#as: + + +.*: file format .* + + +Disassembly of section \.text: +0+00 <[^>]+> e12fff1e bx lr +0+04 <[^>]+> 46c0 nop ; \(mov r8, r8\) +0+06 <[^>]+> f7ff effc blx 0+ <myfunction> +0+0a <[^>]+> 46c0 nop ; \(mov r8, r8\) +0+0c <[^>]+> f7ff eff8 blx 0+ <myfunction> +0+10 <[^>]+> 46c0 nop ; \(mov r8, r8\) +0+12 <[^>]+> f7ff eff6 blx 0+ <myfunction> +0+16 <[^>]+> 46c0 nop ; \(mov r8, r8\) +0+18 <[^>]+> f7ff eff2 blx 0+ <myfunction> +0+1c <[^>]+> 4770 bx lr +0+1e <[^>]+> 46c0 nop ; \(mov r8, r8\) +0+20 <[^>]+> fafffffd blx 0000001c <mythumbfunction> diff --git a/gas/testsuite/gas/arm/bl-local-2.s b/gas/testsuite/gas/arm/bl-local-2.s new file mode 100644 index 0000000..d79c5ed --- /dev/null +++ b/gas/testsuite/gas/arm/bl-local-2.s @@ -0,0 +1,41 @@ + .arch armv5te + + .text + .align 2 + .code 32 + .type myfunction, %function +myfunction: + bx r14 + + .text + .align 2 + .code 16 + .thumb_func + .global caller + .type caller, %function +caller: + nop + bl myfunction + nop + bl myfunction + nop + bl myfunction + nop + bl myfunction + + .text + .align 2 + .code 16 + .type mythumbfunction, %function + .thumb_func +mythumbfunction: + bx r14 + + .text + .align 2 + .code 32 + .global armcaller + .type armcaller, %function +armcaller: + bl mythumbfunction + |