This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Add support for MIPS eretnc MIPS32r5 instruction


Hi,

This patch adds support for the eretnc MIPS32r5 instruction.  For more 
information on the instruction please refer to:
http://www.imgtec.com/powervr/insider/powervr-login.asp?doc=MD00087v6

The patch and ChangeLog entry are shown below.

Ok to commit?

Many thanks,


Andrew

Andrew Bennett
Software Design Engineer, MIPS Processor IP
Imagination Technologies Limited
t: +44 (0)113 2429814
www.imgtec.com


gas/testsuite/
 	* gas/mips/mips.exp: Add MIPS32r5 tests.
 	* gas/mips/r5.s: New test.
 	* gas/mips/r5.d: Likewise.

opcodes/
 	* mips-opc.c (mips_builtin_opcodes): Add MIPS32r5 eretnc instruction.
 

diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index b0d8ac2..affc1ea 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -1171,6 +1171,7 @@ if { [istarget mips*-*-vxworks*] } {
     run_dump_test_arches "msa-branch"	[mips_arch_list_matching mips32r2]
 
     run_dump_test_arches "xpa"		[mips_arch_list_matching mips32r2 !micromips]
+    run_dump_test_arches "r5"		[mips_arch_list_matching mips32r2 !micromips]
 
     run_dump_test "pcrel-1"
     run_dump_test "pcrel-2"
diff --git a/gas/testsuite/gas/mips/r5.d b/gas/testsuite/gas/mips/r5.d
new file mode 100644
index 0000000..d25417e
--- /dev/null
+++ b/gas/testsuite/gas/mips/r5.d
@@ -0,0 +1,9 @@
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: Test MIPS32r5 instructions
+#as: -32 
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 42000058 	eretnc
+	...
diff --git a/gas/testsuite/gas/mips/r5.s b/gas/testsuite/gas/mips/r5.s
new file mode 100644
index 0000000..12260d3
--- /dev/null
+++ b/gas/testsuite/gas/mips/r5.s
@@ -0,0 +1,10 @@
+	.text
+	.set	noat
+	.set	noreorder
+	.set	nomacro
+test_r5:
+	eretnc
+
+# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
+	.align  2
+	.space  8
diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c
index 9181c3f..cbf0e8e 100644
--- a/opcodes/mips-opc.c
+++ b/opcodes/mips-opc.c
@@ -1093,6 +1093,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"emt",			"",		0x41600be1, 0xffffffff, TRAP,			0,		0,		MT32,	0 },
 {"emt",			"t",		0x41600be1, 0xffe0ffff, WR_1|TRAP,		0,		0,		MT32,	0 },
 {"eret",		"",		0x42000018, 0xffffffff, NODS,      		0,		I3_32,		0,	0 },
+{"eretnc",		"",		0x42000058, 0xffffffff, NODS,      		0,		I33,		0,	0 },
 {"evpe",		"",		0x41600021, 0xffffffff, TRAP,			0,		0,		MT32,	0 },
 {"evpe",		"t",		0x41600021, 0xffe0ffff, WR_1|TRAP,		0,		0,		MT32,	0 },
 {"ext",			"t,r,+A,+C",	0x7c000000, 0xfc00003f, WR_1|RD_2,    		0,		I33,		0,	0 },
-- 
1.7.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]