[PATCH] recognize three-operand tlbsx{,e} on PPC

Nathan Froyd froydnj@codesourcery.com
Wed Apr 18 03:54:00 GMT 2007


The attached patch fixes an issue where the three-address form of
'tlbsxe' was not being recognized.  Tests have been added to ensure that
the assembler continues to recognize this form and also to recognize the
three-address form of 'tlbsx'.

Tested by building for powerpc-unknown-linux-gnu and running the tests
for the assembler.  No regressions.

OK to commit?

-Nathan
-------------- next part --------------
Index: opcodes/ppc-opc.c
===================================================================
--- opcodes/ppc-opc.c	(revision 168964)
+++ opcodes/ppc-opc.c	(working copy)
@@ -4349,8 +4349,8 @@ const struct powerpc_opcode powerpc_opco
 
 { "tlbsx",   XRC(31,914,0), X_MASK, 	PPC403|BOOKE,	{ RTO, RA, RB } },
 { "tlbsx.",  XRC(31,914,1), X_MASK, 	PPC403|BOOKE,	{ RTO, RA, RB } },
-{ "tlbsxe",  XRC(31,915,0), X_MASK,	BOOKE64,	{ RA, RB } },
-{ "tlbsxe.", XRC(31,915,1), X_MASK,	BOOKE64,	{ RA, RB } },
+{ "tlbsxe",  XRC(31,915,0), X_MASK,	BOOKE64,	{ RTO, RA, RB } },
+{ "tlbsxe.", XRC(31,915,1), X_MASK,	BOOKE64,	{ RTO, RA, RB } },
 
 { "slbmfee", X(31,915), XRA_MASK,	PPC64,		{ RT, RB } },
 
Index: gas/testsuite/gas/ppc/booke.d
===================================================================
--- gas/testsuite/gas/ppc/booke.d	(revision 168964)
+++ gas/testsuite/gas/ppc/booke.d	(working copy)
@@ -142,11 +142,15 @@ Disassembly of section \.text:
  1c0:	7c 00 06 ac 	mbar    
  1c4:	7c 00 06 ac 	mbar    
  1c8:	7c 20 06 ac 	mbar    1
- 1cc:	7c 12 42 a6 	mfsprg  r0,2
- 1d0:	7c 12 42 a6 	mfsprg  r0,2
- 1d4:	7c 12 43 a6 	mtsprg  2,r0
- 1d8:	7c 12 43 a6 	mtsprg  2,r0
- 1dc:	7c 07 42 a6 	mfsprg  r0,7
- 1e0:	7c 07 42 a6 	mfsprg  r0,7
- 1e4:	7c 17 43 a6 	mtsprg  7,r0
- 1e8:	7c 17 43 a6 	mtsprg  7,r0
+ 1cc:	7d 8d 77 24 	tlbsx   r12,r13,r14
+ 1d0:	7d 8d 77 25 	tlbsx\.  r12,r13,r14
+ 1d4:	7d 8d 77 26 	tlbsxe  r12,r13,r14
+ 1d8:	7d 8d 77 27 	tlbsxe\. r12,r13,r14
+ 1dc:	7c 12 42 a6 	mfsprg  r0,2
+ 1e0:	7c 12 42 a6 	mfsprg  r0,2
+ 1e4:	7c 12 43 a6 	mtsprg  2,r0
+ 1e8:	7c 12 43 a6 	mtsprg  2,r0
+ 1ec:	7c 07 42 a6 	mfsprg  r0,7
+ 1f0:	7c 07 42 a6 	mfsprg  r0,7
+ 1f4:	7c 17 43 a6 	mtsprg  7,r0
+ 1f8:	7c 17 43 a6 	mtsprg  7,r0
Index: gas/testsuite/gas/ppc/booke.s
===================================================================
--- gas/testsuite/gas/ppc/booke.s	(revision 168964)
+++ gas/testsuite/gas/ppc/booke.s	(working copy)
@@ -135,6 +135,11 @@ branch_target_8:
 	mbar	0
 	mbar	1
 
+	tlbsx	12, 13, 14
+	tlbsx.	12, 13, 14
+	tlbsxe	12, 13, 14
+	tlbsxe.	12, 13, 14
+
 	mfsprg 0, 2
 	mfsprg2 0
 	mtsprg 2, 0


More information about the Binutils mailing list