From a35762b84c2a0624677aba926dff6e278a6c15d9 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 25 Feb 2002 03:44:56 +0000 Subject: [PATCH] * doc/c-ppc.texi (PowerPC-Opts): Add -mpower4 and -maltivec. Remove references to chip manufacturers. * config/tc-ppc.c (md_parse_option): Handle -mpower4 option. Correct comments. (md_show_usage): Remove references to chip manufacturers. Mention -mpower4. (md_begin): Test power4 opcode flag bits. --- gas/ChangeLog | 10 ++++++++++ gas/config/tc-ppc.c | 33 +++++++++++++++++++++------------ gas/doc/c-ppc.texi | 27 ++++++++++++++++++--------- 3 files changed, 49 insertions(+), 21 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 230146de7c..6593aac40e 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,13 @@ +2002-02-25 Alan Modra + + * doc/c-ppc.texi (PowerPC-Opts): Add -mpower4 and -maltivec. + Remove references to chip manufacturers. + * config/tc-ppc.c (md_parse_option): Handle -mpower4 option. + Correct comments. + (md_show_usage): Remove references to chip manufacturers. Mention + -mpower4. + (md_begin): Test power4 opcode flag bits. + 2002-02-22 David Mosberger * config/tc-ia64.c (dot_restore): Issue error message of epilogue diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index 3d58a929ad..560622b15c 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -1,5 +1,5 @@ /* tc-ppc.c -- Assemble for the PowerPC or POWER (RS/6000) - Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. @@ -876,18 +876,18 @@ md_parse_option (c, arg) /* -mpwr means to assemble for the IBM POWER (RIOS1). */ else if (strcmp (arg, "pwr") == 0) ppc_cpu = PPC_OPCODE_POWER; - /* -m601 means to assemble for the Motorola PowerPC 601, which includes + /* -m601 means to assemble for the PowerPC 601, which includes instructions that are holdovers from the Power. */ else if (strcmp (arg, "601") == 0) ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_601; /* -mppc, -mppc32, -m603, and -m604 mean to assemble for the - Motorola PowerPC 603/604. */ + PowerPC 603/604. */ else if (strcmp (arg, "ppc") == 0 || strcmp (arg, "ppc32") == 0 || strcmp (arg, "603") == 0 || strcmp (arg, "604") == 0) ppc_cpu = PPC_OPCODE_PPC; - /* -m403 and -m405 mean to assemble for the Motorola PowerPC 403/405. */ + /* -m403 and -m405 mean to assemble for the PowerPC 403/405. */ else if (strcmp (arg, "403") == 0 || strcmp (arg, "405") == 0) ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_403; @@ -925,6 +925,11 @@ md_parse_option (c, arg) PPC_OPCODE_BOOKE64 | PPC_OPCODE_64; ppc_size = PPC_OPCODE_64; } + else if (strcmp (arg, "power4") == 0) + { + ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_64 | PPC_OPCODE_POWER4; + ppc_size = PPC_OPCODE_64; + } /* -mcom means assemble for the common intersection between Power and PowerPC. At present, we just allow the union, rather than the intersection. */ @@ -1027,18 +1032,19 @@ md_show_usage (stream) fprintf (stream, _("\ PowerPC options:\n\ -u ignored\n\ --mpwrx, -mpwr2 generate code for IBM POWER/2 (RIOS2)\n\ --mpwr generate code for IBM POWER (RIOS1)\n\ --m601 generate code for Motorola PowerPC 601\n\ +-mpwrx, -mpwr2 generate code for POWER/2 (RIOS2)\n\ +-mpwr generate code for POWER (RIOS1)\n\ +-m601 generate code for PowerPC 601\n\ -mppc, -mppc32, -m603, -m604\n\ - generate code for Motorola PowerPC 603/604\n\ --m403, -m405 generate code for Motorola PowerPC 403/405\n\ + generate code for PowerPC 603/604\n\ +-m403, -m405 generate code for PowerPC 403/405\n\ -m7400, -m7410, -m7450, -m7455\n\ - generate code For Motorola PowerPC 7400/7410/7450/7455\n\ --mppc64, -m620 generate code for Motorola PowerPC 620\n\ + generate code For PowerPC 7400/7410/7450/7455\n\ +-mppc64, -m620 generate code for PowerPC 620/625/630\n\ -mppc64bridge generate code for PowerPC 64, including bridge insns\n\ -mbooke64 generate code for 64-bit PowerPC BookE\n\ -mbooke, mbooke32 generate code for 32-bit PowerPC BookE\n\ +-mpower4 generate code for Power4 architecture\n\ -maltivec generate code for AltiVec\n\ -mcom generate code Power/PowerPC common instructions\n\ -many generate code for any architecture (PWR/PWRX/PPC)\n\ @@ -1175,7 +1181,10 @@ md_begin () if ((op->flags & ppc_cpu) != 0 && ((op->flags & (PPC_OPCODE_32 | PPC_OPCODE_64)) == 0 || (op->flags & (PPC_OPCODE_32 | PPC_OPCODE_64)) == ppc_size - || (ppc_cpu & PPC_OPCODE_64_BRIDGE) != 0)) + || (ppc_cpu & PPC_OPCODE_64_BRIDGE) != 0) + && ((op->flags & (PPC_OPCODE_POWER4 | PPC_OPCODE_NOPOWER4)) == 0 + || ((op->flags & PPC_OPCODE_POWER4) + == (ppc_cpu & PPC_OPCODE_POWER4)))) { const char *retval; diff --git a/gas/doc/c-ppc.texi b/gas/doc/c-ppc.texi index cae9e234a3..7fae6ed196 100644 --- a/gas/doc/c-ppc.texi +++ b/gas/doc/c-ppc.texi @@ -1,4 +1,4 @@ -@c Copyright 2001 +@c Copyright 2001, 2002 @c Free Software Foundation, Inc. @c This is part of the GAS manual. @c For copying conditions, see the file as.texinfo. @@ -34,31 +34,40 @@ The following table lists all available PowerPC options. @table @code @item -mpwrx | -mpwr2 -Generate code for IBM POWER/2 (RIOS2). +Generate code for POWER/2 (RIOS2). @item -mpwr -Generate code for IBM POWER (RIOS1) +Generate code for POWER (RIOS1) @item -m601 -Generate code for Motorola PowerPC 601. +Generate code for PowerPC 601. @item -mppc, -mppc32, -m603, -m604 -Generate code for Motorola PowerPC 603/604. +Generate code for PowerPC 603/604. @item -m403, -m405 -Generate code for Motorola PowerPC 403/405. +Generate code for PowerPC 403/405. + +@item -m7400, -m7410, -m7450, -m7455 +Generate code for PowerPC 7400/7410/7450/7455. @item -mppc64, -m620 -Generate code for Motorola PowerPC 620. +Generate code for PowerPC 620/625/630. @item -mppc64bridge Generate code for PowerPC 64, including bridge insns. @item -mbooke64 -Generate code for 64-bit Motorola BookE. +Generate code for 64-bit BookE. @item -mbooke, mbooke32 -Generate code for 32-bit Motorola BookE. +Generate code for 32-bit BookE. + +@item -maltivec +Generate code for processors with AltiVec instructions. + +@item -mpower4 +Generate code for Power4 architecture. @item -mcom Generate code Power/PowerPC common instructions. -- 2.11.0