This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Remove some accidental additions, fix darwin
- To: gcc-patches at gcc dot gnu dot org
- Subject: [PATCH] Remove some accidental additions, fix darwin
- From: Daniel Berlin <dan at cgsoftware dot com>
- Date: Wed, 01 Aug 2001 02:46:23 -0400
Cut and pasted too much originally, someone else pointed it out (I had
thought something small had changed so that the cpu defaults were
different for AIX and SYSV, but it was just my eyes playing tricks on
me).
Also adds a DOUBLE_INT_ASM_OP for darwin that is ".quad", given the
assembler supports neither. Stan, correct me if i've done the reverse
of what you wanted, I can't find the email from a few hours ago for
some reason.
I didn't think it was right to define it to nothing in rs6000.h, and
then just have aix.h and sysv4.h #undef it, since it can't work as
nothing, and you'd just get assembler errors that probably made no
sense (unrecognized opcode or pseudo-op), or worse, none at all.
Maybe i should define it to "You need to define DOUBLE_INT_ASM_OP" so
it's quite clear what's wrong in the assembler output, rather than add
a definition to darwin.h?
Lastly, I removed the 4 defs that slipped in during a merge without my
noticing that had been replaced by target functions.
Someone should probably add an
#ifdef FUNCTION_PROLOGUE
#error "Don't define FUNCTION_PROLOGUE anymore!"
#endif
etc
or something like it to target-def.h.
In the process of removing this, I noticed that s390/linux.h also
defines FUNCTION_PROLOGUE. Is this pointless as well?
This bootstraps on powerpc-linux-gnu, i'm building all the other
crosses right now.
Assuming they all go okay, does the patch look okay?
2001-08-01 Daniel Berlin <dan@cgsoftware.com>
* config/rs6000.h (FUNCTION_PROLOGUE): Deleted again.
(FUNCTION_EPILOGUE): Ditto.
(ASM_OPEN_PAREN): Ditto.
(ASM_CLOSE_PAREN): Ditto.
(CPP_CPU_SPEC): Move back here.
(ASM_CPU_SPEC): Move back here.
(ASM_DEFAULT_SPEC): Define to nothing.
(CPP_DEFAULT_SPEC): Define to nothing.
* config/aix.h (CPP_CPU_SPEC): Removed.
(ASM_CPU_SPEC): Removed.
* config/sysv4.h (CPP_CPU_SPEC): Removed.
(ASM_CPU_SPEC): Removed.
* config/darwin.h (DOUBLE_INT_ASM_OP): Define to ".quad",
Index: rs6000.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.121
diff -c -3 -p -w -B -b -r1.121 rs6000.h
*** rs6000.h 2001/07/31 22:19:46 1.121
--- rs6000.h 2001/08/01 06:27:47
*************** Boston, MA 02111-1307, USA. */
*** 49,54 ****
--- 49,130 ----
#define TARGET_CPU_DEFAULT ((char *)0)
#endif
+ /* Common CPP definitions used by CPP_SPEC among the various targets
+ for handling -mcpu=xxx switches. */
+ #define CPP_CPU_SPEC \
+ "%{!mcpu*: \
+ %{mpower: %{!mpower2: -D_ARCH_PWR}} \
+ %{mpower2: -D_ARCH_PWR2} \
+ %{mpowerpc*: -D_ARCH_PPC} \
+ %{mno-power: %{!mpowerpc*: -D_ARCH_COM}} \
+ %{!mno-power: %{!mpower2: %(cpp_default)}}} \
+ %{mcpu=common: -D_ARCH_COM} \
+ %{mcpu=power: -D_ARCH_PWR} \
+ %{mcpu=power2: -D_ARCH_PWR2} \
+ %{mcpu=powerpc: -D_ARCH_PPC} \
+ %{mcpu=rios: -D_ARCH_PWR} \
+ %{mcpu=rios1: -D_ARCH_PWR} \
+ %{mcpu=rios2: -D_ARCH_PWR2} \
+ %{mcpu=rsc: -D_ARCH_PWR} \
+ %{mcpu=rsc1: -D_ARCH_PWR} \
+ %{mcpu=401: -D_ARCH_PPC} \
+ %{mcpu=403: -D_ARCH_PPC} \
+ %{mcpu=505: -D_ARCH_PPC} \
+ %{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \
+ %{mcpu=602: -D_ARCH_PPC} \
+ %{mcpu=603: -D_ARCH_PPC} \
+ %{mcpu=603e: -D_ARCH_PPC} \
+ %{mcpu=ec603e: -D_ARCH_PPC} \
+ %{mcpu=604: -D_ARCH_PPC} \
+ %{mcpu=604e: -D_ARCH_PPC} \
+ %{mcpu=620: -D_ARCH_PPC} \
+ %{mcpu=740: -D_ARCH_PPC} \
+ %{mcpu=750: -D_ARCH_PPC} \
+ %{mcpu=801: -D_ARCH_PPC} \
+ %{mcpu=821: -D_ARCH_PPC} \
+ %{mcpu=823: -D_ARCH_PPC} \
+ %{mcpu=860: -D_ARCH_PPC}"
+
+ /* Common ASM definitions used by ASM_SPEC among the various targets
+ for handling -mcpu=xxx switches. */
+ #define ASM_CPU_SPEC \
+ "%{!mcpu*: \
+ %{mpower: %{!mpower2: -mpwr}} \
+ %{mpower2: -mpwrx} \
+ %{mpowerpc*: -mppc} \
+ %{mno-power: %{!mpowerpc*: -mcom}} \
+ %{!mno-power: %{!mpower2: %(asm_default)}}} \
+ %{mcpu=common: -mcom} \
+ %{mcpu=power: -mpwr} \
+ %{mcpu=power2: -mpwrx} \
+ %{mcpu=powerpc: -mppc} \
+ %{mcpu=rios: -mpwr} \
+ %{mcpu=rios1: -mpwr} \
+ %{mcpu=rios2: -mpwrx} \
+ %{mcpu=rsc: -mpwr} \
+ %{mcpu=rsc1: -mpwr} \
+ %{mcpu=401: -mppc} \
+ %{mcpu=403: -mppc} \
+ %{mcpu=505: -mppc} \
+ %{mcpu=601: -m601} \
+ %{mcpu=602: -mppc} \
+ %{mcpu=603: -mppc} \
+ %{mcpu=603e: -mppc} \
+ %{mcpu=ec603e: -mppc} \
+ %{mcpu=604: -mppc} \
+ %{mcpu=604e: -mppc} \
+ %{mcpu=620: -mppc} \
+ %{mcpu=740: -mppc} \
+ %{mcpu=750: -mppc} \
+ %{mcpu=801: -mppc} \
+ %{mcpu=821: -mppc} \
+ %{mcpu=823: -mppc} \
+ %{mcpu=860: -mppc}"
+
+ #define CPP_DEFAULT_SPEC ""
+
+ #define ASM_DEFAULT_SPEC ""
+
/* This macro defines names of additional specifications to put in the specs
that can be used in various specifications like CC1_SPEC. Its definition
is an initializer with a subgrouping for each command option.
*************** typedef struct rs6000_args
*** 1461,1476 ****
argument is passed depends on whether or not it is a named argument. */
#define STRICT_ARGUMENT_NAMING 1
- /* This macro generates the assembly code for function entry.
- FILE is a stdio stream to output the code to.
- SIZE is an int: how many units of temporary storage to allocate.
- Refer to the array `regs_ever_live' to determine which registers
- to save; `regs_ever_live[I]' is nonzero if register number I
- is ever used in the function. This macro is responsible for
- knowing which registers should not be saved even if used. */
-
- #define FUNCTION_PROLOGUE(FILE, SIZE) output_prolog (FILE, SIZE)
-
/* Output assembler code to FILE to increment profiler label # LABELNO
for profiling a function entry. */
--- 1537,1542 ----
*************** typedef struct rs6000_args
*** 1496,1512 ****
&& TARGET_AIX \
&& (REGNO) == TOC_REGISTER))
- /* This macro generates the assembly code for function exit,
- on machines that need it. If FUNCTION_EPILOGUE is not defined
- then individual return instructions are generated for each
- return statement. Args are same as for FUNCTION_PROLOGUE.
-
- The function epilogue should not depend on the current stack pointer!
- It should use the frame pointer only. This is mandatory because
- of alloca; we also take advantage of it to omit stack adjustments
- before returning. */
-
- #define FUNCTION_EPILOGUE(FILE, SIZE) output_epilog (FILE, SIZE)
/* TRAMPOLINE_TEMPLATE deleted */
--- 1562,1567 ----
*************** do { \
*** 2485,2496 ****
#define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \
sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
-
- /* Define the parentheses used to group arithmetic operations
- in assembler code. */
-
- #define ASM_OPEN_PAREN "("
- #define ASM_CLOSE_PAREN ")"
/* Pick up the return address upon entry to a procedure. Used for
dwarf2 unwind information. This also enables the table driven
--- 2540,2545 ----
Index: darwin.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/darwin.h,v
retrieving revision 1.2
diff -c -3 -p -w -B -b -r1.2 darwin.h
*** darwin.h 2001/07/31 17:20:20 1.2
--- darwin.h 2001/08/01 06:27:48
*************** Boston, MA 02111-1307, USA. */
*** 191,193 ****
--- 191,196 ----
&& DECL_MODE (TYPE_FIELDS (STRUCT)) == DFmode \
? MAX (MAX ((COMPUTED), (SPECIFIED)), BIGGEST_ALIGNMENT) \
: MAX ((COMPUTED), (SPECIFIED)))
+ /* XXX: Darwin supports neither .quad, or .llong, but it also doesn't
+ support 64 bit powerpc either, so this just keeps things happy. */
+ #define DOUBLE_INT_ASM_OP ".quad"
Index: aix.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/aix.h,v
retrieving revision 1.21
diff -c -3 -p -w -B -b -r1.21 aix.h
*** aix.h 2001/07/31 17:20:19 1.21
--- aix.h 2001/08/01 06:27:48
*************** Boston, MA 02111-1307, USA. */
*** 52,131 ****
%{ansi: -D_ANSI_C_SOURCE}\
%(cpp_cpu)"
! /* Common CPP definitions used by CPP_SPEC among the various targets
! for handling -mcpu=xxx switches. */
! #define CPP_CPU_SPEC \
! "%{!mcpu*: \
! %{mpower: %{!mpower2: -D_ARCH_PWR}} \
! %{mpower2: -D_ARCH_PWR2} \
! %{mpowerpc*: -D_ARCH_PPC} \
! %{mno-power: %{!mpowerpc*: -D_ARCH_COM}} \
! %{!mno-power: %{!mpower2: %(cpp_default)}}} \
! %{mcpu=common: -D_ARCH_COM} \
! %{mcpu=power: -D_ARCH_PWR} \
! %{mcpu=power2: -D_ARCH_PWR2} \
! %{mcpu=powerpc: -D_ARCH_PPC} \
! %{mcpu=rios: -D_ARCH_PWR} \
! %{mcpu=rios1: -D_ARCH_PWR} \
! %{mcpu=rios2: -D_ARCH_PWR2} \
! %{mcpu=rsc: -D_ARCH_PWR} \
! %{mcpu=rsc1: -D_ARCH_PWR} \
! %{mcpu=401: -D_ARCH_PPC} \
! %{mcpu=403: -D_ARCH_PPC} \
! %{mcpu=505: -D_ARCH_PPC} \
! %{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \
! %{mcpu=602: -D_ARCH_PPC} \
! %{mcpu=603: -D_ARCH_PPC} \
! %{mcpu=603e: -D_ARCH_PPC} \
! %{mcpu=ec603e: -D_ARCH_PPC} \
! %{mcpu=604: -D_ARCH_PPC} \
! %{mcpu=604e: -D_ARCH_PPC} \
! %{mcpu=620: -D_ARCH_PPC} \
! %{mcpu=740: -D_ARCH_PPC} \
! %{mcpu=750: -D_ARCH_PPC} \
! %{mcpu=801: -D_ARCH_PPC} \
! %{mcpu=821: -D_ARCH_PPC} \
! %{mcpu=823: -D_ARCH_PPC} \
! %{mcpu=860: -D_ARCH_PPC}"
!
#define CPP_DEFAULT_SPEC "-D_ARCH_PWR"
-
- /* Common ASM definitions used by ASM_SPEC among the various targets
- for handling -mcpu=xxx switches. */
- #define ASM_CPU_SPEC \
- "%{!mcpu*: \
- %{mpower: %{!mpower2: -mpwr}} \
- %{mpower2: -mpwrx} \
- %{mpowerpc*: -mppc} \
- %{mno-power: %{!mpowerpc*: -mcom}} \
- %{!mno-power: %{!mpower2: %(asm_default)}}} \
- %{mcpu=common: -mcom} \
- %{mcpu=power: -mpwr} \
- %{mcpu=power2: -mpwrx} \
- %{mcpu=powerpc: -mppc} \
- %{mcpu=rios: -mpwr} \
- %{mcpu=rios1: -mpwr} \
- %{mcpu=rios2: -mpwrx} \
- %{mcpu=rsc: -mpwr} \
- %{mcpu=rsc1: -mpwr} \
- %{mcpu=401: -mppc} \
- %{mcpu=403: -mppc} \
- %{mcpu=505: -mppc} \
- %{mcpu=601: -m601} \
- %{mcpu=602: -mppc} \
- %{mcpu=603: -mppc} \
- %{mcpu=603e: -mppc} \
- %{mcpu=ec603e: -mppc} \
- %{mcpu=604: -mppc} \
- %{mcpu=604e: -mppc} \
- %{mcpu=620: -mppc} \
- %{mcpu=740: -mppc} \
- %{mcpu=750: -mppc} \
- %{mcpu=801: -mppc} \
- %{mcpu=821: -mppc} \
- %{mcpu=823: -mppc} \
- %{mcpu=860: -mppc}"
#define ASM_DEFAULT_SPEC ""
/* Tell the assembler to assume that all undefined names are external.
--- 52,61 ----
%{ansi: -D_ANSI_C_SOURCE}\
%(cpp_cpu)"
! #undef CPP_DEFAULT_SPEC
#define CPP_DEFAULT_SPEC "-D_ARCH_PWR"
+ #undef ASM_DEFAULT_SPEC
#define ASM_DEFAULT_SPEC ""
/* Tell the assembler to assume that all undefined names are external.
Index: sysv4.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/sysv4.h,v
retrieving revision 1.51
diff -c -3 -p -w -B -b -r1.51 sysv4.h
*** sysv4.h 2001/07/31 17:20:20 1.51
--- sysv4.h 2001/08/01 06:27:49
*************** Boston, MA 02111-1307, USA. */
*** 37,115 ****
/* Override rs6000.h definition. */
#undef CPP_DEFAULT_SPEC
#define CPP_DEFAULT_SPEC "-D_ARCH_PPC"
- /* Common CPP definitions used by CPP_SPEC among the various targets
- for handling -mcpu=xxx switches. */
- #define CPP_CPU_SPEC \
- "%{!mcpu*: \
- %{mpower: %{!mpower2: -D_ARCH_PWR}} \
- %{mpower2: -D_ARCH_PWR2} \
- %{mpowerpc*: -D_ARCH_PPC} \
- %{mno-power: %{!mpowerpc*: -D_ARCH_COM}} \
- %{!mno-power: %{!mpower2: %(cpp_default)}}} \
- %{mcpu=common: -D_ARCH_COM} \
- %{mcpu=power: -D_ARCH_PWR} \
- %{mcpu=power2: -D_ARCH_PWR2} \
- %{mcpu=powerpc: -D_ARCH_PPC} \
- %{mcpu=rios: -D_ARCH_PWR} \
- %{mcpu=rios1: -D_ARCH_PWR} \
- %{mcpu=rios2: -D_ARCH_PWR2} \
- %{mcpu=rsc: -D_ARCH_PWR} \
- %{mcpu=rsc1: -D_ARCH_PWR} \
- %{mcpu=401: -D_ARCH_PPC} \
- %{mcpu=403: -D_ARCH_PPC} \
- %{mcpu=505: -D_ARCH_PPC} \
- %{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \
- %{mcpu=602: -D_ARCH_PPC} \
- %{mcpu=603: -D_ARCH_PPC} \
- %{mcpu=603e: -D_ARCH_PPC} \
- %{mcpu=ec603e: -D_ARCH_PPC} \
- %{mcpu=604: -D_ARCH_PPC} \
- %{mcpu=604e: -D_ARCH_PPC} \
- %{mcpu=620: -D_ARCH_PPC} \
- %{mcpu=740: -D_ARCH_PPC} \
- %{mcpu=750: -D_ARCH_PPC} \
- %{mcpu=801: -D_ARCH_PPC} \
- %{mcpu=821: -D_ARCH_PPC} \
- %{mcpu=823: -D_ARCH_PPC} \
- %{mcpu=860: -D_ARCH_PPC}"
-
- #define CPP_DEFAULT_SPEC "-D_ARCH_PPC"
-
- /* Common ASM definitions used by ASM_SPEC among the various targets
- for handling -mcpu=xxx switches. */
- #define ASM_CPU_SPEC \
- "%{!mcpu*: \
- %{mpower: %{!mpower2: -mpwr}} \
- %{mpower2: -mpwrx} \
- %{mpowerpc*: -mppc} \
- %{mno-power: %{!mpowerpc*: -mcom}} \
- %{!mno-power: %{!mpower2: %(asm_default)}}} \
- %{mcpu=common: -mcom} \
- %{mcpu=power: -mpwr} \
- %{mcpu=power2: -mpwrx} \
- %{mcpu=powerpc: -mppc} \
- %{mcpu=rios: -mpwr} \
- %{mcpu=rios1: -mpwr} \
- %{mcpu=rios2: -mpwrx} \
- %{mcpu=rsc: -mpwr} \
- %{mcpu=rsc1: -mpwr} \
- %{mcpu=401: -mppc} \
- %{mcpu=403: -mppc} \
- %{mcpu=505: -mppc} \
- %{mcpu=601: -m601} \
- %{mcpu=602: -mppc} \
- %{mcpu=603: -mppc} \
- %{mcpu=603e: -mppc} \
- %{mcpu=ec603e: -mppc} \
- %{mcpu=604: -mppc} \
- %{mcpu=604e: -mppc} \
- %{mcpu=620: -mppc} \
- %{mcpu=740: -mppc} \
- %{mcpu=750: -mppc} \
- %{mcpu=801: -mppc} \
- %{mcpu=821: -mppc} \
- %{mcpu=823: -mppc} \
- %{mcpu=860: -mppc}"
/* Small data support types. */
enum rs6000_sdata_type {
--- 37,42 ----
--
"I saw a small bottle of cologne and asked if it was for sale.
She said, "It's free with purchase." I asked her if anyone
bought anything today.
"-Steven Wright