]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
MIPS/GAS/testsuite: Split mul test into 32-bit and 64-bit parts
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)
Enable full 32-bit and 64-bit multiplication macro verification, by
splitting the 'mul' test into two parts respectively, and run them
across all the compatible architectures.

26 files changed:
gas/testsuite/gas/mips/allegrex@mul.d [new file with mode: 0644]
gas/testsuite/gas/mips/micromips@mul.d
gas/testsuite/gas/mips/micromips@mul64.d [new file with mode: 0644]
gas/testsuite/gas/mips/mips.exp
gas/testsuite/gas/mips/mips1@mul.d [new file with mode: 0644]
gas/testsuite/gas/mips/mips2@mul.d [new file with mode: 0644]
gas/testsuite/gas/mips/mips3@mul.d
gas/testsuite/gas/mips/mips3@mul64.d [new file with mode: 0644]
gas/testsuite/gas/mips/mips4@mul.d
gas/testsuite/gas/mips/mips4@mul64.d [new file with mode: 0644]
gas/testsuite/gas/mips/mips5@mul.d
gas/testsuite/gas/mips/mips5@mul64.d [new file with mode: 0644]
gas/testsuite/gas/mips/mul.d
gas/testsuite/gas/mips/mul.s
gas/testsuite/gas/mips/mul64.d [new file with mode: 0644]
gas/testsuite/gas/mips/mul64.s [new file with mode: 0644]
gas/testsuite/gas/mips/octeon@mul64.d [new file with mode: 0644]
gas/testsuite/gas/mips/r10000@mul.d
gas/testsuite/gas/mips/r10000@mul64.d [new file with mode: 0644]
gas/testsuite/gas/mips/r3000@mul.d [new file with mode: 0644]
gas/testsuite/gas/mips/r3900@mul.d [new file with mode: 0644]
gas/testsuite/gas/mips/r4000@mul.d
gas/testsuite/gas/mips/r4000@mul64.d [new file with mode: 0644]
gas/testsuite/gas/mips/r5900@mul.d [moved from gas/testsuite/gas/mips/octeon@mul.d with 71% similarity]
gas/testsuite/gas/mips/vr5400@mul.d
gas/testsuite/gas/mips/vr5400@mul64.d [new file with mode: 0644]

diff --git a/gas/testsuite/gas/mips/allegrex@mul.d b/gas/testsuite/gas/mips/allegrex@mul.d
new file mode 100644 (file)
index 0000000..7479f0b
--- /dev/null
@@ -0,0 +1,62 @@
+#as: -32
+#objdump: -dr --prefix-addresses
+#name: MIPS mul
+#source: mul.s
+
+# Test the mul macro.
+
+.*: +file format .*mips.*
+
+Disassembly of section .text:
+0+0000 <[^>]*> multu   a0,a1
+0+0004 <[^>]*> mflo    a0
+0+0008 <[^>]*> multu   a1,a2
+0+000c <[^>]*> mflo    a0
+0+0010 <[^>]*> li      at,0
+0+0014 <[^>]*> mult    a1,at
+0+0018 <[^>]*> mflo    a0
+0+001c <[^>]*> li      at,1
+0+0020 <[^>]*> mult    a1,at
+0+0024 <[^>]*> mflo    a0
+0+0028 <[^>]*> li      at,0x8000
+0+002c <[^>]*> mult    a1,at
+0+0030 <[^>]*> mflo    a0
+0+0034 <[^>]*> li      at,-32768
+0+0038 <[^>]*> mult    a1,at
+0+003c <[^>]*> mflo    a0
+0+0040 <[^>]*> lui     at,0x1
+0+0044 <[^>]*> mult    a1,at
+0+0048 <[^>]*> mflo    a0
+0+004c <[^>]*> lui     at,0x1
+0+0050 <[^>]*> ori     at,at,0xa5a5
+0+0054 <[^>]*> mult    a1,at
+0+0058 <[^>]*> mflo    a0
+0+005c <[^>]*> mult    a0,a1
+0+0060 <[^>]*> mflo    a0
+0+0064 <[^>]*> sra     a0,a0,0x1f
+0+0068 <[^>]*> mfhi    at
+0+006c <[^>]*> beq     a0,at,0+78 <foo\+(0x|)78>
+0+0070 <[^>]*> nop
+0+0074 <[^>]*> break   (0x0,0x6|0x6)
+0+0078 <[^>]*> mflo    a0
+0+007c <[^>]*> mult    a1,a2
+0+0080 <[^>]*> mflo    a0
+0+0084 <[^>]*> sra     a0,a0,0x1f
+0+0088 <[^>]*> mfhi    at
+0+008c <[^>]*> beq     a0,at,0+98 <foo\+(0x|)98>
+0+0090 <[^>]*> nop
+0+0094 <[^>]*> break   (0x0,0x6|0x6)
+0+0098 <[^>]*> mflo    a0
+0+009c <[^>]*> multu   a0,a1
+0+00a0 <[^>]*> mfhi    at
+0+00a4 <[^>]*> mflo    a0
+0+00a8 <[^>]*> beqz    at,0+b4 <foo\+(0x|)b4>
+0+00ac <[^>]*> nop
+0+00b0 <[^>]*> break   (0x0,0x6|0x6)
+0+00b4 <[^>]*> multu   a1,a2
+0+00b8 <[^>]*> mfhi    at
+0+00bc <[^>]*> mflo    a0
+0+00c0 <[^>]*> beqz    at,0+cc <foo\+(0x|)cc>
+0+00c4 <[^>]*> nop
+0+00c8 <[^>]*> break   (0x0,0x6|0x6)
+       ...
index 0ee40c097e1c3525b1cf9a3e72886d457b0e6cf0..c940bd5ba0218bbd9ecd6c6c65c70f2cc2dc0367 100644 (file)
@@ -61,27 +61,5 @@ Disassembly of section \.text:
                        [0-9a-f]+: R_MICROMIPS_PC16_S1  \.L\^_3
 [0-9a-f]+ <[^>]*> 0c00         nop
 [0-9a-f]+ <[^>]*> 4686         break   0x6
