diff options
author | Ramana Radhakrishnan <ramana.r@gmail.com> | 2009-05-05 11:41:32 +0000 |
---|---|---|
committer | Ramana Radhakrishnan <ramana.r@gmail.com> | 2009-05-05 11:41:32 +0000 |
commit | 267bf99505c8522ff9e10ec56c195deb533da338 (patch) | |
tree | adbf93eacd361f3d3d7308525148afbfbfb88d6b /gas/testsuite | |
parent | 84f1b567bb140a51db3dd7032e34707ffe7974d2 (diff) | |
download | gdb-267bf99505c8522ff9e10ec56c195deb533da338.zip gdb-267bf99505c8522ff9e10ec56c195deb533da338.tar.gz gdb-267bf99505c8522ff9e10ec56c195deb533da338.tar.bz2 |
Fix local branches for bl and blx.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 12 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/bl-local-v4t.d | 19 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/bl-local-v4t.s | 25 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/blx-local-thumb.l | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/blx-local.d | 32 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/blx-local.l | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/blx-local.s | 46 |
7 files changed, 118 insertions, 21 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index e7a526c..b25a40a 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,15 @@ +2009-05-05 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> + + * gas\arm\bl-local-v4t.d: New file. + * gas\arm\bl-local-v4t.s: New file. + * gas\arm\blx-local.s: Update for branches and calls to local + functions. + * gas\arm\blx-local.d: Likewise. + * gas\arm\blx-local.l: New file. + * gas\arm\blx-local-thumb.l: New file. + * gas\arm\blx-local-thumb.s: New file. + * gas\arm\blx-local-thumb.d: New file. + 2009-05-01 Nathan Sidwell <nathan@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com> diff --git a/gas/testsuite/gas/arm/bl-local-v4t.d b/gas/testsuite/gas/arm/bl-local-v4t.d new file mode 100644 index 0000000..b5af7fd --- /dev/null +++ b/gas/testsuite/gas/arm/bl-local-v4t.d @@ -0,0 +1,19 @@ +#name: bl local instructions for v4t. +#objdump: -drw --prefix-addresses --show-raw-insn +#skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* +#as: +# stderr: blx-local-thumb.l + +.*: +file format .*arm.* +Disassembly of section .text: +0+00 <[^>]*> f7ff fffe bl 00+18 <[^>]*> 0: R_ARM_THM_CALL foo2 +0+1c <[^>]*> d004 beq.n 00+28 <[^>]*> +0+1e <[^>]*> e003 b.n 00+28 <[^>]*> +0+20 <[^>]*> f000 f808 bl 00+34 <[^>]*> +0+24 <[^>]*> f000 f802 bl 00+2c <[^>]*> +0+28 <[^>]*> 46c0 nop \(mov r8, r8\) +0+2a <[^>]*> 46c0 nop \(mov r8, r8\) +0+2c <[^>]*> 46c0 nop \(mov r8, r8\) + ... +0+30 <[^>]*> e1a00000 nop \(mov r0,r0\) +0+34 <[^>]*> e1a00000 nop \(mov r0,r0\)
\ No newline at end of file diff --git a/gas/testsuite/gas/arm/bl-local-v4t.s b/gas/testsuite/gas/arm/bl-local-v4t.s new file mode 100644 index 0000000..4935344 --- /dev/null +++ b/gas/testsuite/gas/arm/bl-local-v4t.s @@ -0,0 +1,25 @@ + .text + .arch armv4t + .syntax unified + .thumb +one: + bl foo2 @ bl foo2 with reloc. + beq foo @ beq foo with reloc. + b foo @ branch foo with reloc. + bl fooundefarm + bl fooundefthumb + .thumb + .type foo, %function + .thumb_func +foo: + nop + nop +fooundefthumb: + nop + .type foo2, %function + .arm + .align 2 +foo2: + nop +fooundefarm: + nop diff --git a/gas/testsuite/gas/arm/blx-local-thumb.l b/gas/testsuite/gas/arm/blx-local-thumb.l new file mode 100644 index 0000000..588674c --- /dev/null +++ b/gas/testsuite/gas/arm/blx-local-thumb.l @@ -0,0 +1,2 @@ +[^;]*: Assembler messages: +[^;]*:6: Warning: blx to Thumb func 'foo' from Thumb ISA state changed to bl
\ No newline at end of file diff --git a/gas/testsuite/gas/arm/blx-local.d b/gas/testsuite/gas/arm/blx-local.d index e187536..4b7d53a 100644 --- a/gas/testsuite/gas/arm/blx-local.d +++ b/gas/testsuite/gas/arm/blx-local.d @@ -1,15 +1,29 @@ #name: Local BLX instructions -#objdump: -dr --prefix-addresses --show-raw-insn +#objdump: -drw --prefix-addresses --show-raw-insn #skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* #as: - -# Test assembler resolution of blx instructions. - +# stderr: blx-local.l +# Test assembler resolution of blx and bl instructions in ARM mode. .*: +file format .*arm.* Disassembly of section .text: - -0+00 <[^>]*> fa000000 blx 00+8 <foo> -0+04 <[^>]*> fbffffff blx 00+a <foo2> -0+08 <[^>]*> 46c0 nop \(mov r8, r8\) -0+0a <[^>]*> 46c0 nop \(mov r8, r8\) +0+00 <[^>]*> fa000006 blx 00000020 <foo> +0+04 <[^>]*> eb000007 bl 00000028 <foo2> +0+08 <[^>]*> fa000004 blx 00000020 <foo> +0+0c <[^>]*> eb000005 bl 00000028 <foo2> +0+10 <[^>]*> fa00000b blx 00000044 <fooundefarm> +0+14 <[^>]*> eb00000a bl 00000044 <fooundefarm> +0+18 <[^>]*> fa000001 blx 00000024 <fooundefthumb> +0+1c <[^>]*> eb000000 bl 00000024 <fooundefthumb> +0+20 <[^>]*> 46c0 nop \(mov r8, r8\) +0+22 <[^>]*> 46c0 nop \(mov r8, r8\) +0+24 <[^>]*> 46c0 nop \(mov r8, r8\) +0+26 <[^>]*> 46c0 nop \(mov r8, r8\) +0+28 <[^>]*> 0bfffffd bleq 00000024 <fooundefthumb> +0+2c <[^>]*> 0afffffc beq 00000024 <fooundefthumb> +0+30 <[^>]*> eafffffb b 00000024 <fooundefthumb> +0+34 <[^>]*> 0bfffffe bleq 00000020 <foo> 34: R_ARM_JUMP24 foo +0+58 <[^>]*> 0afffffe beq 00000020 <foo> 38: R_ARM_JUMP24 foo +0+5c <[^>]*> eafffffe b 00000020 <foo> 3c: R_ARM_JUMP24 foo +0+60 <[^>]*> e1a00000 nop \(mov r0,r0\) +0+64 <[^>]*> e1a00000 nop \(mov r0,r0\) diff --git a/gas/testsuite/gas/arm/blx-local.l b/gas/testsuite/gas/arm/blx-local.l new file mode 100644 index 0000000..fcca464 --- /dev/null +++ b/gas/testsuite/gas/arm/blx-local.l @@ -0,0 +1,3 @@ +[^;]*: Assembler messages: +[^;]*:9: Warning: blx to 'foo2' an ARM ISA state function changed to bl + diff --git a/gas/testsuite/gas/arm/blx-local.s b/gas/testsuite/gas/arm/blx-local.s index c85a562..ed587c9 100644 --- a/gas/testsuite/gas/arm/blx-local.s +++ b/gas/testsuite/gas/arm/blx-local.s @@ -1,16 +1,38 @@ - .text - .arch armv5t - .arm -one: - blx foo - blx foo2 +# objdump: -fdrw --prefix-addresses --show-raw-insn +# not-target: *-*-*aout* *-*-pe - .thumb - .type foo, %function - .thumb_func + .text + .arch armv5t + .arm +one: + blx foo + blx foo2 + bl foo + bl foo2 + blx fooundefarm + bl fooundefarm + blx fooundefthumb + bl fooundefthumb + + .thumb + .type foo, %function + .thumb_func foo: - nop + nop + nop +fooundefthumb: + nop + + .align 2 .type foo2, %function - .thumb_func + .arm foo2: - nop + bleq fooundefthumb @no relocs + beq fooundefthumb @no relocs + b fooundefthumb @no relocs + bleq foo @ R_ARM_PCREL_JUMP + beq foo @ R_ARM_PCREL_JUMP + b foo @ R_ARM_PCREL_JUMP + nop +fooundefarm: + nop |