This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: add ppca2 target
- From: Peter Bergner <bergner at vnet dot ibm dot com>
- To: Alan Modra <amodra at bigpond dot net dot au>
- Cc: Ben Elliston <bje at au1 dot ibm dot com>, binutils at sourceware dot org
- Date: Thu, 01 Oct 2009 14:51:22 -0500
- Subject: Re: PATCH: add ppca2 target
- References: <1253510550.22791.54.camel@helios> <20090921095019.GC11790@bubble.grove.modra.org> <1254361307.5276.202.camel@otta> <20091001053919.GF18973@bubble.grove.modra.org>
On Thu, 2009-10-01 at 15:09 +0930, Alan Modra wrote:
> On Wed, Sep 30, 2009 at 08:41:47PM -0500, Peter Bergner wrote:
> > While submitting the associated GCC patch upstream, David asked that we
> > follow the precedent from other processors (eg, 403, 405, 440, etc.) and
> > use the option name "a2" rather than "ppca2". This patch makes binutils
> > use the same name "a2" as GCC. Tested with "make check" with no testsuite
> > failures.
> >
> > Okay for the binutils mainline and 2.20 branch?
>
> Fine by me.
Here's what I ended up committing. Basically, I just dropped the renaming
of the opcodes/ppc-opc.c rename of the PPCA2 macro to A2. This is similar
to 403, 405, 440, etc, where the option name is "403", "405", "440", etc.,
but the macro name is "PPC403", etc. etc. This also cut down the size of
the patch considerably.
Thanks.
Peter
gas/
* config/tc-ppc.c (md_show_usage): Rename "ppca2" to "a2".
* doc/c-ppc.texi (PowerPC-Opts): Likewise.
gas/testsuite/
* gas/ppc/a2.d: Rename "ppca2" to "a2".
include/opcode/
* ppc.h (PPC_OPCODE_A2): Rename from PPC_OPCODE_PPCA2.
opcodes/
* ppc-opc.c (PPCA2): Use renamed mask PPC_OPCODE_A2.
* ppc-dis.c (ppc_opts): Likewise.
Rename "ppca2" to "a2".
Index: gas/config/tc-ppc.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ppc.c,v
retrieving revision 1.156
diff -u -p -r1.156 tc-ppc.c
--- gas/config/tc-ppc.c 21 Sep 2009 10:29:06 -0000 1.156
+++ gas/config/tc-ppc.c 1 Oct 2009 19:14:21 -0000
@@ -1195,7 +1195,7 @@ PowerPC options:\n\
-mppc64, -m620 generate code for PowerPC 620/625/630\n\
-mppc64bridge generate code for PowerPC 64, including bridge insns\n\
-mbooke generate code for 32-bit PowerPC BookE\n\
--mppca2 generate code for A2 architecture\n\
+-ma2 generate code for A2 architecture\n\
-mpower4 generate code for Power4 architecture\n\
-mpower5 generate code for Power5 architecture\n\
-mpower6 generate code for Power6 architecture\n\
Index: gas/doc/c-ppc.texi
===================================================================
RCS file: /cvs/src/src/gas/doc/c-ppc.texi,v
retrieving revision 1.16
diff -u -p -r1.16 c-ppc.texi
--- gas/doc/c-ppc.texi 21 Sep 2009 10:29:06 -0000 1.16
+++ gas/doc/c-ppc.texi 1 Oct 2009 19:14:21 -0000
@@ -73,7 +73,7 @@ Generate code for PowerPC 64, including
@item -mbooke
Generate code for 32-bit BookE.
-@item -mppca2
+@item -ma2
Generate code for A2 architecture.
@item -me300
Index: gas/testsuite/gas/ppc/a2.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/ppc/a2.d,v
retrieving revision 1.2
diff -u -p -r1.2 a2.d
--- gas/testsuite/gas/ppc/a2.d 22 Sep 2009 03:10:25 -0000 1.2
+++ gas/testsuite/gas/ppc/a2.d 1 Oct 2009 19:14:21 -0000
@@ -1,6 +1,6 @@
-#as: -mppca2
-#objdump: -dr -Mppca2
-#name: PPCA2 tests
+#as: -ma2
+#objdump: -dr -Ma2
+#name: A2 tests
.*: +file format elf(32)?(64)?-powerpc.*
Index: include/opcode/ppc.h
===================================================================
RCS file: /cvs/src/src/include/opcode/ppc.h,v
retrieving revision 1.35
diff -u -p -r1.35 ppc.h
--- include/opcode/ppc.h 22 Sep 2009 02:36:26 -0000 1.35
+++ include/opcode/ppc.h 1 Oct 2009 19:14:21 -0000
@@ -168,7 +168,7 @@ extern const int powerpc_num_opcodes;
#define PPC_OPCODE_VSX 0x80000000
/* Opcode is supported by A2. */
-#define PPC_OPCODE_PPCA2 0x100000000ULL
+#define PPC_OPCODE_A2 0x100000000ULL
/* A macro to extract the major opcode from an instruction. */
#define PPC_OP(i) (((i) >> 26) & 0x3f)
Index: opcodes/ppc-dis.c
===================================================================
RCS file: /cvs/src/src/opcodes/ppc-dis.c,v
retrieving revision 1.41
diff -u -p -r1.41 ppc-dis.c
--- opcodes/ppc-dis.c 21 Sep 2009 10:29:07 -0000 1.41
+++ opcodes/ppc-dis.c 1 Oct 2009 19:14:22 -0000
@@ -141,9 +141,9 @@ struct ppc_mopt ppc_opts[] = {
{ "ppc64bridge", (PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC | PPC_OPCODE_64_BRIDGE
| PPC_OPCODE_64),
0 },
- { "ppca2", (PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC | PPC_OPCODE_ISEL
+ { "a2", (PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC | PPC_OPCODE_ISEL
| PPC_OPCODE_POWER4 | PPC_OPCODE_POWER5 | PPC_OPCODE_CACHELCK
- | PPC_OPCODE_64 | PPC_OPCODE_PPCA2),
+ | PPC_OPCODE_64 | PPC_OPCODE_A2),
0 },
{ "ppcps", (PPC_OPCODE_PPC | PPC_OPCODE_PPCPS),
0 },
Index: opcodes/ppc-opc.c
===================================================================
RCS file: /cvs/src/src/opcodes/ppc-opc.c,v
retrieving revision 1.124
diff -u -p -r1.124 ppc-opc.c
--- opcodes/ppc-opc.c 29 Sep 2009 13:19:10 -0000 1.124
+++ opcodes/ppc-opc.c 1 Oct 2009 19:14:22 -0000
@@ -1933,7 +1933,7 @@ extract_dm (unsigned long insn,
#define PPCCHLK PPC_OPCODE_CACHELCK
#define PPCRFMCI PPC_OPCODE_RFMCI
#define E500MC PPC_OPCODE_E500MC
-#define PPCA2 PPC_OPCODE_PPCA2
+#define PPCA2 PPC_OPCODE_A2
/* The opcode table.