From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24271 invoked by alias); 17 Apr 2007 16:04:58 -0000 Received: (qmail 23968 invoked by uid 22791); 17 Apr 2007 16:04:56 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 17 Apr 2007 17:04:53 +0100 Received: (qmail 7151 invoked from network); 17 Apr 2007 16:04:50 -0000 Received: from unknown (HELO localhost) (froydnj@127.0.0.2) by mail.codesourcery.com with ESMTPA; 17 Apr 2007 16:04:50 -0000 Date: Wed, 18 Apr 2007 03:54:00 -0000 From: Nathan Froyd To: binutils@sourceware.org Subject: [PATCH] recognize three-operand tlbsx{,e} on PPC Message-ID: <20070417160446.GL9017@sparrowhawk.codesourcery.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="w7PDEPdKQumQfZlR" Content-Disposition: inline User-Agent: Mutt/1.4.1i X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2007-04/txt/msg00225.txt.bz2 --w7PDEPdKQumQfZlR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 375 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 --w7PDEPdKQumQfZlR Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="booke.patch" Content-length: 2111 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 --w7PDEPdKQumQfZlR--