aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2013-06-10 18:15:48 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2013-06-10 18:15:48 +0000
commit3bf0dbfb154a3c24d65536f355a0a0af4c959d17 (patch)
tree417a6fcfce7869bd8563f159188d10ea7c114eb2 /gas/testsuite
parent10bf68945eed880597eb96c2749adadadee1af8f (diff)
downloadgdb-3bf0dbfb154a3c24d65536f355a0a0af4c959d17.zip
gdb-3bf0dbfb154a3c24d65536f355a0a0af4c959d17.tar.gz
gdb-3bf0dbfb154a3c24d65536f355a0a0af4c959d17.tar.bz2
gas/
* config/tc-mips.c (append_insn): Don't do branch relaxation for MIPS-3D instructions either. (md_convert_frag): Update the COPx branch mask accordingly. * config/tc-mips.c (md_show_usage): Document --[no-]relax-branch option. * doc/as.texinfo (Overview): Add --relax-branch and --no-relax-branch. * doc/c-mips.texi (MIPS Opts): Document --relax-branch and --no-relax-branch. gas/testsuite/ * gas/mips/relax-bc1any.l: New test. * gas/mips/relax-bc1any.s: New test source. * gas/mips/mips.exp: Run the new test.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog6
-rw-r--r--gas/testsuite/gas/mips/mips.exp3
-rw-r--r--gas/testsuite/gas/mips/relax-bc1any.l7
-rw-r--r--gas/testsuite/gas/mips/relax-bc1any.s14
4 files changed, 30 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 72a20ec..ec9aff7 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2013-06-10 Maciej W. Rozycki <macro@codesourcery.com>
+
+ * gas/mips/relax-bc1any.l: New test.
+ * gas/mips/relax-bc1any.s: New test source.
+ * gas/mips/mips.exp: Run the new test.
+
2013-06-09 Sandra Loosemore <sandra@codesourcery.com>
* gas/nios2/trap.s: Add additional test cases for optional
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index 95e9da7..cf79727 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -842,6 +842,9 @@ if { [istarget mips*-*-vxworks*] } {
run_dump_test "relax-swap1-mips2"
run_dump_test "relax-swap2"
run_dump_test_arches "relax-swap3" [mips_arch_list_all]
+ run_list_test_arches "relax-bc1any" "-mips3d -relax-branch" \
+ [mips_arch_list_matching mips64 \
+ !micromips]
run_list_test_arches "relax-bposge" "-mdsp -relax-branch" \
[mips_arch_list_matching mips64r2 \
!micromips]
diff --git a/gas/testsuite/gas/mips/relax-bc1any.l b/gas/testsuite/gas/mips/relax-bc1any.l
new file mode 100644
index 0000000..02f166f
--- /dev/null
+++ b/gas/testsuite/gas/mips/relax-bc1any.l
@@ -0,0 +1,7 @@
+.*: Assembler messages:
+.*:6: Warning: Relaxed out-of-range branch into a jump
+.*:11: Warning: Relaxed out-of-range branch into a jump
+.*:7: Error: Branch out of range
+.*:8: Error: Branch out of range
+.*:9: Error: Branch out of range
+.*:10: Error: Branch out of range
diff --git a/gas/testsuite/gas/mips/relax-bc1any.s b/gas/testsuite/gas/mips/relax-bc1any.s
new file mode 100644
index 0000000..10f9176
--- /dev/null
+++ b/gas/testsuite/gas/mips/relax-bc1any.s
@@ -0,0 +1,14 @@
+# Source file to test branch relaxation with the BC1ANY2F, BC1ANY2T,
+# BC1ANY4F and BC1ANY4T instructions.
+
+ .text
+foo:
+ b bar
+ bc1any2f $cc0, bar
+ bc1any2t $cc0, bar
+ bc1any4f $cc0, bar
+ bc1any4t $cc0, bar
+ bal bar
+
+ .space 0x20000
+bar: