[binutils-gdb] MIPS: Swap INSN_MULT opcode flag for INSN_DIV

Maciej W. Rozycki macro@sourceware.org
Sun Nov 15 11:12:04 GMT 2026


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=91997d009f8800096547009e073c0d9619a5c2ce

commit 91997d009f8800096547009e073c0d9619a5c2ce
Author: Maciej W. Rozycki <macro@orcam.me.uk>
Date:   Sun Nov 15 10:53:38 2026 +0000

    MIPS: Swap INSN_MULT opcode flag for INSN_DIV
    
    Remove the peculiarity of the INSN_MULT opcode flag, which is the only
    one that lifts rather than setting a scheduling restriction for the
    entry it applies to, and drop the flag in favour to INSN_DIV.
    
    That is remove INSN_MULT from opcodes that on Toshiba TX39 are allowed
    to be preceded by a HI and/or LO register read operation as the first or
    second instruction ahead.  Instead place INSN_DIV across all integer
    division opcodes and let individual ISA or CPU type setting determine
    interlocking for these instructions.
    
    This lifts the need for `insns_between' to have special handling of
    INSN_MULT and removes the inconsistency across the opcode table where
    individual multiplication instructions do or do not have the flag set
    whether said instructions are or are not relevant to the Toshiba TX39.
    
    This also enables interlock optimization for MTHI and MFLO instructions
    which, unlike with several legacy MIPS ISA implementations, are allowed
    to be immediately preceded a HI and/or LO register read operation other
    than for the purpose of division on the Toshiba TX39, since only DIV and
    DIVU instructions lack this interlock.  Add a test to cover this data
    dependency for MFHI/MFLO vs MTHI/MTLO.

Diff:
---
 gas/config/tc-mips.c                    | 16 +++----
 gas/testsuite/gas/mips/hilo.d           | 17 +++++++
 gas/testsuite/gas/mips/hilo.s           | 15 ++++++
 gas/testsuite/gas/mips/micromips@hilo.d | 18 +++++++
 gas/testsuite/gas/mips/mips.exp         |  3 ++
 gas/testsuite/gas/mips/mips1@hilo.d     | 22 +++++++++
 gas/testsuite/gas/mips/mips2@hilo.d     |  5 ++
 gas/testsuite/gas/mips/mips3@hilo.d     |  5 ++
 gas/testsuite/gas/mips/mips4@hilo.d     |  5 ++
 gas/testsuite/gas/mips/mips5@hilo.d     |  5 ++
 gas/testsuite/gas/mips/r3000@hilo.d     |  5 ++
 gas/testsuite/gas/mips/r4000@hilo.d     |  5 ++
 gas/testsuite/gas/mips/vr5400@hilo.d    |  5 ++
 include/opcode/mips.h                   |  4 +-
 opcodes/mips-opc.c                      | 84 ++++++++++++++++-----------------
 15 files changed, 161 insertions(+), 53 deletions(-)

diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index b9e152c81b7..5369866a050 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -584,9 +584,9 @@ static int mips_32bitmode = 0;
    || mips_opts.micromips                             \
    )
 
-/* True if MFLO and MFHI can be immediately followed by multiplication
-   instructions.  This applies to instructions marked INSN_MULT.  */
-#define hilo_mul_interlocks				\
+/* True if MFLO and MFHI can be immediately followed by non-division
+   instructions.  This applies to instructions not marked INSN_DIV.  */
+#define hilo_nondiv_interlocks				\
   (hilo_interlocks					\
    || mips_opts.arch == CPU_R3900			\
    )
@@ -6709,17 +6709,15 @@ insns_between (const struct mips_cl_insn *insn1,
   unsigned long pinfo1, pinfo2;
   unsigned int mask;
 
-  /* If INFO2 is null, pessimistically assume that all flags except for
-     INSN_MULT are set for the second instruction.  We need to exclude
-     this flag because, exceptionally, it marks instructions that do not
-     have a pipeline hazard avoidance requirement.  */
+  /* If INFO2 is null, pessimistically assume that all flags are set for
+     the second instruction.  */
   pinfo1 = insn1->insn_mo->pinfo;
-  pinfo2 = insn2 ? insn2->insn_mo->pinfo : ~(unsigned long) INSN_MULT;
+  pinfo2 = insn2 ? insn2->insn_mo->pinfo : ~0U;
 
   /* For some legacy ISA targets, write-after-read dependencies on the HI
      and LO registers must be separated by at least two instructions.  */
   if (!(hilo_interlocks
-	|| (hilo_mul_interlocks && (pinfo2 & INSN_MULT))))
+	|| (hilo_nondiv_interlocks && !(pinfo2 & INSN_DIV))))
     {
       if ((pinfo1 & INSN_READ_LO) && (pinfo2 & INSN_WRITE_LO))
 	return 2;
diff --git a/gas/testsuite/gas/mips/hilo.d b/gas/testsuite/gas/mips/hilo.d
new file mode 100644
index 00000000000..0003ca6a9f1
--- /dev/null
+++ b/gas/testsuite/gas/mips/hilo.d
@@ -0,0 +1,17 @@
+#as: -32
+#objdump: -drz --prefix-addresses --show-raw-insn
+#name: MIPS HI/LO moves
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 00001012 	mflo	v0
+[0-9a-f]+ <[^>]*> 00600013 	mtlo	v1
+[0-9a-f]+ <[^>]*> 00002010 	mfhi	a0
+[0-9a-f]+ <[^>]*> 00a00011 	mthi	a1
+[0-9a-f]+ <[^>]*> 00003012 	mflo	a2
+[0-9a-f]+ <[^>]*> 00e00011 	mthi	a3
+[0-9a-f]+ <[^>]*> 00008010 	mfhi	s0
+[0-9a-f]+ <[^>]*> 02200013 	mtlo	s1
+[0-9a-f]+ <[^>]*> 00009012 	mflo	s2
+#pass
diff --git a/gas/testsuite/gas/mips/hilo.s b/gas/testsuite/gas/mips/hilo.s
new file mode 100644
index 00000000000..134bcefe69d
--- /dev/null
+++ b/gas/testsuite/gas/mips/hilo.s
@@ -0,0 +1,15 @@
+# Source file used to test the moves to/from HI/LO registers.
+
+	.text
+	.ent	foo
+foo:
+	mflo	$2
+	mtlo	$3
+	mfhi	$4
+	mthi	$5
+	mflo	$6
+	mthi	$7
+	mfhi	$16
+	mtlo	$17
+	mflo	$18
+	.end	foo
diff --git a/gas/testsuite/gas/mips/micromips@hilo.d b/gas/testsuite/gas/mips/micromips@hilo.d
new file mode 100644
index 00000000000..40f17aa6faa
--- /dev/null
+++ b/gas/testsuite/gas/mips/micromips@hilo.d
@@ -0,0 +1,18 @@
+#as: -32
+#objdump: -drz --prefix-addresses --show-raw-insn
+#name: MIPS HI/LO moves
+#source: hilo.s
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 4642      	mflo	v0
+[0-9a-f]+ <[^>]*> 0003 3d7c 	mtlo	v1
+[0-9a-f]+ <[^>]*> 4604      	mfhi	a0
+[0-9a-f]+ <[^>]*> 0005 2d7c 	mthi	a1
+[0-9a-f]+ <[^>]*> 4646      	mflo	a2
+[0-9a-f]+ <[^>]*> 0007 2d7c 	mthi	a3
+[0-9a-f]+ <[^>]*> 4610      	mfhi	s0
+[0-9a-f]+ <[^>]*> 0011 3d7c 	mtlo	s1
+[0-9a-f]+ <[^>]*> 4652      	mflo	s2
+#pass
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index d957396bc70..bff482dbae2 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -795,6 +795,9 @@ if { [istarget mips*-*-vxworks*] } {
     run_dump_test_arches "24k-triple-stores-11" \
 	    				[mips_arch_list_matching mips1]
 
+    run_dump_test_arches "hilo"		[mips_arch_list_matching mips1 \
+						!mips32r6]
+
     run_dump_test_arches "jal-svr4pic${imips}" \
 					[mips_arch_list_matching mips1]
     run_dump_test_arches "jal-svr4pic-noreorder${imips}" \
diff --git a/gas/testsuite/gas/mips/mips1@hilo.d b/gas/testsuite/gas/mips/mips1@hilo.d
new file mode 100644
index 00000000000..d234cc98e4f
--- /dev/null
+++ b/gas/testsuite/gas/mips/mips1@hilo.d
@@ -0,0 +1,22 @@
+#as: -32
+#objdump: -drz --prefix-addresses --show-raw-insn
+#name: MIPS HI/LO moves
+#source: hilo.s
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 00001012 	mflo	v0
+[0-9a-f]+ <[^>]*> 00000000 	nop
+[0-9a-f]+ <[^>]*> 00000000 	nop
+[0-9a-f]+ <[^>]*> 00600013 	mtlo	v1
+[0-9a-f]+ <[^>]*> 00002010 	mfhi	a0
+[0-9a-f]+ <[^>]*> 00000000 	nop
+[0-9a-f]+ <[^>]*> 00000000 	nop
+[0-9a-f]+ <[^>]*> 00a00011 	mthi	a1
+[0-9a-f]+ <[^>]*> 00003012 	mflo	a2
+[0-9a-f]+ <[^>]*> 00e00011 	mthi	a3
+[0-9a-f]+ <[^>]*> 00008010 	mfhi	s0
+[0-9a-f]+ <[^>]*> 02200013 	mtlo	s1
+[0-9a-f]+ <[^>]*> 00009012 	mflo	s2
+#pass
diff --git a/gas/testsuite/gas/mips/mips2@hilo.d b/gas/testsuite/gas/mips/mips2@hilo.d
new file mode 100644
index 00000000000..f1c91d2cb2a
--- /dev/null
+++ b/gas/testsuite/gas/mips/mips2@hilo.d
@@ -0,0 +1,5 @@
+#as: -32
+#objdump: -drz --prefix-addresses --show-raw-insn
+#name: MIPS HI/LO moves
+#source: hilo.s
+#dump: mips1@hilo.d
diff --git a/gas/testsuite/gas/mips/mips3@hilo.d b/gas/testsuite/gas/mips/mips3@hilo.d
new file mode 100644
index 00000000000..f1c91d2cb2a
--- /dev/null
+++ b/gas/testsuite/gas/mips/mips3@hilo.d
@@ -0,0 +1,5 @@
+#as: -32
+#objdump: -drz --prefix-addresses --show-raw-insn
+#name: MIPS HI/LO moves
+#source: hilo.s
+#dump: mips1@hilo.d
diff --git a/gas/testsuite/gas/mips/mips4@hilo.d b/gas/testsuite/gas/mips/mips4@hilo.d
new file mode 100644
index 00000000000..f1c91d2cb2a
--- /dev/null
+++ b/gas/testsuite/gas/mips/mips4@hilo.d
@@ -0,0 +1,5 @@
+#as: -32
+#objdump: -drz --prefix-addresses --show-raw-insn
+#name: MIPS HI/LO moves
+#source: hilo.s
+#dump: mips1@hilo.d
diff --git a/gas/testsuite/gas/mips/mips5@hilo.d b/gas/testsuite/gas/mips/mips5@hilo.d
new file mode 100644
index 00000000000..f1c91d2cb2a
--- /dev/null
+++ b/gas/testsuite/gas/mips/mips5@hilo.d
@@ -0,0 +1,5 @@
+#as: -32
+#objdump: -drz --prefix-addresses --show-raw-insn
+#name: MIPS HI/LO moves
+#source: hilo.s
+#dump: mips1@hilo.d
diff --git a/gas/testsuite/gas/mips/r3000@hilo.d b/gas/testsuite/gas/mips/r3000@hilo.d
new file mode 100644
index 00000000000..f1c91d2cb2a
--- /dev/null
+++ b/gas/testsuite/gas/mips/r3000@hilo.d
@@ -0,0 +1,5 @@
+#as: -32
+#objdump: -drz --prefix-addresses --show-raw-insn
+#name: MIPS HI/LO moves
+#source: hilo.s
+#dump: mips1@hilo.d
diff --git a/gas/testsuite/gas/mips/r4000@hilo.d b/gas/testsuite/gas/mips/r4000@hilo.d
new file mode 100644
index 00000000000..f1c91d2cb2a
--- /dev/null
+++ b/gas/testsuite/gas/mips/r4000@hilo.d
@@ -0,0 +1,5 @@
+#as: -32
+#objdump: -drz --prefix-addresses --show-raw-insn
+#name: MIPS HI/LO moves
+#source: hilo.s
+#dump: mips1@hilo.d
diff --git a/gas/testsuite/gas/mips/vr5400@hilo.d b/gas/testsuite/gas/mips/vr5400@hilo.d
new file mode 100644
index 00000000000..f1c91d2cb2a
--- /dev/null
+++ b/gas/testsuite/gas/mips/vr5400@hilo.d
@@ -0,0 +1,5 @@
+#as: -32
+#objdump: -drz --prefix-addresses --show-raw-insn
+#name: MIPS HI/LO moves
+#source: hilo.s
+#dump: mips1@hilo.d
diff --git a/include/opcode/mips.h b/include/opcode/mips.h
index 1edacd88499..76a0f65fafc 100644
--- a/include/opcode/mips.h
+++ b/include/opcode/mips.h
@@ -827,8 +827,8 @@ mips_opcode_32bit_p (const struct mips_opcode *mo)
 #define FP_S			    0x01000000
 /* Instruction uses double precision floating point.  */
 #define FP_D			    0x02000000
-/* Instruction is part of the tx39's integer multiply family.    */
-#define INSN_MULT                   0x04000000
+/* Instruction is integer division.  */
+#define INSN_DIV		    0x04000000
 /* Reads general purpose register 24.  */
 #define INSN_READ_GPR_24            0x08000000
 /* Writes to general purpose register 24.  */
diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c
index 5479f4ea771..66a57dbd885 100644
--- a/opcodes/mips-opc.c
+++ b/opcodes/mips-opc.c
@@ -270,7 +270,7 @@ decode_mips_operand (const char *p)
 #define WR_SP	INSN2_WRITE_SP
 #define MOD_SP	(RD_SP|WR_SP)
 
-#define IS_M    INSN_MULT
+#define IS_D    INSN_DIV
 
 #define WR_MACC INSN2_WRITE_MDMX_ACC
 #define RD_MACC INSN2_READ_MDMX_ACC
@@ -1046,15 +1046,15 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"dextm",		"t,r,+A,+G",	0x7c000001, 0xfc00003f, WR_1|RD_2,    		0,		I65,		0,	0 },
 {"dextu",		"t,r,+E,+H",	0x7c000002, 0xfc00003f, WR_1|RD_2,    		0,		I65,		0,	0 },
 /* For ddiv, see the comments about div.  */
-{"dmod",		"d,s,t",	0x000000de, 0xfc0007ff, WR_1|RD_2|RD_3,		0,		I69,		0,	0 },
-{"ddiv",		"d,s,t",	0x0000009e, 0xfc0007ff, WR_1|RD_2|RD_3,		0,		I69,		0,	0 },
-{"ddiv",		"z,s,t",	0x0000001e, 0xfc00ffff, RD_2|RD_3|WR_HILO,      0,		I3,		0,	M32|I69 },
+{"dmod",		"d,s,t",	0x000000de, 0xfc0007ff, WR_1|RD_2|RD_3|IS_D,	0,		I69,		0,	0 },
+{"ddiv",		"d,s,t",	0x0000009e, 0xfc0007ff, WR_1|RD_2|RD_3|IS_D,	0,		I69,		0,	0 },
+{"ddiv",		"z,s,t",	0x0000001e, 0xfc00ffff, RD_2|RD_3|WR_HILO|IS_D,	0,		I3,		0,	M32|I69 },
 {"ddiv",		"d,v,t",	0,    (int) M_DDIV_3,	INSN_MACRO,		0,		I3,		0,	M32|I69 },
 {"ddiv",		"d,v,I",	0,    (int) M_DDIV_3I,	INSN_MACRO,		0,		I3,		0,	M32|I69 },
 /* For ddivu, see the comments about div.  */
-{"dmodu",		"d,s,t",	0x000000df, 0xfc0007ff, WR_1|RD_2|RD_3,		0,		I69,		0,	0 },
-{"ddivu",		"d,s,t",	0x0000009f, 0xfc0007ff, WR_1|RD_2|RD_3,		0,		I69,		0,	0 },
-{"ddivu",		"z,s,t",	0x0000001f, 0xfc00ffff, RD_2|RD_3|WR_HILO,      0,		I3,		0,	M32|I69 },
+{"dmodu",		"d,s,t",	0x000000df, 0xfc0007ff, WR_1|RD_2|RD_3|IS_D,	0,		I69,		0,	0 },
+{"ddivu",		"d,s,t",	0x0000009f, 0xfc0007ff, WR_1|RD_2|RD_3|IS_D,	0,		I69,		0,	0 },
+{"ddivu",		"z,s,t",	0x0000001f, 0xfc00ffff, RD_2|RD_3|WR_HILO|IS_D,	0,		I3,		0,	M32|I69 },
 {"ddivu",		"d,v,t",	0,    (int) M_DDIVU_3,	INSN_MACRO,		0,		I3,		0,	M32|I69 },
 {"ddivu",		"d,v,I",	0,    (int) M_DDIVU_3I,	INSN_MACRO,		0,		I3,		0,	M32|I69 },
 {"di",			"",		0x42000039, 0xffffffff,	WR_C0,			0,		EE,		0,	0 },
@@ -1069,26 +1069,26 @@ const struct mips_opcode mips_builtin_opcodes[] =
    though the first operand appeared twice (the first operand is both
    a source and a destination).  To get the div machine instruction,
    you must use an explicit destination of $0.  */
-{"mod",			"d,v,t",	0x000000da, 0xfc0007ff, WR_1|RD_2|RD_3, 	0,		I37,		0,	0},
-{"modu",		"d,v,t",	0x000000db, 0xfc0007ff, WR_1|RD_2|RD_3, 	0,		I37,		0,	0},
-{"div",			"d,v,t",	0x0000009a, 0xfc0007ff, WR_1|RD_2|RD_3, 	0,		I37,		0,	0},
-{"div",			"z,s,t",	0x0000001a, 0xfc00ffff, RD_2|RD_3|WR_HILO,      0,		I1,		0,	I37 },
-{"div",			"z,t",		0x0000001a, 0xffe0ffff, RD_2|WR_HILO,		0,		I1,		0,	I37 },
+{"mod",			"d,v,t",	0x000000da, 0xfc0007ff, WR_1|RD_2|RD_3|IS_D,	0,		I37,		0,	0 },
+{"modu",		"d,v,t",	0x000000db, 0xfc0007ff, WR_1|RD_2|RD_3|IS_D,	0,		I37,		0,	0 },
+{"div",			"d,v,t",	0x0000009a, 0xfc0007ff, WR_1|RD_2|RD_3|IS_D,	0,		I37,		0,	0 },
+{"div",			"z,s,t",	0x0000001a, 0xfc00ffff, RD_2|RD_3|WR_HILO|IS_D,	0,		I1,		0,	I37 },
+{"div",			"z,t",		0x0000001a, 0xffe0ffff, RD_2|WR_HILO|IS_D,	0,		I1,		0,	I37 },
 {"div",			"d,v,t",	0,    (int) M_DIV_3,	INSN_MACRO,		0,		I1,		0,	I37 },
 {"div",			"d,v,I",	0,    (int) M_DIV_3I,	INSN_MACRO,		0,		I1,		0,	I37 },
-{"div1",		"z,s,t",	0x7000001a, 0xfc00ffff, RD_2|RD_3|WR_HILO,      0,		EE,		0,	0 },
-{"div1",		"z,t",		0x7000001a, 0xffe0ffff, RD_2|WR_HILO,		0,		EE,		0,	0 },
+{"div1",		"z,s,t",	0x7000001a, 0xfc00ffff, RD_2|RD_3|WR_HILO|IS_D,	0,		EE,		0,	0 },
+{"div1",		"z,t",		0x7000001a, 0xffe0ffff, RD_2|WR_HILO|IS_D,	0,		EE,		0,	0 },
 {"div.d",		"D,V,T",	0x46200003, 0xffe0003f,	WR_1|RD_2|RD_3|FP_D,	0,		I1,		0,	SF },
 {"div.s",		"D,V,T",	0x46000003, 0xffe0003f,	WR_1|RD_2|RD_3|FP_S,	0,		I1,		0,	0 },
 {"div.ps",		"D,V,T",	0x46c00003, 0xffe0003f,	WR_1|RD_2|RD_3|FP_D,	0,		SB1,		0,	0 },
 /* For divu, see the comments about div.  */
-{"divu",		"d,v,t",	0x0000009b, 0xfc0007ff, WR_1|RD_2|RD_3, 	0,		I37,		0,	0},
-{"divu",		"z,s,t",	0x0000001b, 0xfc00ffff, RD_2|RD_3|WR_HILO,      0,		I1,		0,	I37 },
-{"divu",		"z,t",		0x0000001b, 0xffe0ffff, RD_2|WR_HILO,		0,		I1,		0,	I37 },
+{"divu",		"d,v,t",	0x0000009b, 0xfc0007ff, WR_1|RD_2|RD_3|IS_D,	0,		I37,		0,	0},
+{"divu",		"z,s,t",	0x0000001b, 0xfc00ffff, RD_2|RD_3|WR_HILO|IS_D,	0,		I1,		0,	I37 },
+{"divu",		"z,t",		0x0000001b, 0xffe0ffff, RD_2|WR_HILO|IS_D,	0,		I1,		0,	I37 },
 {"divu",		"d,v,t",	0,    (int) M_DIVU_3,	INSN_MACRO,		0,		I1,		0,	I37 },
 {"divu",		"d,v,I",	0,    (int) M_DIVU_3I,	INSN_MACRO,		0,		I1,		0,	I37 },
-{"divu1",		"z,s,t",	0x7000001b, 0xfc00ffff, RD_2|RD_3|WR_HILO,      0,		EE,		0,	0 },
-{"divu1",		"z,t",		0x7000001b, 0xffe0ffff, RD_2|WR_HILO,		0,		EE,		0,	0 },
+{"divu1",		"z,s,t",	0x7000001b, 0xfc00ffff, RD_2|RD_3|WR_HILO|IS_D,	0,		EE,		0,	0 },
+{"divu1",		"z,t",		0x7000001b, 0xffe0ffff, RD_2|WR_HILO|IS_D,	0,		EE,		0,	0 },
 {"dla",			"t,A(b)",	0,    (int) M_DLA_AB,	INSN_MACRO,		0,		I3,		0,	0 },
 {"dlca",		"t,A(b)",	0,    (int) M_DLCA_AB,	INSN_MACRO,		0,		I3,		0,	0 },
 {"dli",			"t,j",		0x24000000, 0xffe00000, WR_1,			0,		I3,		0,	0 }, /* addiu */
@@ -1135,10 +1135,10 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"dneg",		"d,w",		0x0000002e, 0xffe007ff,	WR_1|RD_2,		0,		I3,		0,	0 }, /* dsub 0 */
 {"dnegu",		"d,w",		0x0000002f, 0xffe007ff,	WR_1|RD_2,		0,		I3,		0,	0 }, /* dsubu 0*/
 {"dpop",		"d,v",		0x7000002d, 0xfc1f07ff, WR_1|RD_2,		0,		IOCT,		0,	0 },
-{"drem",		"z,s,t",	0x0000001e, 0xfc00ffff, RD_2|RD_3|WR_HILO,      0,		I3,		0,	M32|I69 },
+{"drem",		"z,s,t",	0x0000001e, 0xfc00ffff, RD_2|RD_3|WR_HILO|IS_D,	0,		I3,		0,	M32|I69 },
 {"drem",		"d,v,t",	0,    (int) M_DREM_3,	INSN_MACRO,		0,		I3,		0,	M32|I69 },
 {"drem",		"d,v,I",	0,    (int) M_DREM_3I,	INSN_MACRO,		0,		I3,		0,	M32|I69 },
-{"dremu",		"z,s,t",	0x0000001f, 0xfc00ffff, RD_2|RD_3|WR_HILO,      0,		I3,		0,	M32|I69 },
+{"dremu",		"z,s,t",	0x0000001f, 0xfc00ffff, RD_2|RD_3|WR_HILO|IS_D,	0,		I3,		0,	M32|I69 },
 {"dremu",		"d,v,t",	0,    (int) M_DREMU_3,	INSN_MACRO,		0,		I3,		0,	M32|I69 },
 {"dremu",		"d,v,I",	0,    (int) M_DREMU_3I,	INSN_MACRO,		0,		I3,		0,	M32|I69 },
 {"dret",		"",		0x7000003e, 0xffffffff,	0,			0,		N5|ALX,		0,	0 },
@@ -1375,20 +1375,20 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"madd.ps",		"D,S,T",	0x72c00018, 0xffe0003f,	WR_1|RD_2|RD_3|FP_D,	     0,		IL2F,		0,	0 },
 {"madd",		"s,t",		0x0000001c, 0xfc00ffff, RD_1|RD_2|WR_HILO,           0,		L1|ALX,		0,	0 },
 {"madd",		"s,t",		0x70000000, 0xfc00ffff, RD_1|RD_2|MOD_HILO,          0,		I32|N55,	0,	I37 },
-{"madd",		"s,t",		0x70000000, 0xfc00ffff, RD_1|RD_2|MOD_HILO|IS_M, 0,		G1,		0,	0 },
+{"madd",		"s,t",		0x70000000, 0xfc00ffff, RD_1|RD_2|MOD_HILO,	0,		G1,		0,	0 },
 {"madd",		"7,s,t",	0x70000000, 0xfc00e7ff, RD_2|RD_3|MOD_a,             0,         0,		D32,	0 },
-{"madd",		"d,s,t",	0x70000000, 0xfc0007ff, WR_1|RD_2|RD_3|MOD_HILO|IS_M, 0,	G1,		0,	0 },
-{"madd1",		"s,t",		0x70000020, 0xfc00ffff, RD_1|RD_2|WR_HILO|IS_M,      0,		EE,		0,	0 },
-{"madd1",		"d,s,t",	0x70000020, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO|IS_M, 0,		EE,		0,	0 },
+{"madd",		"d,s,t",	0x70000000, 0xfc0007ff, WR_1|RD_2|RD_3|MOD_HILO, 0,		G1,		0,	0 },
+{"madd1",		"s,t",		0x70000020, 0xfc00ffff, RD_1|RD_2|WR_HILO,	0,		EE,		0,	0 },
+{"madd1",		"d,s,t",	0x70000020, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO,	0,		EE,		0,	0 },
 {"madda.s",		"S,T",		0x4600001e, 0xffe007ff, RD_1|RD_2|FP_S,		     0,		EE,		0,	0 },
 {"maddp",		"s,t",		0x70000441, 0xfc00ffff,	RD_1|RD_2|MOD_HILO,	     0,		0,		SMT,	0 },
 {"maddu",		"s,t",		0x0000001d, 0xfc00ffff, RD_1|RD_2|WR_HILO,           0,		L1|ALX,		0,	0 },
 {"maddu",		"s,t",		0x70000001, 0xfc00ffff, RD_1|RD_2|MOD_HILO,          0,		I32|N55,	0,	I37 },
-{"maddu",		"s,t",		0x70000001, 0xfc00ffff, RD_1|RD_2|MOD_HILO|IS_M, 0,		G1,		0,	0 },
+{"maddu",		"s,t",		0x70000001, 0xfc00ffff, RD_1|RD_2|MOD_HILO,	0,		G1,		0,	0 },
 {"maddu",		"7,s,t",	0x70000001, 0xfc00e7ff, RD_2|RD_3|MOD_a,             0,         0,		D32,	0 },
-{"maddu",		"d,s,t",	0x70000001, 0xfc0007ff, WR_1|RD_2|RD_3|MOD_HILO|IS_M, 0,	G1,		0,	0 },
-{"maddu1",		"s,t",		0x70000021, 0xfc00ffff, RD_1|RD_2|WR_HILO|IS_M,      0,		EE,		0,	0 },
-{"maddu1",		"d,s,t",	0x70000021, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO|IS_M, 0,		EE,		0,	0 },
+{"maddu",		"d,s,t",	0x70000001, 0xfc0007ff, WR_1|RD_2|RD_3|MOD_HILO, 0,		G1,		0,	0 },
+{"maddu1",		"s,t",		0x70000021, 0xfc00ffff, RD_1|RD_2|WR_HILO,	0,		EE,		0,	0 },
+{"maddu1",		"d,s,t",	0x70000021, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO,	0,		EE,		0,	0 },
 {"madd16",		"s,t",		0x00000028, 0xfc00ffff, RD_1|RD_2|MOD_HILO,	0,		N411,		0,	0 },
 {"max",			"d,v,t",	0x0000002c, 0xfc0007ff, WR_1|RD_2|RD_3,		0,		ALX,		0,	0 },
 {"max.ob",		"X,Y,Q",	0x78000007, 0xfc20003f,	WR_1|RD_2|RD_3|FP_D,	0,		SB1,		MX,	0 },
@@ -1621,17 +1621,17 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"mulsl.ob",		"Y,Q",		0x78000432, 0xfc2007ff,	RD_1|RD_2|FP_D,		WR_MACC,	SB1,		MX,	0 },
 {"mulsl.ob",		"S,Q",		0x48000432, 0xfc2007ff,	RD_1|RD_2|FP_D,		WR_MACC,	N54,		0,	0 },
 {"mulsl.qh",		"Y,Q",		0x78200432, 0xfc2007ff,	RD_1|RD_2|FP_D,		WR_MACC,	0,		MX,	0 },
-{"mult",		"s,t",		0x00000018, 0xfc00ffff, RD_1|RD_2|WR_HILO|IS_M, 0,		I1,		0,	I37 },
+{"mult",		"s,t",		0x00000018, 0xfc00ffff, RD_1|RD_2|WR_HILO,	0,		I1,		0,	I37 },
 {"mult",		"7,s,t",	0x00000018, 0xfc00e7ff, RD_2|RD_3|WR_a,         0,              0,		D32,	0 },
-{"mult",		"d,s,t",	0x00000018, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO|IS_M, 0,		G1,		0,	0 },
-{"mult1",		"s,t",		0x70000018, 0xfc00ffff, RD_1|RD_2|WR_HILO|IS_M, 0,		EE,		0,	0 },
-{"mult1",		"d,s,t",	0x70000018, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO|IS_M, 0,		EE,		0,	0 },
+{"mult",		"d,s,t",	0x00000018, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO,	0,		G1,		0,	0 },
+{"mult1",		"s,t",		0x70000018, 0xfc00ffff, RD_1|RD_2|WR_HILO,	0,		EE,		0,	0 },
+{"mult1",		"d,s,t",	0x70000018, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO,	0,		EE,		0,	0 },
 {"multp",		"s,t",		0x00000459, 0xfc00ffff,	RD_1|RD_2|MOD_HILO,	0,		0,		SMT,	0 },
-{"multu",		"s,t",		0x00000019, 0xfc00ffff, RD_1|RD_2|WR_HILO|IS_M, 0,		I1,		0,	I37 },
+{"multu",		"s,t",		0x00000019, 0xfc00ffff, RD_1|RD_2|WR_HILO,	0,		I1,		0,	I37 },
 {"multu",		"7,s,t",	0x00000019, 0xfc00e7ff, RD_2|RD_3|WR_a,         0,              0,		D32,	0 },
-{"multu",		"d,s,t",	0x00000019, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO|IS_M, 0,		G1,		0,	0 },
-{"multu1",		"s,t",		0x70000019, 0xfc00ffff, RD_1|RD_2|WR_HILO|IS_M, 0,		EE,		0,	0 },
-{"multu1",		"d,s,t",	0x70000019, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO|IS_M, 0,		EE,		0,	0 },
+{"multu",		"d,s,t",	0x00000019, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO,	0,		G1,		0,	0 },
+{"multu1",		"s,t",		0x70000019, 0xfc00ffff, RD_1|RD_2|WR_HILO,	0,		EE,		0,	0 },
+{"multu1",		"d,s,t",	0x70000019, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO,	0,		EE,		0,	0 },
 {"mulu",		"d,v,t",	0x00000099, 0xfc0007ff, WR_1|RD_2|RD_3, 	0,		I37,		0,	0},
 {"mulu",		"d,s,t",	0x00000059, 0xfc0007ff,	WR_1|RD_2|RD_3|WR_HILO,	0,		N5,		0,	0 },
 {"neg",			"d,w",		0x00000022, 0xffe007ff,	WR_1|RD_2,		0,		I1,		0,	0 }, /* sub 0 */
@@ -1696,9 +1696,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"pcpyh",		"d,t",		0x700006e9, 0xffe007ff, WR_1|RD_2,		0,		MMI,		0,	0 },
 {"pcpyld",		"d,s,t",	0x70000389, 0xfc0007ff, WR_1|RD_2|RD_3,		0,		MMI,		0,	0 },
 {"pcpyud",		"d,s,t",	0x700003a9, 0xfc0007ff, WR_1|RD_2|RD_3,		0,		MMI,		0,	0 },
-{"pdivbw",		"s,t",		0x70000749, 0xfc00ffff, RD_1|RD_2|WR_HILO,	0,		MMI,		0,	0 },
-{"pdivuw",		"s,t",		0x70000369, 0xfc00ffff, RD_1|RD_2|WR_HILO,	0,		MMI,		0,	0 },
-{"pdivw",		"s,t",		0x70000349, 0xfc00ffff, RD_1|RD_2|WR_HILO,	0,		MMI,		0,	0 },
+{"pdivbw",		"s,t",		0x70000749, 0xfc00ffff, RD_1|RD_2|WR_HILO|IS_D,	0,		MMI,		0,	0 },
+{"pdivuw",		"s,t",		0x70000369, 0xfc00ffff, RD_1|RD_2|WR_HILO|IS_D,	0,		MMI,		0,	0 },
+{"pdivw",		"s,t",		0x70000349, 0xfc00ffff, RD_1|RD_2|WR_HILO|IS_D,	0,		MMI,		0,	0 },
 {"pexch",		"d,t",		0x700006a9, 0xffe007ff, WR_1|RD_2,		0,		MMI,		0,	0 },
 {"pexcw",		"d,t",		0x700007a9, 0xffe007ff, WR_1|RD_2,		0,		MMI,		0,	0 },
 {"pexeh",		"d,t",		0x70000689, 0xffe007ff, WR_1|RD_2,		0,		MMI,		0,	0 },
@@ -1793,10 +1793,10 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"recip2.d",		"D,S,T",	0x4620001c, 0xffe0003f,	WR_1|RD_2|RD_3|FP_D,	0,		0,		M3D,	0 },
 {"recip2.ps",		"D,S,T",	0x46c0001c, 0xffe0003f,	WR_1|RD_2|RD_3|FP_S,	0,		0,		M3D,	0 },
 {"recip2.s",		"D,S,T",	0x4600001c, 0xffe0003f,	WR_1|RD_2|RD_3|FP_S,	0,		0,		M3D,	0 },
-{"rem",			"z,s,t",	0x0000001a, 0xfc00ffff, RD_2|RD_3|WR_HILO,      AL,		I1,		0,	I37 },
+{"rem",			"z,s,t",	0x0000001a, 0xfc00ffff, RD_2|RD_3|WR_HILO|IS_D,	AL,		I1,		0,	I37 },
 {"rem",			"d,v,t",	0,    (int) M_REM_3,	INSN_MACRO,		0,		I1,		0,	I37 },
 {"rem",			"d,v,I",	0,    (int) M_REM_3I,	INSN_MACRO,		0,		I1,		0,	I37 },
-{"remu",		"z,s,t",	0x0000001b, 0xfc00ffff, RD_2|RD_3|WR_HILO,      AL,		I1,		0,	I37 },
+{"remu",		"z,s,t",	0x0000001b, 0xfc00ffff, RD_2|RD_3|WR_HILO|IS_D,	AL,		I1,		0,	I37 },
 {"remu",		"d,v,t",	0,    (int) M_REMU_3,	INSN_MACRO,		0,		I1,		0,	I37 },
 {"remu",		"d,v,I",	0,    (int) M_REMU_3I,	INSN_MACRO,		0,		I1,		0,	I37 },
 {"rdhwr",		"t,K",		0x7c00003b, 0xffe007ff, WR_1,			0,		I33,		0,	0 },


More information about the Binutils-cvs mailing list