diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-05-29 13:18:59 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-05-29 13:18:59 +0000 |
commit | c699f0877959d373f7c0fc03ce517ffba3cfac03 (patch) | |
tree | 939ec461b7207c90b55433bbead2dd5dcdfa9a69 /gas/testsuite | |
parent | 3ba20bde7e5976625515b62ba462f7bf2dbf8b23 (diff) | |
download | gdb-c699f0877959d373f7c0fc03ce517ffba3cfac03.zip gdb-c699f0877959d373f7c0fc03ce517ffba3cfac03.tar.gz gdb-c699f0877959d373f7c0fc03ce517ffba3cfac03.tar.bz2 |
gas/
2007-05-29 David S. Miller <davem@davemloft.net>
Jakub Jelinek <jakub@redhat.com>
PR gas/4558
* config/tc-sparc.c (md_apply_fix): Fix relocation overflow checks
for BFD_RELOC_SPARC_WDISP16 and BFD_RELOC_SPARC_WDISP19.
gas/testsuite/
2007-05-29 Jakub Jelinek <jakub@redhat.com>
PR gas/4558
* gas/sparc/sparc.exp: Add v9branch{1,2,3,4,5} tests.
* gas/sparc/v9branch1.d: New test.
* gas/sparc/v9branch1.s: New.
* gas/sparc/v9branch2.d: New test.
* gas/sparc/v9branch2.s: New.
* gas/sparc/v9branch3.d: New test.
* gas/sparc/v9branch3.s: New.
* gas/sparc/v9branch4.d: New test.
* gas/sparc/v9branch4.s: New.
* gas/sparc/v9branch5.d: New test.
* gas/sparc/v9branch5.s: New.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 15 | ||||
-rw-r--r-- | gas/testsuite/gas/sparc/sparc.exp | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/sparc/v9branch1.d | 23 | ||||
-rw-r--r-- | gas/testsuite/gas/sparc/v9branch1.s | 18 | ||||
-rw-r--r-- | gas/testsuite/gas/sparc/v9branch2.d | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/sparc/v9branch2.s | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/sparc/v9branch3.d | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/sparc/v9branch3.s | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/sparc/v9branch4.d | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/sparc/v9branch4.s | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/sparc/v9branch5.d | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/sparc/v9branch5.s | 6 |
12 files changed, 99 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index e5404a0..e3a93e0 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,18 @@ +2007-05-29 Jakub Jelinek <jakub@redhat.com> + + PR gas/4558 + * gas/sparc/sparc.exp: Add v9branch{1,2,3,4,5} tests. + * gas/sparc/v9branch1.d: New test. + * gas/sparc/v9branch1.s: New. + * gas/sparc/v9branch2.d: New test. + * gas/sparc/v9branch2.s: New. + * gas/sparc/v9branch3.d: New test. + * gas/sparc/v9branch3.s: New. + * gas/sparc/v9branch4.d: New test. + * gas/sparc/v9branch4.s: New. + * gas/sparc/v9branch5.d: New test. + * gas/sparc/v9branch5.s: New. + 2007-03-25 Paul Brook <paul@codesourcery.com> * gas/arm/thumb32.s: Add tests for subs pc, lr. diff --git a/gas/testsuite/gas/sparc/sparc.exp b/gas/testsuite/gas/sparc/sparc.exp index a2e362d..60ca24f 100644 --- a/gas/testsuite/gas/sparc/sparc.exp +++ b/gas/testsuite/gas/sparc/sparc.exp @@ -48,6 +48,11 @@ if [istarget sparc*-*-*] { run_dump_test "pcrel64" run_dump_test "plt64" } + run_dump_test "v9branch1" + run_dump_test "v9branch2" + run_dump_test "v9branch3" + run_dump_test "v9branch4" + run_dump_test "v9branch5" } if [istarget sparc-*-vxworks*] { diff --git a/gas/testsuite/gas/sparc/v9branch1.d b/gas/testsuite/gas/sparc/v9branch1.d new file mode 100644 index 0000000..c2c05e4 --- /dev/null +++ b/gas/testsuite/gas/sparc/v9branch1.d @@ -0,0 +1,23 @@ +#as: -Av9 +#objdump: -dr --prefix-addresses +#name: v9branch1 + +.*: +file format .*sparc.* + +Disassembly of section .text: +0x0+000000 brz %o0, 0x0+01fffc +0x0+000004 nop + ... +0x0+01fff8 nop +0x0+01fffc nop + ... +0x0+03fffc brz %o0, 0x0+01fffc +0x0+040000 nop +0x0+040004 bne %icc, 0x0+140000 +0x0+040008 nop + ... +0x0+13fffc nop +0x0+140000 nop + ... +0x0+240000 bne %icc, 0x0+140000 +0x0+240004 nop diff --git a/gas/testsuite/gas/sparc/v9branch1.s b/gas/testsuite/gas/sparc/v9branch1.s new file mode 100644 index 0000000..15c4a6a --- /dev/null +++ b/gas/testsuite/gas/sparc/v9branch1.s @@ -0,0 +1,18 @@ + # Check if maximum possible branch distances for v9 branches are accepted + .text + brz,pt %o0, 1f + nop + .skip (128 * 1024 - 16) + nop +1: nop + .skip (128 * 1024 - 4) + brz,pt %o0, 1b + nop + bne,pt %icc, 2f + nop + .skip (1024 * 1024 - 16) + nop +2: nop + .skip (1024 * 1024 - 4) + bne,pt %icc, 2b + nop diff --git a/gas/testsuite/gas/sparc/v9branch2.d b/gas/testsuite/gas/sparc/v9branch2.d new file mode 100644 index 0000000..dcad03b --- /dev/null +++ b/gas/testsuite/gas/sparc/v9branch2.d @@ -0,0 +1,3 @@ +#as: -Av9 +#name: v9branch2 +#error: :3:.*relocation.*overflow diff --git a/gas/testsuite/gas/sparc/v9branch2.s b/gas/testsuite/gas/sparc/v9branch2.s new file mode 100644 index 0000000..6048a82 --- /dev/null +++ b/gas/testsuite/gas/sparc/v9branch2.s @@ -0,0 +1,7 @@ + # Text for relocation overflow diagnostic + .text + brz,pt %o0, 1f + nop + .skip (128 * 1024 - 12) + nop +1: nop diff --git a/gas/testsuite/gas/sparc/v9branch3.d b/gas/testsuite/gas/sparc/v9branch3.d new file mode 100644 index 0000000..f8105fd --- /dev/null +++ b/gas/testsuite/gas/sparc/v9branch3.d @@ -0,0 +1,3 @@ +#as: -Av9 +#name: v9branch3 +#error: :5:.*relocation.*overflow diff --git a/gas/testsuite/gas/sparc/v9branch3.s b/gas/testsuite/gas/sparc/v9branch3.s new file mode 100644 index 0000000..6bcfea0 --- /dev/null +++ b/gas/testsuite/gas/sparc/v9branch3.s @@ -0,0 +1,6 @@ + # Text for relocation overflow diagnostic + .text +1: nop + .skip (128 * 1024) + brz,pt %o0, 1b + nop diff --git a/gas/testsuite/gas/sparc/v9branch4.d b/gas/testsuite/gas/sparc/v9branch4.d new file mode 100644 index 0000000..4379388 --- /dev/null +++ b/gas/testsuite/gas/sparc/v9branch4.d @@ -0,0 +1,3 @@ +#as: -Av9 +#name: v9branch4 +#error: :3:.*relocation.*overflow diff --git a/gas/testsuite/gas/sparc/v9branch4.s b/gas/testsuite/gas/sparc/v9branch4.s new file mode 100644 index 0000000..bf2306f --- /dev/null +++ b/gas/testsuite/gas/sparc/v9branch4.s @@ -0,0 +1,7 @@ + # Text for relocation overflow diagnostic + .text + bne,pt %icc, 1f + nop + .skip (1024 * 1024 - 12) + nop +1: nop diff --git a/gas/testsuite/gas/sparc/v9branch5.d b/gas/testsuite/gas/sparc/v9branch5.d new file mode 100644 index 0000000..937a3ea --- /dev/null +++ b/gas/testsuite/gas/sparc/v9branch5.d @@ -0,0 +1,3 @@ +#as: -Av9 +#name: v9branch5 +#error: :5:.*relocation.*overflow diff --git a/gas/testsuite/gas/sparc/v9branch5.s b/gas/testsuite/gas/sparc/v9branch5.s new file mode 100644 index 0000000..733aa2a --- /dev/null +++ b/gas/testsuite/gas/sparc/v9branch5.s @@ -0,0 +1,6 @@ + # Text for relocation overflow diagnostic + .text +1: nop + .skip (1024 * 1024) + bne,pt %icc, 1b + nop |