aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog6
-rw-r--r--gas/testsuite/gas/mips/mips.exp2
-rw-r--r--gas/testsuite/gas/mips/relax-bposge.l5
-rw-r--r--gas/testsuite/gas/mips/relax-bposge.s12
4 files changed, 25 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 564e627..c3cb1e3 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,5 +1,11 @@
2011-02-28 Maciej W. Rozycki <macro@codesourcery.com>
+ * gas/mips/relax-bposge.l: New test for DSP branch relaxation.
+ * gas/mips/relax-bposge.s: Source for the new test.
+ * gas/mips/mips.exp: Run the new test.
+
+2011-02-28 Maciej W. Rozycki <macro@codesourcery.com>
+
* gas/mips/relax-at.d: New test for branch relaxation with .set
at.
* gas/mips/relax.s: Update to support the new test.
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index 67ee44c..3fc5b61 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -707,6 +707,8 @@ if { [istarget mips*-*-vxworks*] } {
run_dump_test "relax-swap1-mips1"
run_dump_test "relax-swap1-mips2"
run_dump_test "relax-swap2"
+ run_list_test_arches "relax-bposge" "-mdsp -relax-branch" \
+ [mips_arch_list_matching mips64r2]
run_list_test "illegal" "-32"
run_list_test "baddata1" "-32"
diff --git a/gas/testsuite/gas/mips/relax-bposge.l b/gas/testsuite/gas/mips/relax-bposge.l
new file mode 100644
index 0000000..ab3c846
--- /dev/null
+++ b/gas/testsuite/gas/mips/relax-bposge.l
@@ -0,0 +1,5 @@
+.*: Assembler messages:
+.*:6: Warning: Relaxed out-of-range branch into a jump
+.*:9: Warning: Relaxed out-of-range branch into a jump
+.*:7: Error: Branch out of range
+.*:8: Error: Branch out of range
diff --git a/gas/testsuite/gas/mips/relax-bposge.s b/gas/testsuite/gas/mips/relax-bposge.s
new file mode 100644
index 0000000..028ae05
--- /dev/null
+++ b/gas/testsuite/gas/mips/relax-bposge.s
@@ -0,0 +1,12 @@
+# Source file to test branch relaxation with the BPOSGE32 and BPOSGE64
+# instructions.
+
+ .text
+foo:
+ b bar
+ bposge32 bar
+ bposge64 bar
+ bal bar
+
+ .space 0x20000
+bar: