aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorMatthew Fortune <matthew.fortune@imgtec.com>2015-04-23 20:09:13 +0100
committerMatthew Fortune <matthew.fortune@imgtec.com>2015-04-23 22:23:17 +0100
commitece794d9c43addc2a347c01f5cd753b9171d028a (patch)
treebcc8a8de4c1eea4d508dd7a3674bf2579edba103 /gas/testsuite
parenta100d66fb42044153dc0e93c96d7944dab0cc674 (diff)
downloadgdb-ece794d9c43addc2a347c01f5cd753b9171d028a.zip
gdb-ece794d9c43addc2a347c01f5cd753b9171d028a.tar.gz
gdb-ece794d9c43addc2a347c01f5cd753b9171d028a.tar.bz2
Improve warning messages for la/dla
gas/ * config/tc-mips.c (macro): State the recommended way of creating 32-bit or 64-bit addresses. gas/testsuite/ * gas/mips/dla-warn.l: New file. * gas/mips/dla-warn.s: New file. * gas/mips/la-warn.l: New file. * gas/mips/la-warn.s: New file. * gas/mips/mips.exp: Run new tests.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog8
-rw-r--r--gas/testsuite/gas/mips/dla-warn.l2
-rw-r--r--gas/testsuite/gas/mips/dla-warn.s1
-rw-r--r--gas/testsuite/gas/mips/la-warn.l2
-rw-r--r--gas/testsuite/gas/mips/la-warn.s1
-rw-r--r--gas/testsuite/gas/mips/mips.exp4
6 files changed, 18 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 493edba..c28a6a2 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,5 +1,13 @@
2015-04-23 Matthew Fortune <matthew.fortune@imgtec.com>
+ * gas/mips/dla-warn.l: New file.
+ * gas/mips/dla-warn.s: New file.
+ * gas/mips/la-warn.l: New file.
+ * gas/mips/la-warn.s: New file.
+ * gas/mips/mips.exp: Run new tests.
+
+2015-04-23 Matthew Fortune <matthew.fortune@imgtec.com>
+
* gas/mips/mips.exp: Require o32 for r6-branch-constraints.
2015-04-23 Jan Beulich <jbeulich@suse.com>
diff --git a/gas/testsuite/gas/mips/dla-warn.l b/gas/testsuite/gas/mips/dla-warn.l
new file mode 100644
index 0000000..4a25ea3
--- /dev/null
+++ b/gas/testsuite/gas/mips/dla-warn.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*:1: Warning: dla used to load 32-bit register; recommend using la instead
diff --git a/gas/testsuite/gas/mips/dla-warn.s b/gas/testsuite/gas/mips/dla-warn.s
new file mode 100644
index 0000000..a2c60c1
--- /dev/null
+++ b/gas/testsuite/gas/mips/dla-warn.s
@@ -0,0 +1 @@
+ dla $2, foo
diff --git a/gas/testsuite/gas/mips/la-warn.l b/gas/testsuite/gas/mips/la-warn.l
new file mode 100644
index 0000000..05eaf8a
--- /dev/null
+++ b/gas/testsuite/gas/mips/la-warn.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*:1: Warning: la used to load 64-bit address; recommend using dla instead
diff --git a/gas/testsuite/gas/mips/la-warn.s b/gas/testsuite/gas/mips/la-warn.s
new file mode 100644
index 0000000..894dba5
--- /dev/null
+++ b/gas/testsuite/gas/mips/la-warn.s
@@ -0,0 +1 @@
+ la $2, foo
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index cdb66fc..c3c3364 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -1223,8 +1223,12 @@ if { [istarget mips*-*-vxworks*] } {
run_list_test "ase-errors-4" "-mabi=o64 -march=mips3" "ASE errors (4)"
run_dump_test_arches "la-reloc" [mips_arch_list_matching mips1]
+ run_list_test "dla-warn" "-mabi=32 -march=mips3" \
+ "DLA with 32-bit addresses"
if { $has_newabi } {
run_dump_test_arches "dla-reloc" [mips_arch_list_matching mips3]
+ run_list_test "la-warn" "-mabi=64 -march=mips3" \
+ "LA with 64-bit addresses"
}
# Start with MIPS II to avoid load delay nops.