From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 980 invoked by alias); 14 Aug 2012 23:34:14 -0000 Received: (qmail 526 invoked by uid 22791); 14 Aug 2012 23:34:13 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from e31.co.us.ibm.com (HELO e31.co.us.ibm.com) (32.97.110.149) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Aug 2012 23:33:53 +0000 Received: from /spool/local by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 14 Aug 2012 17:33:52 -0600 Received: from d03dlp02.boulder.ibm.com (9.17.202.178) by e31.co.us.ibm.com (192.168.1.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 14 Aug 2012 17:33:51 -0600 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id 4FE483E4003C for ; Tue, 14 Aug 2012 17:33:48 -0600 (MDT) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q7ENXl06137644 for ; Tue, 14 Aug 2012 17:33:47 -0600 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q7ENXl1K025119 for ; Tue, 14 Aug 2012 17:33:47 -0600 Received: from otta (vorma.rchland.ibm.com [9.10.86.174]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with SMTP id q7ENXkPn025075; Tue, 14 Aug 2012 17:33:46 -0600 Date: Tue, 14 Aug 2012 23:59:00 -0000 From: Peter Bergner To: binutils@sourceware.org Cc: Alan Modra Subject: [PATCH, PPC] Add some missing extended mnemonics. Message-Id: <20120814183345.932e799c107241fc1c65d471@vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12081423-7282-0000-0000-00000BF9977E 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: 2012-08/txt/msg00264.txt.bz2 The following patch adds a few extended mnemonics defined in the ISA docs that were never added. The xnop is described as being like a nop, but is sent down the functional units unlike a normal nop instruction. The other three extended mnemonics were new with POWER7. This built and make checked with no regressions. Is this ok for mainline? Peter opcodes/ * ppc-opc.c : New extended mnemonics. gas/testsuite/ * gas/ppc/common.d ("nop", "xnop"): Add tests. * gas/ppc/common.s: Likewise. * gas/ppc/power7.d ("yield", "mdoio", "mdoom"): Add tests. * gas/ppc/power7.s: Likewise. Index: opcodes/ppc-opc.c =================================================================== RCS file: /cvs/src/src/opcodes/ppc-opc.c,v retrieving revision 1.147 diff -u -p -r1.147 ppc-opc.c --- opcodes/ppc-opc.c 25 Jul 2012 13:08:55 -0000 1.147 +++ opcodes/ppc-opc.c 14 Aug 2012 22:46:43 -0000 @@ -4139,6 +4139,7 @@ const struct powerpc_opcode powerpc_opco {"oris", OP(25), OP_MASK, PPCCOM, PPCNONE, {RA, RS, UI}}, {"oriu", OP(25), OP_MASK, PWRCOM, PPCNONE, {RA, RS, UI}}, +{"xnop", OP(26), 0xffffffff, PPCCOM, PPCNONE, {0}}, {"xori", OP(26), OP_MASK, PPCCOM, PPCNONE, {RA, RS, UI}}, {"xoril", OP(26), OP_MASK, PWRCOM, PPCNONE, {RA, RS, UI}}, @@ -4924,6 +4925,11 @@ const struct powerpc_opcode powerpc_opco {"miso", 0x7f5ad378, 0xffffffff, E6500, PPCNONE, {0}}, +/* The "yield", "mdoio" and "mdoom" instructions are extended mnemonics for + "or rX,rX,rX", with rX being r27, r29 and r30 respectively. */ +{"yield", 0x7f7bdb78, 0xffffffff, POWER7, PPCNONE, {0}}, +{"mdoio", 0x7fbdeb78, 0xffffffff, POWER7, PPCNONE, {0}}, +{"mdoom", 0x7fdef378, 0xffffffff, POWER7, PPCNONE, {0}}, {"mr", XRC(31,444,0), X_MASK, COM|PPCVLE, PPCNONE, {RA, RS, RBS}}, {"or", XRC(31,444,0), X_MASK, COM|PPCVLE, PPCNONE, {RA, RS, RB}}, {"mr.", XRC(31,444,1), X_MASK, COM|PPCVLE, PPCNONE, {RA, RS, RBS}}, Index: gas/testsuite/gas/ppc/common.d =================================================================== RCS file: /cvs/src/src/gas/testsuite/gas/ppc/common.d,v retrieving revision 1.2 diff -u -p -r1.2 common.d --- gas/testsuite/gas/ppc/common.d 10 Mar 2009 06:53:46 -0000 1.2 +++ gas/testsuite/gas/ppc/common.d 14 Aug 2012 22:46:42 -0000 @@ -188,3 +188,7 @@ Disassembly of section \.text: 2c4: 7d 8d 73 2e sthx r12,r13,r14 2c8: 7f dd fa 79 xor. r29,r30,r31 2cc: 7f dd fa 78 xor r29,r30,r31 + 2d0: 60 00 00 00 nop + 2d4: 60 00 00 00 nop + 2d8: 68 00 00 00 xnop + 2dc: 68 00 00 00 xnop Index: gas/testsuite/gas/ppc/common.s =================================================================== RCS file: /cvs/src/src/gas/testsuite/gas/ppc/common.s,v retrieving revision 1.1 diff -u -p -r1.1 common.s --- gas/testsuite/gas/ppc/common.s 9 Sep 2008 13:25:05 -0000 1.1 +++ gas/testsuite/gas/ppc/common.s 14 Aug 2012 22:46:42 -0000 @@ -180,3 +180,7 @@ start: sthx 12,13,14 xor. 29,30,31 xor 29,30,31 + nop + ori 0,0,0 + xnop + xori 0,0,0 Index: gas/testsuite/gas/ppc/power7.d =================================================================== RCS file: /cvs/src/src/gas/testsuite/gas/ppc/power7.d,v retrieving revision 1.4 diff -u -p -r1.4 power7.d --- gas/testsuite/gas/ppc/power7.d 29 Sep 2009 13:19:10 -0000 1.4 +++ gas/testsuite/gas/ppc/power7.d 14 Aug 2012 22:46:42 -0000 @@ -111,3 +111,9 @@ Disassembly of section \.text: 194: 60 00 00 00 nop 198: 60 00 00 00 nop 19c: 60 42 00 00 ori r2,r2,0 + 1a0: 7f 7b db 78 yield + 1a4: 7f 7b db 78 yield + 1a8: 7f bd eb 78 mdoio + 1ac: 7f bd eb 78 mdoio + 1b0: 7f de f3 78 mdoom + 1b4: 7f de f3 78 mdoom Index: gas/testsuite/gas/ppc/power7.s =================================================================== RCS file: /cvs/src/src/gas/testsuite/gas/ppc/power7.s,v retrieving revision 1.4 diff -u -p -r1.4 power7.s --- gas/testsuite/gas/ppc/power7.s 29 Sep 2009 13:19:10 -0000 1.4 +++ gas/testsuite/gas/ppc/power7.s 14 Aug 2012 22:46:42 -0000 @@ -102,3 +102,9 @@ power7: isel 2,3,4,28 ori 2,2,0 .p2align 4,,15 + yield + or 27,27,27 + mdoio + or 29,29,29 + mdoom + or 30,30,30