-[0-9a-f]+ <\.L\^_3> 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]+ <[^>]*> 9424 fffe    beq     a0,at,[0-9a-f]+ <[^>]*>
-                       [0-9a-f]+: R_MICROMIPS_PC16_S1  \.L\^_4
-[0-9a-f]+ <[^>]*> 0c00         nop
-[0-9a-f]+ <[^>]*> 4686         break   0x6
-[0-9a-f]+ <\.L\^_4> 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]+ <[^>]*> 9401 fffe    beqz    at,[0-9a-f]+ <[^>]*>
-                       [0-9a-f]+: R_MICROMIPS_PC16_S1  \.L\^_5
-[0-9a-f]+ <[^>]*> 0c00         nop
-[0-9a-f]+ <[^>]*> 4686         break   0x6
-[0-9a-f]+ <[^>]*> 0000 0000    nop
        \.\.\.
        \.\.\.
diff --git a/gas/testsuite/gas/mips/micromips@mul64.d b/gas/testsuite/gas/mips/micromips@mul64.d
new file mode 100644 (file)
index 0000000..0075c43
--- /dev/null
@@ -0,0 +1,33 @@
+#as: -32
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: MIPS 64-bit mul
+#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]+ <[^>]*> 9424 fffe    beq     a0,at,[0-9a-f]+ <[^>]*>
+                       [0-9a-f]+: R_MICROMIPS_PC16_S1  \.L\^_0
+[0-9a-f]+ <[^>]*> 0c00         nop
+[0-9a-f]+ <[^>]*> 4686         break   0x6
+[0-9a-f]+ <\.L\^_0> 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]+ <[^>]*> 9401 fffe    beqz    at,[0-9a-f]+ <[^>]*>
+                       [0-9a-f]+: R_MICROMIPS_PC16_S1  \.L\^_1
+[0-9a-f]+ <[^>]*> 0c00         nop
+[0-9a-f]+ <[^>]*> 4686         break   0x6
+       \.\.\.
+       \.\.\.
index 8f0f4581a0af3a214c7edbbcef558b2e2ad380fe..b981b640a09463d3b7073e3fc764b1048441ba3b 100644 (file)
@@ -888,7 +888,9 @@ if { [istarget mips*-*-vxworks*] } {
                                        [mips_arch_list_matching fpisa5]
     run_dump_test_arches "mips5-fp" "-mabi=o64" \
                                        [mips_arch_list_matching fpisa5 gpr64]
-    run_dump_test_arches "mul"         [mips_arch_list_matching mips3 !r5900 \
+    run_dump_test_arches "mul"         [mips_arch_list_matching mips1 \
+                                               !mips32r6]
+    run_dump_test_arches "mul64"       [mips_arch_list_matching mips3 !r5900 \
                                                !mips64r6]
 
     run_dump_test_arches "rol"         [mips_arch_list_matching mips1 !ror]
diff --git a/gas/testsuite/gas/mips/mips1@mul.d b/gas/testsuite/gas/mips/mips1@mul.d
new file mode 100644 (file)
index 0000000..8cbd1da
--- /dev/null
@@ -0,0 +1,71 @@
+#as: -32
+#objdump: -dr --prefix-addresses
+#name: MIPS mul
+#source: mul.s
+
+# Test the mul macro.
+
+.*: +file format .*mips.*
+
+Disassembly of section .text:
+0+0000 <[^>]*> multu   a0,a1
+0+0004 <[^>]*> mflo    a0
+       ...
+0+0010 <[^>]*> multu   a1,a2
+0+0014 <[^>]*> mflo    a0
+0+0018 <[^>]*> li      at,0
+0+001c <[^>]*> nop
+0+0020 <[^>]*> mult    a1,at
+0+0024 <[^>]*> mflo    a0
+0+0028 <[^>]*> li      at,1
+0+002c <[^>]*> nop
+0+0030 <[^>]*> mult    a1,at
+0+0034 <[^>]*> mflo    a0
+0+0038 <[^>]*> li      at,0x8000
+0+003c <[^>]*> nop
+0+0040 <[^>]*> mult    a1,at
+0+0044 <[^>]*> mflo    a0
+0+0048 <[^>]*> li      at,-32768
+0+004c <[^>]*> nop
+0+0050 <[^>]*> mult    a1,at
+0+0054 <[^>]*> mflo    a0
+0+0058 <[^>]*> lui     at,0x1
+0+005c <[^>]*> nop
+0+0060 <[^>]*> mult    a1,at
+0+0064 <[^>]*> mflo    a0
+0+0068 <[^>]*> lui     at,0x1
+0+006c <[^>]*> ori     at,at,0xa5a5
+0+0070 <[^>]*> mult    a1,at
+0+0074 <[^>]*> mflo    a0
+       ...
+0+0080 <[^>]*> mult    a0,a1
+0+0084 <[^>]*> mflo    a0
+0+0088 <[^>]*> sra     a0,a0,0x1f
+0+008c <[^>]*> mfhi    at
+0+0090 <[^>]*> beq     a0,at,0+9c <foo\+(0x|)9c>
+0+0094 <[^>]*> nop
+0+0098 <[^>]*> break   (0x0,0x6|0x6)
+0+009c <[^>]*> mflo    a0
+       ...
+0+00a8 <[^>]*> mult    a1,a2
+0+00ac <[^>]*> mflo    a0
+0+00b0 <[^>]*> sra     a0,a0,0x1f
+0+00b4 <[^>]*> mfhi    at
+0+00b8 <[^>]*> beq     a0,at,0+c4 <foo\+(0x|)c4>
+0+00bc <[^>]*> nop
+0+00c0 <[^>]*> break   (0x0,0x6|0x6)
+0+00c4 <[^>]*> mflo    a0
+       ...
+0+00d0 <[^>]*> multu   a0,a1
+0+00d4 <[^>]*> mfhi    at
+0+00d8 <[^>]*> mflo    a0
+0+00dc <[^>]*> beqz    at,0+e8 <foo\+(0x|)e8>
+0+00e0 <[^>]*> nop
+0+00e4 <[^>]*> break   (0x0,0x6|0x6)
+0+00e8 <[^>]*> multu   a1,a2
+0+00ec <[^>]*> mfhi    at
+0+00f0 <[^>]*> mflo    a0
+0+00f4 <[^>]*> beqz    at,0+100 <foo\+(0x|)100>
+0+00f8 <[^>]*> nop
+0+00fc <[^>]*> break   (0x0,0x6|0x6)
+       ...
diff --git a/gas/testsuite/gas/mips/mips2@mul.d b/gas/testsuite/gas/mips/mips2@mul.d
new file mode 100644 (file)
index 0000000..fd1ce2f
--- /dev/null
@@ -0,0 +1,5 @@
+#as: -32
+#objdump: -dr --prefix-addresses
+#name: MIPS mul
+#source: mul.s
+#dump: mips1@mul.d
index 3f95822995db03b09496f21f890c65c4925690f5..fd1ce2f53465de0b134f417417ffe72fd1f9f067 100644 (file)
@@ -2,92 +2,4 @@
 #objdump: -dr --prefix-addresses
 #name: MIPS mul
 #source: mul.s
-
-# Test the mul macro.
-
-.*: +file format .*mips.*
-
-Disassembly of section .text:
-0+0000 <[^>]*> multu   a0,a1
-0+0004 <[^>]*> mflo    a0
-       ...
-0+0010 <[^>]*> multu   a1,a2
-0+0014 <[^>]*> mflo    a0
-0+0018 <[^>]*> li      at,0
-0+001c <[^>]*> nop
-0+0020 <[^>]*> mult    a1,at
-0+0024 <[^>]*> mflo    a0
-0+0028 <[^>]*> li      at,1
-0+002c <[^>]*> nop
-0+0030 <[^>]*> mult    a1,at
-0+0034 <[^>]*> mflo    a0
-0+0038 <[^>]*> li      at,0x8000
-0+003c <[^>]*> nop
-0+0040 <[^>]*> mult    a1,at
-0+0044 <[^>]*> mflo    a0
-0+0048 <[^>]*> li      at,-32768
-0+004c <[^>]*> nop
-0+0050 <[^>]*> mult    a1,at
-0+0054 <[^>]*> mflo    a0
-0+0058 <[^>]*> lui     at,0x1
-0+005c <[^>]*> nop
-0+0060 <[^>]*> mult    a1,at
-0+0064 <[^>]*> mflo    a0
-0+0068 <[^>]*> lui     at,0x1
-0+006c <[^>]*> ori     at,at,0xa5a5
-0+0070 <[^>]*> mult    a1,at
-0+0074 <[^>]*> mflo    a0
-       ...
-0+0080 <[^>]*> mult    a0,a1
-0+0084 <[^>]*> mflo    a0
-0+0088 <[^>]*> sra     a0,a0,0x1f
-0+008c <[^>]*> mfhi    at
-0+0090 <[^>]*> beq     a0,at,0+9c <foo\+(0x|)9c>
-0+0094 <[^>]*> nop
-0+0098 <[^>]*> break   (0x0,0x6|0x6)
-0+009c <[^>]*> mflo    a0
-       ...
-0+00a8 <[^>]*> mult    a1,a2
-0+00ac <[^>]*> mflo    a0
-0+00b0 <[^>]*> sra     a0,a0,0x1f
-0+00b4 <[^>]*> mfhi    at
-0+00b8 <[^>]*> beq     a0,at,0+c4 <foo\+(0x|)c4>
-0+00bc <[^>]*> nop
-0+00c0 <[^>]*> break   (0x0,0x6|0x6)
-0+00c4 <[^>]*> mflo    a0
-       ...
-0+00d0 <[^>]*> multu   a0,a1
-0+00d4 <[^>]*> mfhi    at
-0+00d8 <[^>]*> mflo    a0
-0+00dc <[^>]*> beqz    at,0+e8 <foo\+(0x|)e8>
-0+00e0 <[^>]*> nop
-0+00e4 <[^>]*> break   (0x0,0x6|0x6)
-0+00e8 <[^>]*> multu   a1,a2
-0+00ec <[^>]*> mfhi    at
-0+00f0 <[^>]*> mflo    a0
-0+00f4 <[^>]*> beqz    at,0+100 <foo\+(0x|)100>
-0+00f8 <[^>]*> nop
-0+00fc <[^>]*> break   (0x0,0x6|0x6)
-0+0100 <[^>]*> dmultu  a1,a2
-0+0104 <[^>]*> mflo    a0
-0+0108 <[^>]*> li      at,1
-0+010c <[^>]*> nop
-0+0110 <[^>]*> dmult   a1,at
-0+0114 <[^>]*> mflo    a0
-       ...
-0+0120 <[^>]*> dmult   a1,a2
-0+0124 <[^>]*> mflo    a0
-0+0128 <[^>]*> dsra32  a0,a0,0x1f
-0+012c <[^>]*> mfhi    at
-0+0130 <[^>]*> beq     a0,at,0+13c <foo\+(0x|)13c>
-0+0134 <[^>]*> nop
-0+0138 <[^>]*> break   (0x0,0x6|0x6)
-0+013c <[^>]*> mflo    a0
-       ...
-0+0148 <[^>]*> dmultu  a1,a2
-0+014c <[^>]*> mfhi    at
-0+0150 <[^>]*> mflo    a0
-0+0154 <[^>]*> beqz    at,0+160 <foo\+(0x|)160>
-0+0158 <[^>]*> nop
-0+015c <[^>]*> break   (0x0,0x6|0x6)
-       ...
+#dump: mips1@mul.d
diff --git a/gas/testsuite/gas/mips/mips3@mul64.d b/gas/testsuite/gas/mips/mips3@mul64.d
new file mode 100644 (file)
index 0000000..7ca7bdb
--- /dev/null
@@ -0,0 +1,33 @@
+#as: -32
+#objdump: -dr --prefix-addresses
+#name: MIPS 64-bit mul
+#source: mul64.s
+
+# Test the mul macro.
+
+.*: +file format .*mips.*
+
+Disassembly of section .text:
+0+0000 <[^>]*> dmultu  a1,a2
+0+0004 <[^>]*> mflo    a0
+0+0008 <[^>]*> li      at,1
+0+000c <[^>]*> nop
+0+0010 <[^>]*> dmult   a1,at
+0+0014 <[^>]*> mflo    a0
+       ...
+0+0020 <[^>]*> dmult   a1,a2
+0+0024 <[^>]*> mflo    a0
+0+0028 <[^>]*> dsra32  a0,a0,0x1f
+0+002c <[^>]*> mfhi    at
+0+0030 <[^>]*> beq     a0,at,0+3c <foo\+(0x|)3c>
+0+0034 <[^>]*> nop
+0+0038 <[^>]*> break   (0x0,0x6|0x6)
+0+003c <[^>]*> mflo    a0
+       ...
+0+0048 <[^>]*> dmultu  a1,a2
+0+004c <[^>]*> mfhi    at
+0+0050 <[^>]*> mflo    a0
+0+0054 <[^>]*> beqz    at,0+60 <foo\+(0x|)60>
+0+0058 <[^>]*> nop
+0+005c <[^>]*> break   (0x0,0x6|0x6)
+       ...
index fc7c1252d40a513408d36e694d0a92983e9bbe4b..fd1ce2f53465de0b134f417417ffe72fd1f9f067 100644 (file)
@@ -2,4 +2,4 @@
 #objdump: -dr --prefix-addresses
 #name: MIPS mul
 #source: mul.s
-#dump: mips3@mul.d
+#dump: mips1@mul.d
diff --git a/gas/testsuite/gas/mips/mips4@mul64.d b/gas/testsuite/gas/mips/mips4@mul64.d
new file mode 100644 (file)
index 0000000..5e6d8ac
--- /dev/null
@@ -0,0 +1,5 @@
+#as: -32
+#objdump: -dr --prefix-addresses
+#name: MIPS 64-bit mul
+#source: mul64.s
+#dump: mips3@mul64.d
index fc7c1252d40a513408d36e694d0a92983e9bbe4b..fd1ce2f53465de0b134f417417ffe72fd1f9f067 100644 (file)
@@ -2,4 +2,4 @@
 #objdump: -dr --prefix-addresses
 #name: MIPS mul
 #source: mul.s
-#dump: mips3@mul.d
+#dump: mips1@mul.d
diff --git a/gas/testsuite/gas/mips/mips5@mul64.d b/gas/testsuite/gas/mips/mips5@mul64.d
new file mode 100644 (file)
index 0000000..5e6d8ac
--- /dev/null
@@ -0,0 +1,5 @@
+#as: -32
+#objdump: -dr --prefix-addresses
+#name: MIPS 64-bit mul
+#source: mul64.s
+#dump: mips3@mul64.d
index 4484159c30d689cad56193c9cd809d966bcd6fcc..ffd866ab43fea8be1168281f7712ee82863ca730 100644 (file)
@@ -56,23 +56,4 @@ Disassembly of section \.text:
 0+00b8 <[^>]*> beqz    at,0+c4 <foo\+(0x|)c4>
 0+00bc <[^>]*> nop
 0+00c0 <[^>]*> break   (0x0,0x6|0x6)
-0+00c4 <[^>]*> dmultu  a1,a2
-0+00c8 <[^>]*> mflo    a0
-0+00cc <[^>]*> li      at,1
-0+00d0 <[^>]*> dmult   a1,at
-0+00d4 <[^>]*> mflo    a0
-0+00d8 <[^>]*> dmult   a1,a2
-0+00dc <[^>]*> mflo    a0
-0+00e0 <[^>]*> dsra32  a0,a0,0x1f
-0+00e4 <[^>]*> mfhi    at
-0+00e8 <[^>]*> beq     a0,at,0+f4 <foo\+(0x|)f4>
-0+00ec <[^>]*> nop
-0+00f0 <[^>]*> break   (0x0,0x6|0x6)
-0+00f4 <[^>]*> mflo    a0
-0+00f8 <[^>]*> dmultu  a1,a2
-0+00fc <[^>]*> mfhi    at
-0+0100 <[^>]*> mflo    a0
-0+0104 <[^>]*> beqz    at,0+110 <foo\+(0x|)110>
-0+0108 <[^>]*> nop
-0+010c <[^>]*> break   (0x0,0x6|0x6)
        \.\.\.
index b037248c7499b341c294251119895363e5953fa0..75f665d87cd78843f2867e90745dd69a8ae78003 100644 (file)
@@ -17,11 +17,5 @@ foo:
        mulou   $4,$5
        mulou   $4,$5,$6
 
-# Sanity check the 64 bit versions.
-       dmul    $4,$5,$6
-       dmul    $4,$5,1
-       dmulo   $4,$5,$6
-       dmulou  $4,$5,$6
-
        .align  4, 0
        .space  16
diff --git a/gas/testsuite/gas/mips/mul64.d b/gas/testsuite/gas/mips/mul64.d
new file mode 100644 (file)
index 0000000..16a77d7
--- /dev/null
@@ -0,0 +1,29 @@
+#as: -32
+#objdump: -dr --prefix-addresses
+#name: MIPS 64-bit mul
+
+# Test the mul macro.
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+0+0000 <[^>]*> dmultu  a1,a2
+0+0004 <[^>]*> mflo    a0
+0+0008 <[^>]*> li      at,1
+0+000c <[^>]*> dmult   a1,at
+0+0010 <[^>]*> mflo    a0
+0+0014 <[^>]*> dmult   a1,a2
+0+0018 <[^>]*> mflo    a0
+0+001c <[^>]*> dsra32  a0,a0,0x1f
+0+0020 <[^>]*> mfhi    at
+0+0024 <[^>]*> beq     a0,at,0+30 <foo\+(0x|)30>
+0+0028 <[^>]*> nop
+0+002c <[^>]*> break   (0x0,0x6|0x6)
+0+0030 <[^>]*> mflo    a0
+0+0034 <[^>]*> dmultu  a1,a2
+0+0038 <[^>]*> mfhi    at
+0+003c <[^>]*> mflo    a0
+0+0040 <[^>]*> beqz    at,0+4c <foo\+(0x|)4c>
+0+0044 <[^>]*> nop
+0+0048 <[^>]*> break   (0x0,0x6|0x6)
+       \.\.\.
diff --git a/gas/testsuite/gas/mips/mul64.s b/gas/testsuite/gas/mips/mul64.s
new file mode 100644 (file)
index 0000000..407e990
--- /dev/null
@@ -0,0 +1,10 @@
+# Sanity check the 64 bit mul macro versions.
+
+foo:
+       dmul    $4,$5,$6
+       dmul    $4,$5,1
+       dmulo   $4,$5,$6
+       dmulou  $4,$5,$6
+
+       .align  4, 0
+       .space  16
diff --git a/gas/testsuite/gas/mips/octeon@mul64.d b/gas/testsuite/gas/mips/octeon@mul64.d
new file mode 100644 (file)
index 0000000..2cd37a9
--- /dev/null
@@ -0,0 +1,29 @@
+#as: -32
+#objdump: -dr --prefix-addresses
+#name: MIPS 64-bit mul
+#source: mul64.s
+
+# Test the mul macro.
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+0+0000 <[^>]*> dmul    a0,a1,a2
+0+0004 <[^>]*> li      at,1
+0+0008 <[^>]*> dmult   a1,at
+0+000c <[^>]*> mflo    a0
+0+0010 <[^>]*> dmult   a1,a2
+0+0014 <[^>]*> mflo    a0
+0+0018 <[^>]*> dsra32  a0,a0,0x1f
+0+001c <[^>]*> mfhi    at
+0+0020 <[^>]*> beq     a0,at,0+2c <foo\+(0x|)2c>
+0+0024 <[^>]*> nop
+0+0028 <[^>]*> break   (0x0,0x6|0x6)
+0+002c <[^>]*> mflo    a0
+0+0030 <[^>]*> dmultu  a1,a2
+0+0034 <[^>]*> mfhi    at
+0+0038 <[^>]*> mflo    a0
+0+003c <[^>]*> beqz    at,0+48 <foo\+(0x|)48>
+0+0040 <[^>]*> nop
+0+0044 <[^>]*> break   (0x0,0x6|0x6)
+       \.\.\.
index 51b7c4bd325fcfd56619b373feb4b6168bf19caf..9990e362e4884533a3119786a50c202c0485d99b 100644 (file)
@@ -2,80 +2,4 @@
 #objdump: -dr --prefix-addresses
 #name: MIPS mul
 #source: mul.s
-
-# Test the mul macro.
-
-.*: +file format .*mips.*
-
-Disassembly of section .text:
-0+0000 <[^>]*> multu   a0,a1
-0+0004 <[^>]*> mflo    a0
-0+0008 <[^>]*> multu   a1,a2
-0+000c <[^>]*> mflo    a0
-0+0010 <[^>]*> li      at,0
-0+0014 <[^>]*> mult    a1,at
-0+0018 <[^>]*> mflo    a0
-0+001c <[^>]*> li      at,1
-0+0020 <[^>]*> mult    a1,at
-0+0024 <[^>]*> mflo    a0
-0+0028 <[^>]*> li      at,0x8000
-0+002c <[^>]*> mult    a1,at
-0+0030 <[^>]*> mflo    a0
-0+0034 <[^>]*> li      at,-32768
-0+0038 <[^>]*> mult    a1,at
-0+003c <[^>]*> mflo    a0
-0+0040 <[^>]*> lui     at,0x1
-0+0044 <[^>]*> mult    a1,at
-0+0048 <[^>]*> mflo    a0
-0+004c <[^>]*> lui     at,0x1
-0+0050 <[^>]*> ori     at,at,0xa5a5
-0+0054 <[^>]*> mult    a1,at
-0+0058 <[^>]*> mflo    a0
-0+005c <[^>]*> mult    a0,a1
-0+0060 <[^>]*> mflo    a0
-0+0064 <[^>]*> sra     a0,a0,0x1f
-0+0068 <[^>]*> mfhi    at
-0+006c <[^>]*> beq     a0,at,0+78 <foo\+(0x|)78>
-0+0070 <[^>]*> nop
-0+0074 <[^>]*> break   (0x0,0x6|0x6)
-0+0078 <[^>]*> mflo    a0
-0+007c <[^>]*> mult    a1,a2
-0+0080 <[^>]*> mflo    a0
-0+0084 <[^>]*> sra     a0,a0,0x1f
-0+0088 <[^>]*> mfhi    at
-0+008c <[^>]*> beq     a0,at,0+98 <foo\+(0x|)98>
-0+0090 <[^>]*> nop
-0+0094 <[^>]*> break   (0x0,0x6|0x6)
-0+0098 <[^>]*> mflo    a0
-0+009c <[^>]*> multu   a0,a1
-0+00a0 <[^>]*> mfhi    at
-0+00a4 <[^>]*> mflo    a0
-0+00a8 <[^>]*> beqz    at,0+b4 <foo\+(0x|)b4>
-0+00ac <[^>]*> nop
-0+00b0 <[^>]*> break   (0x0,0x6|0x6)
-0+00b4 <[^>]*> multu   a1,a2
-0+00b8 <[^>]*> mfhi    at
-0+00bc <[^>]*> mflo    a0
-0+00c0 <[^>]*> beqz    at,0+cc <foo\+(0x|)cc>
-0+00c4 <[^>]*> nop
-0+00c8 <[^>]*> break   (0x0,0x6|0x6)
-0+00cc <[^>]*> dmultu  a1,a2
-0+00d0 <[^>]*> mflo    a0
-0+00d4 <[^>]*> li      at,1
-0+00d8 <[^>]*> dmult   a1,at
-0+00dc <[^>]*> mflo    a0
-0+00e0 <[^>]*> dmult   a1,a2
-0+00e4 <[^>]*> mflo    a0
-0+00e8 <[^>]*> dsra32  a0,a0,0x1f
-0+00ec <[^>]*> mfhi    at
-0+00f0 <[^>]*> beq     a0,at,0+fc <foo\+(0x|)fc>
-0+00f4 <[^>]*> nop
-0+00f8 <[^>]*> break   (0x0,0x6|0x6)
-0+00fc <[^>]*> mflo    a0
-0+0100 <[^>]*> dmultu  a1,a2
-0+0104 <[^>]*> mfhi    at
-0+0108 <[^>]*> mflo    a0
-0+010c <[^>]*> beqz    at,0+118 <foo\+(0x|)118>
-0+0110 <[^>]*> nop
-0+0114 <[^>]*> break   (0x0,0x6|0x6)
-       ...
+#dump: allegrex@mul.d
diff --git a/gas/testsuite/gas/mips/r10000@mul64.d b/gas/testsuite/gas/mips/r10000@mul64.d
new file mode 100644 (file)
index 0000000..4227e42
--- /dev/null
@@ -0,0 +1,30 @@
+#as: -32
+#objdump: -dr --prefix-addresses
+#name: MIPS 64-bit mul
+#source: mul64.s
+
+# Test the mul macro.
+
+.*: +file format .*mips.*
+
+Disassembly of section .text:
+0+0000 <[^>]*> dmultu  a1,a2
+0+0004 <[^>]*> mflo    a0
+0+0008 <[^>]*> li      at,1
+0+000c <[^>]*> dmult   a1,at
+0+0010 <[^>]*> mflo    a0
+0+0014 <[^>]*> dmult   a1,a2
+0+0018 <[^>]*> mflo    a0
+0+001c <[^>]*> dsra32  a0,a0,0x1f
+0+0020 <[^>]*> mfhi    at
+0+0024 <[^>]*> beq     a0,at,0+30 <foo\+(0x|)30>
+0+0028 <[^>]*> nop
+0+002c <[^>]*> break   (0x0,0x6|0x6)
+0+0030 <[^>]*> mflo    a0
+0+0034 <[^>]*> dmultu  a1,a2
+0+0038 <[^>]*> mfhi    at
+0+003c <[^>]*> mflo    a0
+0+0040 <[^>]*> beqz    at,0+4c <foo\+(0x|)4c>
+0+0044 <[^>]*> nop
+0+0048 <[^>]*> break   (0x0,0x6|0x6)
+       ...
diff --git a/gas/testsuite/gas/mips/r3000@mul.d b/gas/testsuite/gas/mips/r3000@mul.d
new file mode 100644 (file)
index 0000000..fd1ce2f
--- /dev/null
@@ -0,0 +1,5 @@
+#as: -32
+#objdump: -dr --prefix-addresses
+#name: MIPS mul
+#source: mul.s
+#dump: mips1@mul.d
diff --git a/gas/testsuite/gas/mips/r3900@mul.d b/gas/testsuite/gas/mips/r3900@mul.d
new file mode 100644 (file)
index 0000000..fd1ce2f
--- /dev/null
@@ -0,0 +1,5 @@
+#as: -32
+#objdump: -dr --prefix-addresses
+#name: MIPS mul
+#source: mul.s
+#dump: mips1@mul.d
index fc7c1252d40a513408d36e694d0a92983e9bbe4b..fd1ce2f53465de0b134f417417ffe72fd1f9f067 100644 (file)
@@ -2,4 +2,4 @@
 #objdump: -dr --prefix-addresses
 #name: MIPS mul
 #source: mul.s
-#dump: mips3@mul.d
+#dump: mips1@mul.d
diff --git a/gas/testsuite/gas/mips/r4000@mul64.d b/gas/testsuite/gas/mips/r4000@mul64.d
new file mode 100644 (file)
index 0000000..5e6d8ac
--- /dev/null
@@ -0,0 +1,5 @@
+#as: -32
+#objdump: -dr --prefix-addresses
+#name: MIPS 64-bit mul
+#source: mul64.s
+#dump: mips3@mul64.d
similarity index 71%
rename from gas/testsuite/gas/mips/octeon@mul.d
rename to gas/testsuite/gas/mips/r5900@mul.d
index 4e52718954d152cdc3e153fbdb685b82e9fdde64..1d643fdaabbd2c8cf0c166b6b97022e6d794687c 100644 (file)
@@ -8,8 +8,8 @@
 .*: +file format .*mips.*
 
 Disassembly of section \.text:
-0+0000 <[^>]*> mul     a0,a0,a1
-0+0004 <[^>]*> mul     a0,a1,a2
+0+0000 <[^>]*> multu   a0,a0,a1
+0+0004 <[^>]*> multu   a0,a1,a2
 0+0008 <[^>]*> li      at,0
 0+000c <[^>]*> mult    a1,at
 0+0010 <[^>]*> mflo    a0
@@ -57,22 +57,4 @@ Disassembly of section \.text:
 0+00b8 <[^>]*> beqz    at,0+c4 <foo\+(0x|)c4>
 0+00bc <[^>]*> nop
 0+00c0 <[^>]*> break   (0x0,0x6|0x6)
-0+00c4 <[^>]*> dmul    a0,a1,a2
-0+00c8 <[^>]*> li      at,1
-0+00cc <[^>]*> dmult   a1,at
-0+00d0 <[^>]*> mflo    a0
-0+00d4 <[^>]*> dmult   a1,a2
-0+00d8 <[^>]*> mflo    a0
-0+00dc <[^>]*> dsra32  a0,a0,0x1f
-0+00e0 <[^>]*> mfhi    at
-0+00e4 <[^>]*> beq     a0,at,0+f0 <foo\+(0x|)f0>
-0+00e8 <[^>]*> nop
-0+00ec <[^>]*> break   (0x0,0x6|0x6)
-0+00f0 <[^>]*> mflo    a0
-0+00f4 <[^>]*> dmultu  a1,a2
-0+00f8 <[^>]*> mfhi    at
-0+00fc <[^>]*> mflo    a0
-0+0100 <[^>]*> beqz    at,0+10c <foo\+(0x|)10c>
-0+0104 <[^>]*> nop
-0+0108 <[^>]*> break   (0x0,0x6|0x6)
        \.\.\.
index c03407d58f187a49e3b94480b9fcc847a54cc99b..0e49a047a410323e8026374204bf5ba4c3e891d0 100644 (file)
@@ -66,26 +66,4 @@ Disassembly of section \.text:
 0+00ec <[^>]*> beqz    at,0+f8 <foo\+(0x|)f8>
 0+00f0 <[^>]*> nop
 0+00f4 <[^>]*> break   (0x0,0x6|0x6)
-0+00f8 <[^>]*> dmultu  a1,a2
-0+00fc <[^>]*> mflo    a0
-0+0100 <[^>]*> li      at,1
-0+0104 <[^>]*> nop
-0+0108 <[^>]*> dmult   a1,at
-0+010c <[^>]*> mflo    a0
-       \.\.\.
-0+0118 <[^>]*> dmult   a1,a2
-0+011c <[^>]*> mflo    a0
-0+0120 <[^>]*> dsra32  a0,a0,0x1f
-0+0124 <[^>]*> mfhi    at
-0+0128 <[^>]*> beq     a0,at,0+134 <foo\+(0x|)134>
-0+012c <[^>]*> nop
-0+0130 <[^>]*> break   (0x0,0x6|0x6)
-0+0134 <[^>]*> mflo    a0
-       \.\.\.
-0+0140 <[^>]*> dmultu  a1,a2
-0+0144 <[^>]*> mfhi    at
-0+0148 <[^>]*> mflo    a0
-0+014c <[^>]*> beqz    at,0+158 <foo\+(0x|)158>
-0+0150 <[^>]*> nop
-0+0154 <[^>]*> break   (0x0,0x6|0x6)
        \.\.\.
diff --git a/gas/testsuite/gas/mips/vr5400@mul64.d b/gas/testsuite/gas/mips/vr5400@mul64.d
new file mode 100644 (file)
index 0000000..0594ee2
--- /dev/null
@@ -0,0 +1,33 @@
+#as: -32
+#objdump: -dr --prefix-addresses
+#name: MIPS 64-bit mul
+#source: mul64.s
+
+# Test the mul macro.
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+0+0000 <[^>]*> dmultu  a1,a2
+0+0004 <[^>]*> mflo    a0
+0+0008 <[^>]*> li      at,1
+0+000c <[^>]*> nop
+0+0010 <[^>]*> dmult   a1,at
+0+0014 <[^>]*> mflo    a0
+       \.\.\.
+0+0020 <[^>]*> dmult   a1,a2
+0+0024 <[^>]*> mflo    a0
+0+0028 <[^>]*> dsra32  a0,a0,0x1f
+0+002c <[^>]*> mfhi    at
+0+0030 <[^>]*> beq     a0,at,0+3c <foo\+(0x|)3c>
+0+0034 <[^>]*> nop
+0+0038 <[^>]*> break   (0x0,0x6|0x6)
+0+003c <[^>]*> mflo    a0
+       \.\.\.
+0+0048 <[^>]*> dmultu  a1,a2
+0+004c <[^>]*> mfhi    at
+0+0050 <[^>]*> mflo    a0
+0+0054 <[^>]*> beqz    at,0+60 <foo\+(0x|)60>
+0+0058 <[^>]*> nop
+0+005c <[^>]*> break   (0x0,0x6|0x6)
+       \.\.\.