aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/mips/eret.d41
-rw-r--r--gas/testsuite/gas/mips/eret.l3
-rw-r--r--gas/testsuite/gas/mips/eret.s27
-rw-r--r--gas/testsuite/gas/mips/mips.exp3
4 files changed, 74 insertions, 0 deletions
diff --git a/gas/testsuite/gas/mips/eret.d b/gas/testsuite/gas/mips/eret.d
new file mode 100644
index 0000000..1c0124a
--- /dev/null
+++ b/gas/testsuite/gas/mips/eret.d
@@ -0,0 +1,41 @@
+#objdump: -d
+#name: MIPS eret disassembly
+#as: -mfix-24k -march=24kc --no-warn
+
+.*\.o: file format .*mips.*
+
+Disassembly of section \.text:
+
+00000000 <\.text>:
+ 0: 240c0000 li t4,0
+ 4: 42000018 eret
+ 8: 00000000 nop
+ c: 10000003 b 0x1c
+ 10: 00000000 nop
+ 14: 240a0003 li t2,3
+ 18: 42000018 eret
+ 1c: 24040000 li a0,0
+ 20: 4200001f deret
+ 24: 00000000 nop
+ 28: 116afffa beq t3,t2,0x14
+ 2c: 00000000 nop
+ 30: 4200001f deret
+ 34: 00000000 nop
+ 38: 42000018 eret
+ 3c: 00000000 nop
+ 40: 42000018 eret
+ 44: 00000000 nop
+ 48: 1000fff4 b 0x1c
+ 4c: 00000000 nop
+ 50: 240c0004 li t4,4
+ 54: 4200001f deret
+ 58: 240c0003 li t4,3
+ 5c: 42000018 eret
+ 60: 10000005 b 0x78
+ 64: 240c0003 li t4,3
+ 68: 42000018 eret
+ 6c: 00000000 nop
+ 70: 10000001 b 0x78
+ 74: 240c0003 li t4,3
+ 78: 240c0003 li t4,3
+ 7c: 42000018 eret
diff --git a/gas/testsuite/gas/mips/eret.l b/gas/testsuite/gas/mips/eret.l
new file mode 100644
index 0000000..327dd95
--- /dev/null
+++ b/gas/testsuite/gas/mips/eret.l
@@ -0,0 +1,3 @@
+.*\.s: Assembler messages:
+.*\.s:20: Warning: ERET and DERET must be followed by a NOP on the 24K\.
+.*\.s:27: Warning: ERET and DERET must be followed by a NOP on the 24K\.
diff --git a/gas/testsuite/gas/mips/eret.s b/gas/testsuite/gas/mips/eret.s
new file mode 100644
index 0000000..081d01e
--- /dev/null
+++ b/gas/testsuite/gas/mips/eret.s
@@ -0,0 +1,27 @@
+ .text
+ li $t4, 0
+ eret
+ b 2f
+1: li $t2, 3
+ eret
+2: li $a0, 0
+ deret
+ beq $t3,$t2,1b
+ deret
+ eret
+ eret
+ b 2b
+
+ .set noreorder
+ li $t4, 4
+ deret
+ li $t4, 3
+ eret
+ b 1f
+ li $t4, 3
+ eret
+ nop
+ b 1f
+ li $t4, 3
+1: li $t4, 3
+ eret
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index b213aba..627232f 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -436,6 +436,9 @@ if { [istarget mips*-*-vxworks*] } {
} else {
run_dump_test "jal"
}
+ run_dump_test "eret"
+ run_list_test "eret" "-mfix-24k -march=24kc" "MIPS eret warnings"
+
if $elf { run_dump_test "jal-svr4pic" }
if $elf { run_dump_test "jal-xgot" }
run_list_test_arches "jal-range" "-32" [mips_arch_list_matching mips1]