]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
MIPS/GAS/testsuite: Also verify trap expansions of multiplication macros
authorMaciej W. Rozycki <macro@redhat.com>
Fri, 19 Jul 2024 08:42:56 +0000 (09:42 +0100)
committerMaciej W. Rozycki <macro@redhat.com>
Fri, 19 Jul 2024 08:42:56 +0000 (09:42 +0100)
Provide 'mul' test variants for trap expansions as requested by the
'-trap' command-line option, and run them across all the compatible
architectures.

24 files changed:
gas/testsuite/gas/mips/allegrex@mul-trap.d [new file with mode: 0644]
gas/testsuite/gas/mips/micromips@mul-trap.d [new file with mode: 0644]
gas/testsuite/gas/mips/micromips@mul64-trap.d [new file with mode: 0644]
gas/testsuite/gas/mips/mips.exp
gas/testsuite/gas/mips/mips1@mul-trap.d [new file with mode: 0644]
gas/testsuite/gas/mips/mips2@mul-trap.d [new file with mode: 0644]
gas/testsuite/gas/mips/mips3@mul-trap.d [new file with mode: 0644]
gas/testsuite/gas/mips/mips3@mul64-trap.d [new file with mode: 0644]
gas/testsuite/gas/mips/mips4@mul-trap.d [new file with mode: 0644]
gas/testsuite/gas/mips/mips4@mul64-trap.d [new file with mode: 0644]
gas/testsuite/gas/mips/mips5@mul-trap.d [new file with mode: 0644]
gas/testsuite/gas/mips/mips5@mul64-trap.d [new file with mode: 0644]
gas/testsuite/gas/mips/mul-trap.d [new file with mode: 0644]
gas/testsuite/gas/mips/mul64-trap.d [new file with mode: 0644]
gas/testsuite/gas/mips/octeon@mul64-trap.d [new file with mode: 0644]
gas/testsuite/gas/mips/r10000@mul-trap.d [new file with mode: 0644]
gas/testsuite/gas/mips/r10000@mul64-trap.d [new file with mode: 0644]
gas/testsuite/gas/mips/r3000@mul-trap.d [new file with mode: 0644]
gas/testsuite/gas/mips/r3900@mul-trap.d [new file with mode: 0644]
gas/testsuite/gas/mips/r4000@mul-trap.d [new file with mode: 0644]
gas/testsuite/gas/mips/r4000@mul64-trap.d [new file with mode: 0644]
gas/testsuite/gas/mips/r5900@mul-trap.d [new file with mode: 0644]
gas/testsuite/gas/mips/vr5400@mul-trap.d [new file with mode: 0644]
gas/testsuite/gas/mips/vr5400@mul64-trap.d [new file with mode: 0644]

diff --git a/gas/testsuite/gas/mips/allegrex@mul-trap.d b/gas/testsuite/gas/mips/allegrex@mul-trap.d
new file mode 100644 (file)
index 0000000..e9b8b2e
--- /dev/null
@@ -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 (file)
index 0000000..1ae42bc
--- /dev/null
@@ -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 (file)
index 0000000..54359d1
--- /dev/null
@@ -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
+       \.\.\.
index b981b640a09463d3b7073e3fc764b1048441ba3b..b9580bd64f17958ca6b231f9a289beedb2b6b394 100644 (file)
@@ -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 (file)
index 0000000..597c1a9
--- /dev/null
@@ -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 (file)
index 0000000..45405a8
--- /dev/null
@@ -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 (file)
index 0000000..2b9dfee
--- /dev/null
@@ -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 (file)
index 0000000..54f08dd
--- /dev/null
@@ -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 (file)
index 0000000..2b9dfee
--- /dev/null
@@ -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 (file)
index 0000000..8032f97
--- /dev/null
@@ -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 (file)
index 0000000..2b9dfee
--- /dev/null
@@ -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 (file)
index 0000000..8032f97
--- /dev/null
@@ -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 (file)
index 0000000..9cd619d
--- /dev/null
@@ -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 (file)
index 0000000..d60ec9d
--- /dev/null
@@ -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 (file)
index 0000000..fb45789
--- /dev/null
@@ -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 (file)
index 0000000..244ee3c
--- /dev/null
@@ -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 (file)
index 0000000..d60ec9d
--- /dev/null
@@ -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 (file)
index 0000000..597c1a9
--- /dev/null
@@ -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 (file)
index 0000000..597c1a9
--- /dev/null
@@ -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 (file)
index 0000000..2b9dfee
--- /dev/null
@@ -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 (file)
index 0000000..8032f97
--- /dev/null
@@ -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 (file)
index 0000000..487da0f
--- /dev/null
@@ -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 (file)
index 0000000..ee2f942
--- /dev/null
@@ -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 (file)
index 0000000..8032f97
--- /dev/null
@@ -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