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, nios2] correct encoding of "eret" instruction


I've checked in this patch to fix a bug (reported to us by Altera) in the encoding of the "eret" instruction in the Nios II assembler and disassembler. Digging around, I saw that the incorrect encoding was inherited from Altera's the original version of the binutils port, but parroting the error in the test case was due to some later stupidity. :-S Anyway, fixed now.

-Sandra

2013-06-12  Sandra Loosemore  <sandra@codesourcery.com>

	include/opcode/
	* nios2.h (OP_MATCH_ERET): Correct eret encoding.

	gas/testsuite/
	* gas/nios2/tret.d: Correct eret encoding.
Index: include/opcode/nios2.h
===================================================================
RCS file: /cvs/src/src/include/opcode/nios2.h,v
retrieving revision 1.4
diff -u -p -r1.4 nios2.h
--- include/opcode/nios2.h	12 Mar 2013 19:18:57 -0000	1.4
+++ include/opcode/nios2.h	11 Jun 2013 04:10:10 -0000
@@ -440,7 +440,7 @@ struct nios2_reg
 #define OP_MATCH_SUB		OPX_MATCH (OPX_SUB)
 #define OP_MATCH_SYNC		OPX_MATCH (OPX_SYNC)
 #define OP_MATCH_TRAP		((0x1d << 17) | OPX_MATCH (OPX_TRAP))
-#define OP_MATCH_ERET		(0xe8000000 | OPX_MATCH (OPX_ERET))
+#define OP_MATCH_ERET		(0xef800000 | OPX_MATCH (OPX_ERET))
 #define OP_MATCH_WRCTL		OPX_MATCH (OPX_WRCTL)
 #define OP_MATCH_WRPRS		OPX_MATCH (OPX_WRPRS)
 #define OP_MATCH_XOR		OPX_MATCH (OPX_XOR)
Index: gas/testsuite/gas/nios2/tret.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/nios2/tret.d,v
retrieving revision 1.2
diff -u -p -r1.2 tret.d
--- gas/testsuite/gas/nios2/tret.d	12 Mar 2013 21:34:58 -0000	1.2
+++ gas/testsuite/gas/nios2/tret.d	11 Jun 2013 04:10:10 -0000
@@ -4,5 +4,4 @@
 .*: +file format elf32-littlenios2
 
 Disassembly of section .text:
-0+0000 <[^>]*> e800083a 	eret
-
+0+0000 <[^>]*> ef80083a 	eret

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