aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@redhat.com>2024-07-19 09:42:56 +0100
committerMaciej W. Rozycki <macro@redhat.com>2024-07-19 09:42:56 +0100
commit6eac8a30643ef7f438631d84503fac89dd6b2c50 (patch)
tree4d461f86f5a9475791410c31ce9a181bb9ca51e6 /gas
parent37b83106809d3a6c23d74d0bc5c13b3814fc3d19 (diff)
downloadgdb-6eac8a30643ef7f438631d84503fac89dd6b2c50.zip
gdb-6eac8a30643ef7f438631d84503fac89dd6b2c50.tar.gz
gdb-6eac8a30643ef7f438631d84503fac89dd6b2c50.tar.bz2
MIPS/GAS/testsuite: Also verify trap expansions of multiplication macros
Provide 'mul' test variants for trap expansions as requested by the '-trap' command-line option, and run them across all the compatible architectures.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/gas/mips/allegrex@mul-trap.d5
-rw-r--r--gas/testsuite/gas/mips/micromips@mul-trap.d52
-rw-r--r--gas/testsuite/gas/mips/micromips@mul64-trap.d26
-rw-r--r--gas/testsuite/gas/mips/mips.exp4
-rw-r--r--gas/testsuite/gas/mips/mips1@mul-trap.d5
-rw-r--r--gas/testsuite/gas/mips/mips2@mul-trap.d74
-rw-r--r--gas/testsuite/gas/mips/mips3@mul-trap.d5
-rw-r--r--gas/testsuite/gas/mips/mips3@mul64-trap.d38
-rw-r--r--gas/testsuite/gas/mips/mips4@mul-trap.d5
-rw-r--r--gas/testsuite/gas/mips/mips4@mul64-trap.d5
-rw-r--r--gas/testsuite/gas/mips/mips5@mul-trap.d5
-rw-r--r--gas/testsuite/gas/mips/mips5@mul64-trap.d5
-rw-r--r--gas/testsuite/gas/mips/mul-trap.d52
-rw-r--r--gas/testsuite/gas/mips/mul64-trap.d26
-rw-r--r--gas/testsuite/gas/mips/octeon@mul64-trap.d25
-rw-r--r--gas/testsuite/gas/mips/r10000@mul-trap.d54
-rw-r--r--gas/testsuite/gas/mips/r10000@mul64-trap.d26
-rw-r--r--gas/testsuite/gas/mips/r3000@mul-trap.d5
-rw-r--r--gas/testsuite/gas/mips/r3900@mul-trap.d5
-rw-r--r--gas/testsuite/gas/mips/r4000@mul-trap.d5
-rw-r--r--gas/testsuite/gas/mips/r4000@mul64-trap.d5
-rw-r--r--gas/testsuite/gas/mips/r5900@mul-trap.d52
-rw-r--r--gas/testsuite/gas/mips/vr5400@mul-trap.d70
-rw-r--r--gas/testsuite/gas/mips/vr5400@mul64-trap.d5
24 files changed, 559 insertions, 0 deletions
diff --git a/gas/testsuite/gas/mips/allegrex@mul-trap.d b/gas/testsuite/gas/mips/allegrex@mul-trap.d
new file mode 100644
index 0000000..e9b8b2e
--- /dev/null
+++ b/gas/testsuite/gas/mips/allegrex@mul-trap.d
@@ -0,0 +1,5 @@
+#as: -32 -trap
+#objdump: -dr --prefix-addresses
+#name: MIPS mul with traps
+#source: mul.s
+#dump: allegrex@mul.d
diff --git a/gas/testsuite/gas/mips/micromips@mul-trap.d b/gas/testsuite/gas/mips/micromips@mul-trap.d
new file mode 100644
index 0000000..1ae42bc
--- /dev/null
+++ b/gas/testsuite/gas/mips/micromips@mul-trap.d
@@ -0,0 +1,52 @@
+#as: -32 -trap
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: MIPS mul with traps
+#source: mul.s
+
+# Test the mul macro.
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 00a4 2210 mul a0,a0,a1
+[0-9a-f]+ <[^>]*> 00c5 2210 mul a0,a1,a2
+[0-9a-f]+ <[^>]*> 3020 0000 li at,0
+[0-9a-f]+ <[^>]*> 0025 8b3c mult a1,at
+[0-9a-f]+ <[^>]*> 4644 mflo a0
+[0-9a-f]+ <[^>]*> 3020 0001 li at,1
+[0-9a-f]+ <[^>]*> 0025 8b3c mult a1,at
+[0-9a-f]+ <[^>]*> 4644 mflo a0
+[0-9a-f]+ <[^>]*> 5020 8000 li at,0x8000
+[0-9a-f]+ <[^>]*> 0025 8b3c mult a1,at
+[0-9a-f]+ <[^>]*> 4644 mflo a0
+[0-9a-f]+ <[^>]*> 3020 8000 li at,-32768
+[0-9a-f]+ <[^>]*> 0025 8b3c mult a1,at
+[0-9a-f]+ <[^>]*> 4644 mflo a0
+[0-9a-f]+ <[^>]*> 41a1 0001 lui at,0x1
+[0-9a-f]+ <[^>]*> 0025 8b3c mult a1,at
+[0-9a-f]+ <[^>]*> 4644 mflo a0
+[0-9a-f]+ <[^>]*> 41a1 0001 lui at,0x1
+[0-9a-f]+ <[^>]*> 5021 a5a5 ori at,at,0xa5a5
+[0-9a-f]+ <[^>]*> 0025 8b3c mult a1,at
+[0-9a-f]+ <[^>]*> 4644 mflo a0
+[0-9a-f]+ <[^>]*> 00a4 8b3c mult a0,a1
+[0-9a-f]+ <[^>]*> 4644 mflo a0
+[0-9a-f]+ <[^>]*> 0084 f880 sra a0,a0,0x1f
+[0-9a-f]+ <[^>]*> 4601 mfhi at
+[0-9a-f]+ <[^>]*> 0024 6c3c tne a0,at,0x6
+[0-9a-f]+ <[^>]*> 4644 mflo a0
+[0-9a-f]+ <[^>]*> 00c5 8b3c mult a1,a2
+[0-9a-f]+ <[^>]*> 4644 mflo a0
+[0-9a-f]+ <[^>]*> 0084 f880 sra a0,a0,0x1f
+[0-9a-f]+ <[^>]*> 4601 mfhi at
+[0-9a-f]+ <[^>]*> 0024 6c3c tne a0,at,0x6
+[0-9a-f]+ <[^>]*> 4644 mflo a0
+[0-9a-f]+ <[^>]*> 00a4 9b3c multu a0,a1
+[0-9a-f]+ <[^>]*> 4601 mfhi at
+[0-9a-f]+ <[^>]*> 4644 mflo a0
+[0-9a-f]+ <[^>]*> 0001 6c3c tne at,zero,0x6
+[0-9a-f]+ <[^>]*> 00c5 9b3c multu a1,a2
+[0-9a-f]+ <[^>]*> 4601 mfhi at
+[0-9a-f]+ <[^>]*> 4644 mflo a0
+[0-9a-f]+ <[^>]*> 0001 6c3c tne at,zero,0x6
+ \.\.\.
diff --git a/gas/testsuite/gas/mips/micromips@mul64-trap.d b/gas/testsuite/gas/mips/micromips@mul64-trap.d
new file mode 100644
index 0000000..54359d1
--- /dev/null
+++ b/gas/testsuite/gas/mips/micromips@mul64-trap.d
@@ -0,0 +1,26 @@
+#as: -32 -trap
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: MIPS 64-bit mul with traps
+#source: mul64.s
+
+# Test the mul macro.
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 58c5 9b3c dmultu a1,a2
+[0-9a-f]+ <[^>]*> 4644 mflo a0
+[0-9a-f]+ <[^>]*> 3020 0001 li at,1
+[0-9a-f]+ <[^>]*> 5825 8b3c dmult a1,at
+[0-9a-f]+ <[^>]*> 4644 mflo a0
+[0-9a-f]+ <[^>]*> 58c5 8b3c dmult a1,a2
+[0-9a-f]+ <[^>]*> 4644 mflo a0
+[0-9a-f]+ <[^>]*> 5884 f888 dsra32 a0,a0,0x1f
+[0-9a-f]+ <[^>]*> 4601 mfhi at
+[0-9a-f]+ <[^>]*> 0024 6c3c tne a0,at,0x6
+[0-9a-f]+ <[^>]*> 4644 mflo a0
+[0-9a-f]+ <[^>]*> 58c5 9b3c dmultu a1,a2
+[0-9a-f]+ <[^>]*> 4601 mfhi at
+[0-9a-f]+ <[^>]*> 4644 mflo a0
+[0-9a-f]+ <[^>]*> 0001 6c3c tne at,zero,0x6
+ \.\.\.
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index b981b64..b9580bd 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -890,8 +890,12 @@ if { [istarget mips*-*-vxworks*] } {
[mips_arch_list_matching fpisa5 gpr64]
run_dump_test_arches "mul" [mips_arch_list_matching mips1 \
!mips32r6]
+ run_dump_test_arches "mul-trap" [mips_arch_list_matching mips1 \
+ !mips32r6]
run_dump_test_arches "mul64" [mips_arch_list_matching mips3 !r5900 \
!mips64r6]
+ run_dump_test_arches "mul64-trap" [mips_arch_list_matching mips3 !r5900 \
+ !mips64r6]
run_dump_test_arches "rol" [mips_arch_list_matching mips1 !ror]
run_dump_test_arches "rol-hw" [mips_arch_list_matching ror]
diff --git a/gas/testsuite/gas/mips/mips1@mul-trap.d b/gas/testsuite/gas/mips/mips1@mul-trap.d
new file mode 100644
index 0000000..597c1a9
--- /dev/null
+++ b/gas/testsuite/gas/mips/mips1@mul-trap.d
@@ -0,0 +1,5 @@
+#as: -32 -trap
+#objdump: -dr --prefix-addresses
+#name: MIPS mul with traps
+#source: mul.s
+#dump: mips1@mul.d
diff --git a/gas/testsuite/gas/mips/mips2@mul-trap.d b/gas/testsuite/gas/mips/mips2@mul-trap.d
new file mode 100644
index 0000000..45405a8
--- /dev/null
+++ b/gas/testsuite/gas/mips/mips2@mul-trap.d
@@ -0,0 +1,74 @@
+#as: -32 -trap
+#objdump: -drz --prefix-addresses --show-raw-insn
+#name: MIPS mul with traps
+#source: mul.s
+
+# Test the mul macro.
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 00850019 multu a0,a1
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a60019 multu a1,a2
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 24010000 li at,0
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 24010001 li at,1
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 34018000 li at,0x8000
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 24018000 li at,-32768
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 3c010001 lui at,0x1
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 3c010001 lui at,0x1
+[0-9a-f]+ <[^>]*> 3421a5a5 ori at,at,0xa5a5
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00850018 mult a0,a1
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 000427c3 sra a0,a0,0x1f
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 008101b6 tne a0,at,0x6
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a60018 mult a1,a2
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 000427c3 sra a0,a0,0x1f
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 008101b6 tne a0,at,0x6
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00850019 multu a0,a1
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 002001b6 tne at,zero,0x6
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a60019 multu a1,a2
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 002001b6 tne at,zero,0x6
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
diff --git a/gas/testsuite/gas/mips/mips3@mul-trap.d b/gas/testsuite/gas/mips/mips3@mul-trap.d
new file mode 100644
index 0000000..2b9dfee
--- /dev/null
+++ b/gas/testsuite/gas/mips/mips3@mul-trap.d
@@ -0,0 +1,5 @@
+#as: -32 -trap
+#objdump: -drz --prefix-addresses --show-raw-insn
+#name: MIPS mul with traps
+#source: mul.s
+#dump: mips2@mul-trap.d
diff --git a/gas/testsuite/gas/mips/mips3@mul64-trap.d b/gas/testsuite/gas/mips/mips3@mul64-trap.d
new file mode 100644
index 0000000..54f08dd
--- /dev/null
+++ b/gas/testsuite/gas/mips/mips3@mul64-trap.d
@@ -0,0 +1,38 @@
+#as: -32 -trap
+#objdump: -drz --prefix-addresses --show-raw-insn
+#name: MIPS 64-bit mul with traps
+#source: mul64.s
+
+# Test the mul macro.
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 00a6001d dmultu a1,a2
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 24010001 li at,1
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a1001c dmult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a6001c dmult a1,a2
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 000427ff dsra32 a0,a0,0x1f
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 008101b6 tne a0,at,0x6
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a6001d dmultu a1,a2
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 002001b6 tne at,zero,0x6
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
diff --git a/gas/testsuite/gas/mips/mips4@mul-trap.d b/gas/testsuite/gas/mips/mips4@mul-trap.d
new file mode 100644
index 0000000..2b9dfee
--- /dev/null
+++ b/gas/testsuite/gas/mips/mips4@mul-trap.d
@@ -0,0 +1,5 @@
+#as: -32 -trap
+#objdump: -drz --prefix-addresses --show-raw-insn
+#name: MIPS mul with traps
+#source: mul.s
+#dump: mips2@mul-trap.d
diff --git a/gas/testsuite/gas/mips/mips4@mul64-trap.d b/gas/testsuite/gas/mips/mips4@mul64-trap.d
new file mode 100644
index 0000000..8032f97
--- /dev/null
+++ b/gas/testsuite/gas/mips/mips4@mul64-trap.d
@@ -0,0 +1,5 @@
+#as: -32 -trap
+#objdump: -drz --prefix-addresses --show-raw-insn
+#name: MIPS 64-bit mul with traps
+#source: mul64.s
+#dump: mips3@mul64-trap.d
diff --git a/gas/testsuite/gas/mips/mips5@mul-trap.d b/gas/testsuite/gas/mips/mips5@mul-trap.d
new file mode 100644
index 0000000..2b9dfee
--- /dev/null
+++ b/gas/testsuite/gas/mips/mips5@mul-trap.d
@@ -0,0 +1,5 @@
+#as: -32 -trap
+#objdump: -drz --prefix-addresses --show-raw-insn
+#name: MIPS mul with traps
+#source: mul.s
+#dump: mips2@mul-trap.d
diff --git a/gas/testsuite/gas/mips/mips5@mul64-trap.d b/gas/testsuite/gas/mips/mips5@mul64-trap.d
new file mode 100644
index 0000000..8032f97
--- /dev/null
+++ b/gas/testsuite/gas/mips/mips5@mul64-trap.d
@@ -0,0 +1,5 @@
+#as: -32 -trap
+#objdump: -drz --prefix-addresses --show-raw-insn
+#name: MIPS 64-bit mul with traps
+#source: mul64.s
+#dump: mips3@mul64-trap.d
diff --git a/gas/testsuite/gas/mips/mul-trap.d b/gas/testsuite/gas/mips/mul-trap.d
new file mode 100644
index 0000000..9cd619d
--- /dev/null
+++ b/gas/testsuite/gas/mips/mul-trap.d
@@ -0,0 +1,52 @@
+#as: -32 -trap
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: MIPS mul with traps
+#source: mul.s
+
+# Test the mul macro.
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 70852002 mul a0,a0,a1
+[0-9a-f]+ <[^>]*> 70a62002 mul a0,a1,a2
+[0-9a-f]+ <[^>]*> 24010000 li at,0
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 24010001 li at,1
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 34018000 li at,0x8000
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 24018000 li at,-32768
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 3c010001 lui at,0x1
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 3c010001 lui at,0x1
+[0-9a-f]+ <[^>]*> 3421a5a5 ori at,at,0xa5a5
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00850018 mult a0,a1
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 000427c3 sra a0,a0,0x1f
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 008101b6 tne a0,at,0x6
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00a60018 mult a1,a2
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 000427c3 sra a0,a0,0x1f
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 008101b6 tne a0,at,0x6
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00850019 multu a0,a1
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 002001b6 tne at,zero,0x6
+[0-9a-f]+ <[^>]*> 00a60019 multu a1,a2
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 002001b6 tne at,zero,0x6
+ \.\.\.
diff --git a/gas/testsuite/gas/mips/mul64-trap.d b/gas/testsuite/gas/mips/mul64-trap.d
new file mode 100644
index 0000000..d60ec9d
--- /dev/null
+++ b/gas/testsuite/gas/mips/mul64-trap.d
@@ -0,0 +1,26 @@
+#as: -32 -trap
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: MIPS 64-bit mul with traps
+#source: mul64.s
+
+# Test the mul macro.
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 00a6001d dmultu a1,a2
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 24010001 li at,1
+[0-9a-f]+ <[^>]*> 00a1001c dmult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00a6001c dmult a1,a2
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 000427ff dsra32 a0,a0,0x1f
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 008101b6 tne a0,at,0x6
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00a6001d dmultu a1,a2
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 002001b6 tne at,zero,0x6
+ \.\.\.
diff --git a/gas/testsuite/gas/mips/octeon@mul64-trap.d b/gas/testsuite/gas/mips/octeon@mul64-trap.d
new file mode 100644
index 0000000..fb45789
--- /dev/null
+++ b/gas/testsuite/gas/mips/octeon@mul64-trap.d
@@ -0,0 +1,25 @@
+#as: -32 -trap
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: MIPS 64-bit mul with traps
+#source: mul64.s
+
+# Test the mul macro.
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 70a62003 dmul a0,a1,a2
+[0-9a-f]+ <[^>]*> 24010001 li at,1
+[0-9a-f]+ <[^>]*> 00a1001c dmult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00a6001c dmult a1,a2
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 000427ff dsra32 a0,a0,0x1f
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 008101b6 tne a0,at,0x6
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00a6001d dmultu a1,a2
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 002001b6 tne at,zero,0x6
+ \.\.\.
diff --git a/gas/testsuite/gas/mips/r10000@mul-trap.d b/gas/testsuite/gas/mips/r10000@mul-trap.d
new file mode 100644
index 0000000..244ee3c
--- /dev/null
+++ b/gas/testsuite/gas/mips/r10000@mul-trap.d
@@ -0,0 +1,54 @@
+#as: -32 -trap
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: MIPS mul with traps
+#source: mul.s
+
+# Test the mul macro.
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 00850019 multu a0,a1
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00a60019 multu a1,a2
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 24010000 li at,0
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 24010001 li at,1
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 34018000 li at,0x8000
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 24018000 li at,-32768
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 3c010001 lui at,0x1
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 3c010001 lui at,0x1
+[0-9a-f]+ <[^>]*> 3421a5a5 ori at,at,0xa5a5
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00850018 mult a0,a1
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 000427c3 sra a0,a0,0x1f
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 008101b6 tne a0,at,0x6
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00a60018 mult a1,a2
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 000427c3 sra a0,a0,0x1f
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 008101b6 tne a0,at,0x6
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00850019 multu a0,a1
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 002001b6 tne at,zero,0x6
+[0-9a-f]+ <[^>]*> 00a60019 multu a1,a2
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 002001b6 tne at,zero,0x6
+ \.\.\.
diff --git a/gas/testsuite/gas/mips/r10000@mul64-trap.d b/gas/testsuite/gas/mips/r10000@mul64-trap.d
new file mode 100644
index 0000000..d60ec9d
--- /dev/null
+++ b/gas/testsuite/gas/mips/r10000@mul64-trap.d
@@ -0,0 +1,26 @@
+#as: -32 -trap
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: MIPS 64-bit mul with traps
+#source: mul64.s
+
+# Test the mul macro.
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 00a6001d dmultu a1,a2
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 24010001 li at,1
+[0-9a-f]+ <[^>]*> 00a1001c dmult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00a6001c dmult a1,a2
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 000427ff dsra32 a0,a0,0x1f
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 008101b6 tne a0,at,0x6
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00a6001d dmultu a1,a2
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 002001b6 tne at,zero,0x6
+ \.\.\.
diff --git a/gas/testsuite/gas/mips/r3000@mul-trap.d b/gas/testsuite/gas/mips/r3000@mul-trap.d
new file mode 100644
index 0000000..597c1a9
--- /dev/null
+++ b/gas/testsuite/gas/mips/r3000@mul-trap.d
@@ -0,0 +1,5 @@
+#as: -32 -trap
+#objdump: -dr --prefix-addresses
+#name: MIPS mul with traps
+#source: mul.s
+#dump: mips1@mul.d
diff --git a/gas/testsuite/gas/mips/r3900@mul-trap.d b/gas/testsuite/gas/mips/r3900@mul-trap.d
new file mode 100644
index 0000000..597c1a9
--- /dev/null
+++ b/gas/testsuite/gas/mips/r3900@mul-trap.d
@@ -0,0 +1,5 @@
+#as: -32 -trap
+#objdump: -dr --prefix-addresses
+#name: MIPS mul with traps
+#source: mul.s
+#dump: mips1@mul.d
diff --git a/gas/testsuite/gas/mips/r4000@mul-trap.d b/gas/testsuite/gas/mips/r4000@mul-trap.d
new file mode 100644
index 0000000..2b9dfee
--- /dev/null
+++ b/gas/testsuite/gas/mips/r4000@mul-trap.d
@@ -0,0 +1,5 @@
+#as: -32 -trap
+#objdump: -drz --prefix-addresses --show-raw-insn
+#name: MIPS mul with traps
+#source: mul.s
+#dump: mips2@mul-trap.d
diff --git a/gas/testsuite/gas/mips/r4000@mul64-trap.d b/gas/testsuite/gas/mips/r4000@mul64-trap.d
new file mode 100644
index 0000000..8032f97
--- /dev/null
+++ b/gas/testsuite/gas/mips/r4000@mul64-trap.d
@@ -0,0 +1,5 @@
+#as: -32 -trap
+#objdump: -drz --prefix-addresses --show-raw-insn
+#name: MIPS 64-bit mul with traps
+#source: mul64.s
+#dump: mips3@mul64-trap.d
diff --git a/gas/testsuite/gas/mips/r5900@mul-trap.d b/gas/testsuite/gas/mips/r5900@mul-trap.d
new file mode 100644
index 0000000..487da0f
--- /dev/null
+++ b/gas/testsuite/gas/mips/r5900@mul-trap.d
@@ -0,0 +1,52 @@
+#as: -32 -trap
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: MIPS mul with traps
+#source: mul.s
+
+# Test the mul macro.
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 00852019 multu a0,a0,a1
+[0-9a-f]+ <[^>]*> 00a62019 multu a0,a1,a2
+[0-9a-f]+ <[^>]*> 24010000 li at,0
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 24010001 li at,1
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 34018000 li at,0x8000
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 24018000 li at,-32768
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 3c010001 lui at,0x1
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 3c010001 lui at,0x1
+[0-9a-f]+ <[^>]*> 3421a5a5 ori at,at,0xa5a5
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00850018 mult a0,a1
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 000427c3 sra a0,a0,0x1f
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 008101b6 tne a0,at,0x6
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00a60018 mult a1,a2
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 000427c3 sra a0,a0,0x1f
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 008101b6 tne a0,at,0x6
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00850019 multu a0,a1
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 002001b6 tne at,zero,0x6
+[0-9a-f]+ <[^>]*> 00a60019 multu a1,a2
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 002001b6 tne at,zero,0x6
+ \.\.\.
diff --git a/gas/testsuite/gas/mips/vr5400@mul-trap.d b/gas/testsuite/gas/mips/vr5400@mul-trap.d
new file mode 100644
index 0000000..ee2f942
--- /dev/null
+++ b/gas/testsuite/gas/mips/vr5400@mul-trap.d
@@ -0,0 +1,70 @@
+#as: -32 -trap
+#objdump: -drz --prefix-addresses --show-raw-insn
+#name: MIPS mul with traps
+#source: mul.s
+
+# Test the mul macro.
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 00850019 multu a0,a1
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a62058 mul a0,a1,a2
+[0-9a-f]+ <[^>]*> 24010000 li at,0
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 24010001 li at,1
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 34018000 li at,0x8000
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 24018000 li at,-32768
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 3c010001 lui at,0x1
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 3c010001 lui at,0x1
+[0-9a-f]+ <[^>]*> 3421a5a5 ori at,at,0xa5a5
+[0-9a-f]+ <[^>]*> 00a10018 mult a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00850018 mult a0,a1
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 000427c3 sra a0,a0,0x1f
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 008101b6 tne a0,at,0x6
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a60018 mult a1,a2
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 000427c3 sra a0,a0,0x1f
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 008101b6 tne a0,at,0x6
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00850019 multu a0,a1
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 002001b6 tne at,zero,0x6
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a60019 multu a1,a2
+[0-9a-f]+ <[^>]*> 00000810 mfhi at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 002001b6 tne at,zero,0x6
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
diff --git a/gas/testsuite/gas/mips/vr5400@mul64-trap.d b/gas/testsuite/gas/mips/vr5400@mul64-trap.d
new file mode 100644
index 0000000..8032f97
--- /dev/null
+++ b/gas/testsuite/gas/mips/vr5400@mul64-trap.d
@@ -0,0 +1,5 @@
+#as: -32 -trap
+#objdump: -drz --prefix-addresses --show-raw-insn
+#name: MIPS 64-bit mul with traps
+#source: mul64.s
+#dump: mips3@mul64-trap.d