summaryrefslogtreecommitdiff
path: root/gas/testsuite/gas/mips
diff options
context:
space:
mode:
authorFaraz Shahbazker <fshahbazker@wavecomp.com>2019-08-05 23:38:46 +0000
committerFaraz Shahbazker <fshahbazker@wavecomp.com>2019-08-19 13:43:50 -0700
commit770c015139f038bd7b7abb5c6d84eb39d36d3080 (patch)
tree29807efdc505a9762d32ffb02fba43a1c3aa80a7 /gas/testsuite/gas/mips
parent7ce8f214f1af1dd593ad42665da416ac46033f97 (diff)
downloadbinutils-gdb-770c015139f038bd7b7abb5c6d84eb39d36d3080.tar.gz
MIPS/gas: Retain ISA mode bit for labels with .insn annotation
gas/ * config/tc-mips.c (mips_move_labels): Retain ISA mode bit when moving labels in text segments. (mips_align): Indicate text mode when aligning labels in text segments. * gas/testsuite/gas/mips/insn-isa-mode.d: New test. * gas/testsuite/gas/mips/insn-isa-mode.s: New test source. * gas/testsuite/gas/mips/mips.exp: Run the new test.
Diffstat (limited to 'gas/testsuite/gas/mips')
-rw-r--r--gas/testsuite/gas/mips/insn-isa-mode.d16
-rw-r--r--gas/testsuite/gas/mips/insn-isa-mode.s14
-rw-r--r--gas/testsuite/gas/mips/mips.exp1
3 files changed, 31 insertions, 0 deletions
diff --git a/gas/testsuite/gas/mips/insn-isa-mode.d b/gas/testsuite/gas/mips/insn-isa-mode.d
new file mode 100644
index 00000000000..9d2c61b96c1
--- /dev/null
+++ b/gas/testsuite/gas/mips/insn-isa-mode.d
@@ -0,0 +1,16 @@
+#objdump: -dr --show-raw-insn
+#name: microMIPS ISA mode for .insn label references
+#as: -32
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+00000000 <test1>:
+ 0: 3c030000 lui v1,0x0
+ 0: R_MIPS_HI16 \.text
+ 4: 2463000b addiu v1,v1,11
+ 4: R_MIPS_LO16 \.text
+00000008 <test2>:
+ 8: 0c00 nop
+ a: 0c00 nop
+ \.\.\.
diff --git a/gas/testsuite/gas/mips/insn-isa-mode.s b/gas/testsuite/gas/mips/insn-isa-mode.s
new file mode 100644
index 00000000000..ecc520f3593
--- /dev/null
+++ b/gas/testsuite/gas/mips/insn-isa-mode.s
@@ -0,0 +1,14 @@
+ .text
+ .set nomicromips
+ .globl test1
+ .type test1, @function
+test1:
+ la $3,test2+2
+ .set micromips
+test2:
+ .insn
+ .half 0x0c00
+ .half 0x0c00
+# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
+ .align 4, 0
+ .space 16
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index eaeb488f61f..2084ee08292 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -2093,4 +2093,5 @@ if { [istarget mips*-*-vxworks*] } {
} else {
run_dump_test "pr14798"
}
+ run_dump_test "insn-isa-mode"
}