Commit 8e3f41e7 by Michael Meissner

Make AIX4 use -mcpu=common by default; add -mtune=

From-SVN: r10820
parent 39dffea3
...@@ -35,7 +35,9 @@ Boston, MA 02111-1307, USA. */ ...@@ -35,7 +35,9 @@ Boston, MA 02111-1307, USA. */
%{!mno-power: %{mpowerpc*: -m601}} \ %{!mno-power: %{mpowerpc*: -m601}} \
%{!mno-power: %{!mpowerpc*: %{!mpower2: -mpwr}}}} \ %{!mno-power: %{!mpowerpc*: %{!mpower2: -mpwr}}}} \
%{mcpu=common: -mcom} \ %{mcpu=common: -mcom} \
%{mcpu=rs6000: -mpwr} \
%{mcpu=power: -mpwr} \ %{mcpu=power: -mpwr} \
%{mcpu=power2: -mpwrx} \
%{mcpu=powerpc: -mppc} \ %{mcpu=powerpc: -mppc} \
%{mcpu=rios: -mpwr} \ %{mcpu=rios: -mpwr} \
%{mcpu=rios1: -mpwr} \ %{mcpu=rios1: -mpwr} \
...@@ -44,9 +46,11 @@ Boston, MA 02111-1307, USA. */ ...@@ -44,9 +46,11 @@ Boston, MA 02111-1307, USA. */
%{mcpu=rsc1: -mpwr} \ %{mcpu=rsc1: -mpwr} \
%{mcpu=403: -mppc} \ %{mcpu=403: -mppc} \
%{mcpu=601: -m601} \ %{mcpu=601: -m601} \
%{mcpu=602: -mppc} \
%{mcpu=603: -mppc} \ %{mcpu=603: -mppc} \
%{mcpu=603e: -mppc} \ %{mcpu=603e: -mppc} \
%{mcpu=604: -mppc}" %{mcpu=604: -mppc} \
%{mcpu=620: -mppc}"
/* Define the options for the binder: Start text at 512, align all segments /* Define the options for the binder: Start text at 512, align all segments
to 512 bytes, and warn if there is text relocation. to 512 bytes, and warn if there is text relocation.
......
...@@ -26,14 +26,15 @@ Boston, MA 02111-1307, USA. */ ...@@ -26,14 +26,15 @@ Boston, MA 02111-1307, USA. */
#undef ASM_SPEC #undef ASM_SPEC
#define ASM_SPEC "-u \ #define ASM_SPEC "-u \
%{!mcpu*: \ %{!mcpu*: \
%{mpower: %{!mpowerpc*: %{!mpower2: -mpwr}}} \
%{mpower2: -mpwrx} \ %{mpower2: -mpwrx} \
%{mno-power: %{mpowerpc*: -mppc}} \ %{mpowerpc*: %{!mpower: -mppc}} \
%{mno-power: %{!mpowerpc*: -mcom}} \ %{mpower: %{!mpower2: -mpwr}} \
%{!mno-power: %{mpowerpc*: -m601}} \ %{mpowerpc*: %{mpower: -m601}} \
%{!mno-power: %{!mpowerpc*: %{!mpower2: -mpwr}}}} \ %{!mpowerpc*: %{!mpower*: -mcom}}} \
%{mcpu=common: -mcom} \ %{mcpu=common: -mcom} \
%{mcpu=rs6000: -mpwr} \
%{mcpu=power: -mpwr} \ %{mcpu=power: -mpwr} \
%{mcpu=power2: -mpwrx} \
%{mcpu=powerpc: -mppc} \ %{mcpu=powerpc: -mppc} \
%{mcpu=rios: -mpwr} \ %{mcpu=rios: -mpwr} \
%{mcpu=rios1: -mpwr} \ %{mcpu=rios1: -mpwr} \
...@@ -42,9 +43,55 @@ Boston, MA 02111-1307, USA. */ ...@@ -42,9 +43,55 @@ Boston, MA 02111-1307, USA. */
%{mcpu=rsc1: -mpwr} \ %{mcpu=rsc1: -mpwr} \
%{mcpu=403: -mppc} \ %{mcpu=403: -mppc} \
%{mcpu=601: -m601} \ %{mcpu=601: -m601} \
%{mcpu=602: -mppc} \
%{mcpu=603: -mppc} \ %{mcpu=603: -mppc} \
%{mcpu=603e: -mppc} \ %{mcpu=603e: -mppc} \
%{mcpu=604: -mppc}" %{mcpu=604: -mppc} \
%{mcpu=620: -mppc}"
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-D_IBMR2 -D_POWER -D_AIX -D_AIX32 \
-Asystem(unix) -Asystem(aix)"
#undef CPP_SPEC
#define CPP_SPEC "\
%{posix: -D_POSIX_SOURCE} \
%{!mcpu*: \
%{mpower: %{!mpower2: -D_ARCH_PWR}} \
%{mpower2: -D_ARCH_PWR2} \
%{mpowerpc*: -D_ARCH_PPC} \
%{!mpower*: -D_ARCH_COM}} \
%{mcpu=common: -D_ARCH_COM} \
%{mcpu=rs6000: -D_ARCH_PWR} \
%{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=403: -D_ARCH_PPC} \
%{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \
%{mcpu=6*: -D_ARCH_PPC}"
#undef TARGET_DEFAULT
#define TARGET_DEFAULT MASK_NEW_MNEMONICS
#undef PROCESSOR_DEFAULT
#define PROCESSOR_DEFAULT PROCESSOR_PPC601
/* Define this macro as a C expression for the initializer of an
array of string to tell the driver program which options are
defaults for this target and thus do not need to be handled
specially when using `MULTILIB_OPTIONS'.
Do not define this macro if `MULTILIB_OPTIONS' is not defined in
the target makefile fragment or if none of the options listed in
`MULTILIB_OPTIONS' are set by default. *Note Target Fragment::. */
#undef MULTILIB_DEFAULTS
#define MULTILIB_DEFAULTS { "mcpu=common" }
/* These are not necessary when we pass -u to the assembler, and undefining /* These are not necessary when we pass -u to the assembler, and undefining
them saves a great deal of space in object files. */ them saves a great deal of space in object files. */
......
...@@ -42,7 +42,9 @@ Boston, MA 02111-1307, USA. */ ...@@ -42,7 +42,9 @@ Boston, MA 02111-1307, USA. */
%{mno-powerpc: %{!mpower: %{!mpower2: -D_ARCH_COM}}} \ %{mno-powerpc: %{!mpower: %{!mpower2: -D_ARCH_COM}}} \
%{!mno-powerpc: -D_ARCH_PPC}} \ %{!mno-powerpc: -D_ARCH_PPC}} \
%{mcpu=common: -D_ARCH_COM} \ %{mcpu=common: -D_ARCH_COM} \
%{mcpu=rs6000: -D_ARCH_PWR} \
%{mcpu=power: -D_ARCH_PWR} \ %{mcpu=power: -D_ARCH_PWR} \
%{mcpu=power2: -D_ARCH_PWR2} \
%{mcpu=powerpc: -D_ARCH_PPC} \ %{mcpu=powerpc: -D_ARCH_PPC} \
%{mcpu=rios: -D_ARCH_PWR} \ %{mcpu=rios: -D_ARCH_PWR} \
%{mcpu=rios1: -D_ARCH_PWR} \ %{mcpu=rios1: -D_ARCH_PWR} \
...@@ -51,11 +53,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -51,11 +53,7 @@ Boston, MA 02111-1307, USA. */
%{mcpu=rsc1: -D_ARCH_PWR} \ %{mcpu=rsc1: -D_ARCH_PWR} \
%{mcpu=403: -D_ARCH_PPC} \ %{mcpu=403: -D_ARCH_PPC} \
%{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \ %{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \
%{mcpu=602: -D_ARCH_PPC} \ %{mcpu=6*: -D_ARCH_PPC}"
%{mcpu=603: -D_ARCH_PPC} \
%{mcpu=603e: -D_ARCH_PPC} \
%{mcpu=604: -D_ARCH_PPC} \
%{mcpu=620: -D_ARCH_PPC}"
/* Define this macro as a C expression for the initializer of an /* Define this macro as a C expression for the initializer of an
array of string to tell the driver program which options are array of string to tell the driver program which options are
......
...@@ -43,7 +43,9 @@ Boston, MA 02111-1307, USA. */ ...@@ -43,7 +43,9 @@ Boston, MA 02111-1307, USA. */
%{mno-powerpc: %{!mpower: %{!mpower2: -D_ARCH_COM}}} \ %{mno-powerpc: %{!mpower: %{!mpower2: -D_ARCH_COM}}} \
%{!mno-powerpc: -D_ARCH_PPC}} \ %{!mno-powerpc: -D_ARCH_PPC}} \
%{mcpu=common: -D_ARCH_COM} \ %{mcpu=common: -D_ARCH_COM} \
%{mcpu=rs6000: -D_ARCH_PWR} \
%{mcpu=power: -D_ARCH_PWR} \ %{mcpu=power: -D_ARCH_PWR} \
%{mcpu=power2: -D_ARCH_PWR2} \
%{mcpu=powerpc: -D_ARCH_PPC} \ %{mcpu=powerpc: -D_ARCH_PPC} \
%{mcpu=rios: -D_ARCH_PWR} \ %{mcpu=rios: -D_ARCH_PWR} \
%{mcpu=rios1: -D_ARCH_PWR} \ %{mcpu=rios1: -D_ARCH_PWR} \
...@@ -52,11 +54,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -52,11 +54,7 @@ Boston, MA 02111-1307, USA. */
%{mcpu=rsc1: -D_ARCH_PWR} \ %{mcpu=rsc1: -D_ARCH_PWR} \
%{mcpu=403: -D_ARCH_PPC} \ %{mcpu=403: -D_ARCH_PPC} \
%{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \ %{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \
%{mcpu=602: -D_ARCH_PPC} \ %{mcpu=6*: -D_ARCH_PPC}"
%{mcpu=603: -D_ARCH_PPC} \
%{mcpu=603e: -D_ARCH_PPC} \
%{mcpu=604: -D_ARCH_PPC} \
%{mcpu=620: -D_ARCH_PPC}"
/* Define this macro as a C expression for the initializer of an /* Define this macro as a C expression for the initializer of an
array of string to tell the driver program which options are array of string to tell the driver program which options are
......
...@@ -72,7 +72,32 @@ Boston, MA 02111-1307, USA. */ ...@@ -72,7 +72,32 @@ Boston, MA 02111-1307, USA. */
/* This can become more refined as we have more powerpc options. */ /* This can become more refined as we have more powerpc options. */
#undef ASM_SPEC #undef ASM_SPEC
#define ASM_SPEC "-u %{m601:-m601} %{power*:-m601}" #define ASM_SPEC "\
-u \
%{!mcpu*: \
%{mpower2: -mpwrx} \
%{mpowerpc*: %{!mpower: -mppc}} \
%{mno-powerpc: %{!mpower: %{!mpower2: -mcom}}} \
%{mno-powerpc: %{mpower: %{!mpower2: -mpwr}}} \
%{!mno-powerpc: %{mpower: -m601}} \
%{!mno-powerpc: %{!mpower: -mppc}}} \
%{mcpu=common: -mcom} \
%{mcpu=rs6000: -mpwr} \
%{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=403: -mppc} \
%{mcpu=601: -m601} \
%{mcpu=602: -mppc} \
%{mcpu=603: -mppc} \
%{mcpu=603e: -mppc} \
%{mcpu=604: -mppc} \
%{mcpu=620: -mppc}"
#undef SUBTARGET_SWITCHES #undef SUBTARGET_SWITCHES
#define SUBTARGET_SWITCHES \ #define SUBTARGET_SWITCHES \
......
...@@ -181,11 +181,34 @@ toc_section () \ ...@@ -181,11 +181,34 @@ toc_section () \
#define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX) \ #define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX) \
fprintf (FILE, ".%s", PREFIX) fprintf (FILE, ".%s", PREFIX)
/* Pass -m601 to the assembler, since that is what powerpc.h currently
implies. */
#undef ASM_SPEC #undef ASM_SPEC
#define ASM_SPEC \ #define ASM_SPEC "\
"-u -m601 %{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}" -u \
%{!mcpu*: \
%{mpower2: -mpwrx} \
%{mpowerpc*: %{!mpower: -mppc}} \
%{mno-powerpc: %{!mpower: %{!mpower2: -mcom}}} \
%{mno-powerpc: %{mpower: %{!mpower2: -mpwr}}} \
%{!mno-powerpc: %{mpower: -m601}} \
%{!mno-powerpc: %{!mpower: -mppc}}} \
%{mcpu=common: -mcom} \
%{mcpu=rs6000: -mpwr} \
%{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=403: -mppc} \
%{mcpu=601: -m601} \
%{mcpu=602: -mppc} \
%{mcpu=603: -mppc} \
%{mcpu=603e: -mppc} \
%{mcpu=604: -mppc} \
%{mcpu=620: -mppc} \
%{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}"
/* This is the end of what might become sysv4.h. */ /* This is the end of what might become sysv4.h. */
/* Enable output of DBX (stabs) debugging information when asked for it. */ /* Enable output of DBX (stabs) debugging information when asked for it. */
......
...@@ -33,7 +33,9 @@ Boston, MA 02111-1307, USA. */ ...@@ -33,7 +33,9 @@ Boston, MA 02111-1307, USA. */
%{!mno-powerpc: %{mpower: -m601}} \ %{!mno-powerpc: %{mpower: -m601}} \
%{!mno-powerpc: %{!mpower: -mppc}}} \ %{!mno-powerpc: %{!mpower: -mppc}}} \
%{mcpu=common: -mcom} \ %{mcpu=common: -mcom} \
%{mcpu=rs6000: -mpwr} \
%{mcpu=power: -mpwr} \ %{mcpu=power: -mpwr} \
%{mcpu=power2: -mpwrx} \
%{mcpu=powerpc: -mppc} \ %{mcpu=powerpc: -mppc} \
%{mcpu=rios: -mpwr} \ %{mcpu=rios: -mpwr} \
%{mcpu=rios1: -mpwr} \ %{mcpu=rios1: -mpwr} \
...@@ -42,9 +44,11 @@ Boston, MA 02111-1307, USA. */ ...@@ -42,9 +44,11 @@ Boston, MA 02111-1307, USA. */
%{mcpu=rsc1: -mpwr} \ %{mcpu=rsc1: -mpwr} \
%{mcpu=403: -mppc} \ %{mcpu=403: -mppc} \
%{mcpu=601: -m601} \ %{mcpu=601: -m601} \
%{mcpu=602: -mppc} \
%{mcpu=603: -mppc} \ %{mcpu=603: -mppc} \
%{mcpu=603e: -mppc} \ %{mcpu=603e: -mppc} \
%{mcpu=604: -mppc}" %{mcpu=604: -mppc} \
%{mcpu=620: -mppc}"
#undef CPP_PREDEFINES #undef CPP_PREDEFINES
#define CPP_PREDEFINES "-D_IBMR2 -D_POWER -D_AIX -D_AIX32 \ #define CPP_PREDEFINES "-D_IBMR2 -D_POWER -D_AIX -D_AIX32 \
...@@ -60,7 +64,9 @@ Boston, MA 02111-1307, USA. */ ...@@ -60,7 +64,9 @@ Boston, MA 02111-1307, USA. */
%{mno-powerpc: %{!mpower: %{!mpower2: -D_ARCH_COM}}} \ %{mno-powerpc: %{!mpower: %{!mpower2: -D_ARCH_COM}}} \
%{!mno-powerpc: -D_ARCH_PPC}} \ %{!mno-powerpc: -D_ARCH_PPC}} \
%{mcpu=common: -D_ARCH_COM} \ %{mcpu=common: -D_ARCH_COM} \
%{mcpu=rs6000: -D_ARCH_PWR} \
%{mcpu=power: -D_ARCH_PWR} \ %{mcpu=power: -D_ARCH_PWR} \
%{mcpu=power2: -D_ARCH_PWR2} \
%{mcpu=powerpc: -D_ARCH_PPC} \ %{mcpu=powerpc: -D_ARCH_PPC} \
%{mcpu=rios: -D_ARCH_PWR} \ %{mcpu=rios: -D_ARCH_PWR} \
%{mcpu=rios1: -D_ARCH_PWR} \ %{mcpu=rios1: -D_ARCH_PWR} \
...@@ -69,11 +75,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -69,11 +75,7 @@ Boston, MA 02111-1307, USA. */
%{mcpu=rsc1: -D_ARCH_PWR} \ %{mcpu=rsc1: -D_ARCH_PWR} \
%{mcpu=403: -D_ARCH_PPC} \ %{mcpu=403: -D_ARCH_PPC} \
%{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \ %{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \
%{mcpu=602: -D_ARCH_PPC} \ %{mcpu=6*: -D_ARCH_PPC}"
%{mcpu=603: -D_ARCH_PPC} \
%{mcpu=603e: -D_ARCH_PPC} \
%{mcpu=604: -D_ARCH_PPC} \
%{mcpu=620: -D_ARCH_PPC}"
#undef TARGET_DEFAULT #undef TARGET_DEFAULT
#define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS) #define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS)
......
...@@ -46,7 +46,13 @@ extern int profile_block_flag; ...@@ -46,7 +46,13 @@ extern int profile_block_flag;
/* Target cpu type */ /* Target cpu type */
enum processor_type rs6000_cpu; enum processor_type rs6000_cpu;
char *rs6000_cpu_string; struct rs6000_cpu_select rs6000_select[3] =
{
/* switch name, tune arch */
{ (char *)0, "--enbable-cpu=", 1, 0 },
{ (char *)0, "-mcpu=", 1, 1 },
{ (char *)0, "-mtune=", 1, 0 },
};
/* Set to non-zero by "fix" operation to indicate that itrunc and /* Set to non-zero by "fix" operation to indicate that itrunc and
uitrunc must be defined. */ uitrunc must be defined. */
...@@ -171,8 +177,9 @@ output_options (file, f_options, f_len, W_options, W_len) ...@@ -171,8 +177,9 @@ output_options (file, f_options, f_len, W_options, W_len)
} }
} }
if (rs6000_cpu_string != (char *)0) for (j = 0; j < sizeof (rs6000_select) / sizeof(rs6000_select[0]); j++)
pos = output_option (file, "-mcpu=", rs6000_cpu_string, pos); if (rs6000_select[j].string != (char *)0)
pos = output_option (file, rs6000_select[j].name, rs6000_select[j].string, pos);
fputs ("\n\n", file); fputs ("\n\n", file);
} }
...@@ -182,9 +189,11 @@ output_options (file, f_options, f_len, W_options, W_len) ...@@ -182,9 +189,11 @@ output_options (file, f_options, f_len, W_options, W_len)
type and sometimes adjust other TARGET_ options. */ type and sometimes adjust other TARGET_ options. */
void void
rs6000_override_options () rs6000_override_options (default_cpu)
char *default_cpu;
{ {
int i; int i, j;
struct rs6000_cpu_select *ptr;
/* Simplify the entries below by making a mask for any POWER /* Simplify the entries below by making a mask for any POWER
variant and any PowerPC variant. */ variant and any PowerPC variant. */
...@@ -202,9 +211,15 @@ rs6000_override_options () ...@@ -202,9 +211,15 @@ rs6000_override_options ()
int target_disable; /* Target flags to disable. */ int target_disable; /* Target flags to disable. */
} processor_target_table[] } processor_target_table[]
= {{"common", PROCESSOR_COMMON, 0, POWER_MASKS | POWERPC_MASKS}, = {{"common", PROCESSOR_COMMON, 0, POWER_MASKS | POWERPC_MASKS},
{"rs6000", PROCESSOR_POWER,
MASK_POWER | MASK_MULTIPLE | MASK_STRING,
MASK_POWER2 | POWERPC_MASKS | MASK_NEW_MNEMONICS},
{"power", PROCESSOR_POWER, {"power", PROCESSOR_POWER,
MASK_POWER | MASK_MULTIPLE | MASK_STRING, MASK_POWER | MASK_MULTIPLE | MASK_STRING,
MASK_POWER2 | POWERPC_MASKS | MASK_NEW_MNEMONICS}, MASK_POWER2 | POWERPC_MASKS | MASK_NEW_MNEMONICS},
{"power2", PROCESSOR_POWER,
MASK_POWER | MASK_POWER2 | MASK_MULTIPLE | MASK_STRING,
POWERPC_MASKS | MASK_NEW_MNEMONICS},
{"powerpc", PROCESSOR_POWERPC, {"powerpc", PROCESSOR_POWERPC,
MASK_POWERPC | MASK_NEW_MNEMONICS, MASK_POWERPC | MASK_NEW_MNEMONICS,
POWER_MASKS | POWERPC_OPT_MASKS | MASK_POWERPC64}, POWER_MASKS | POWERPC_OPT_MASKS | MASK_POWERPC64},
...@@ -253,24 +268,32 @@ rs6000_override_options () ...@@ -253,24 +268,32 @@ rs6000_override_options ()
profile_block_flag = 0; profile_block_flag = 0;
/* Identify the processor type */ /* Identify the processor type */
if (rs6000_cpu_string == 0) rs6000_select[0].string = default_cpu;
rs6000_cpu = PROCESSOR_DEFAULT; rs6000_cpu = PROCESSOR_DEFAULT;
else if (rs6000_cpu == PROCESSOR_PPC403)
{ target_flags |= MASK_SOFT_FLOAT;
for (i = 0; i < ptt_size; i++)
if (! strcmp (rs6000_cpu_string, processor_target_table[i].name))
{
rs6000_cpu = processor_target_table[i].processor;
target_flags |= processor_target_table[i].target_enable;
target_flags &= ~processor_target_table[i].target_disable;
break;
}
if (i == ptt_size) for (i = 0; i < sizeof (rs6000_select) / sizeof (rs6000_select[0]); i++)
{
ptr = &rs6000_select[i];
if (ptr->string != (char *)0 && ptr->string[0] != '\0')
{ {
error ("bad value (%s) for -mcpu= switch", rs6000_cpu_string); for (j = 0; j < ptt_size; j++)
rs6000_cpu_string = "default"; if (! strcmp (ptr->string, processor_target_table[j].name))
rs6000_cpu = PROCESSOR_DEFAULT; {
if (ptr->set_tune_p)
rs6000_cpu = processor_target_table[j].processor;
if (ptr->set_arch_p)
{
target_flags |= processor_target_table[j].target_enable;
target_flags &= ~processor_target_table[j].target_disable;
}
break;
}
if (i == ptt_size)
error ("bad value (%s) for %s switch", ptr->string, ptr->name);
} }
} }
......
...@@ -32,6 +32,11 @@ Boston, MA 02111-1307, USA. */ ...@@ -32,6 +32,11 @@ Boston, MA 02111-1307, USA. */
/* Print subsidiary information on the compiler version in use. */ /* Print subsidiary information on the compiler version in use. */
#define TARGET_VERSION ; #define TARGET_VERSION ;
/* Default string to use for cpu if not specified. */
#ifndef TARGET_CPU_DEFAULT
#define TARGET_CPU_DEFAULT ((char *)0)
#endif
/* Tell the assembler to assume that all undefined names are external. /* Tell the assembler to assume that all undefined names are external.
Don't do this until the fixed IBM assembler is more generally available. Don't do this until the fixed IBM assembler is more generally available.
...@@ -54,7 +59,9 @@ Boston, MA 02111-1307, USA. */ ...@@ -54,7 +59,9 @@ Boston, MA 02111-1307, USA. */
%{mno-power: %{!mpowerpc*: -D_ARCH_COM}} \ %{mno-power: %{!mpowerpc*: -D_ARCH_COM}} \
%{!mno-power: %{!mpower2: -D_ARCH_PWR}}} \ %{!mno-power: %{!mpower2: -D_ARCH_PWR}}} \
%{mcpu=common: -D_ARCH_COM} \ %{mcpu=common: -D_ARCH_COM} \
%{mcpu=rs6000: -D_ARCH_PWR} \
%{mcpu=power: -D_ARCH_PWR} \ %{mcpu=power: -D_ARCH_PWR} \
%{mcpu=power2: -D_ARCH_PWR2} \
%{mcpu=powerpc: -D_ARCH_PPC} \ %{mcpu=powerpc: -D_ARCH_PPC} \
%{mcpu=rios: -D_ARCH_PWR} \ %{mcpu=rios: -D_ARCH_PWR} \
%{mcpu=rios1: -D_ARCH_PWR} \ %{mcpu=rios1: -D_ARCH_PWR} \
...@@ -63,11 +70,11 @@ Boston, MA 02111-1307, USA. */ ...@@ -63,11 +70,11 @@ Boston, MA 02111-1307, USA. */
%{mcpu=rsc1: -D_ARCH_PWR} \ %{mcpu=rsc1: -D_ARCH_PWR} \
%{mcpu=403: -D_ARCH_PPC} \ %{mcpu=403: -D_ARCH_PPC} \
%{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \ %{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \
%{mcpu=602: -D_ARCH_PPC} \ %{mcpu=602: -mppc} \
%{mcpu=603: -D_ARCH_PPC} \ %{mcpu=603: -mppc} \
%{mcpu=603e: -D_ARCH_PPC} \ %{mcpu=603e: -mppc} \
%{mcpu=604: -D_ARCH_PPC} \ %{mcpu=604: -mppc} \
%{mcpu=620: -D_ARCH_PPC}" %{mcpu=620: -mppc}"
/* Define the options for the binder: Start text at 512, align all segments /* Define the options for the binder: Start text at 512, align all segments
to 512 bytes, and warn if there is text relocation. to 512 bytes, and warn if there is text relocation.
...@@ -285,9 +292,9 @@ extern enum processor_type rs6000_cpu; ...@@ -285,9 +292,9 @@ extern enum processor_type rs6000_cpu;
#define rs6000_cpu_attr ((enum attr_cpu)rs6000_cpu) #define rs6000_cpu_attr ((enum attr_cpu)rs6000_cpu)
/* Define generic processor types based upon current deployment. */ /* Define generic processor types based upon current deployment. */
#define PROCESSOR_COMMON PROCESSOR_PPC604 #define PROCESSOR_COMMON PROCESSOR_PPC601
#define PROCESSOR_POWER PROCESSOR_RIOS1 #define PROCESSOR_POWER PROCESSOR_RIOS1
#define PROCESSOR_POWERPC PROCESSOR_PPC601 #define PROCESSOR_POWERPC PROCESSOR_PPC604
/* Define the default processor. This is overridden by other tm.h files. */ /* Define the default processor. This is overridden by other tm.h files. */
#define PROCESSOR_DEFAULT PROCESSOR_RIOS1 #define PROCESSOR_DEFAULT PROCESSOR_RIOS1
...@@ -318,13 +325,23 @@ extern enum processor_type rs6000_cpu; ...@@ -318,13 +325,23 @@ extern enum processor_type rs6000_cpu;
#define SUBTARGET_OPTIONS #define SUBTARGET_OPTIONS
#endif #endif
#define TARGET_OPTIONS \ #define TARGET_OPTIONS \
{ \ { \
{"cpu=", &rs6000_cpu_string} \ {"cpu=", &rs6000_select[1].string}, \
SUBTARGET_OPTIONS \ {"tune=", &rs6000_select[2].string}, \
SUBTARGET_OPTIONS \
} }
extern char *rs6000_cpu_string; /* rs6000_select[0] is reserved for the default cpu defined via --enable-cpu */
struct rs6000_cpu_select
{
char *string;
char *name;
int set_tune_p;
int set_arch_p;
};
extern struct rs6000_cpu_select rs6000_select[];
/* Sometimes certain combinations of command options do not make sense /* Sometimes certain combinations of command options do not make sense
on a particular target machine. You can define a macro on a particular target machine. You can define a macro
...@@ -334,7 +351,7 @@ extern char *rs6000_cpu_string; ...@@ -334,7 +351,7 @@ extern char *rs6000_cpu_string;
On the RS/6000 this is used to define the target cpu type. */ On the RS/6000 this is used to define the target cpu type. */
#define OVERRIDE_OPTIONS rs6000_override_options () #define OVERRIDE_OPTIONS rs6000_override_options (TARGET_CPU_DEFAULT)
/* Show we can debug even without a frame pointer. */ /* Show we can debug even without a frame pointer. */
#define CAN_DEBUG_WITHOUT_FP #define CAN_DEBUG_WITHOUT_FP
......
...@@ -435,7 +435,9 @@ extern int rs6000_pic_labelno; ...@@ -435,7 +435,9 @@ extern int rs6000_pic_labelno;
%{!mno-powerpc: %{mpower: -m601}} \ %{!mno-powerpc: %{mpower: -m601}} \
%{!mno-powerpc: %{!mpower: -mppc}}} \ %{!mno-powerpc: %{!mpower: -mppc}}} \
%{mcpu=common: -mcom} \ %{mcpu=common: -mcom} \
%{mcpu=rs6000: -mpwr} \
%{mcpu=power: -mpwr} \ %{mcpu=power: -mpwr} \
%{mcpu=power2: -mpwrx} \
%{mcpu=powerpc: -mppc} \ %{mcpu=powerpc: -mppc} \
%{mcpu=rios: -mpwr} \ %{mcpu=rios: -mpwr} \
%{mcpu=rios1: -mpwr} \ %{mcpu=rios1: -mpwr} \
...@@ -444,9 +446,11 @@ extern int rs6000_pic_labelno; ...@@ -444,9 +446,11 @@ extern int rs6000_pic_labelno;
%{mcpu=rsc1: -mpwr} \ %{mcpu=rsc1: -mpwr} \
%{mcpu=403: -mppc} \ %{mcpu=403: -mppc} \
%{mcpu=601: -m601} \ %{mcpu=601: -m601} \
%{mcpu=602: -mppc} \
%{mcpu=603: -mppc} \ %{mcpu=603: -mppc} \
%{mcpu=603e: -mppc} \ %{mcpu=603e: -mppc} \
%{mcpu=604: -mppc} \ %{mcpu=604: -mppc} \
%{mcpu=620: -mppc} \
%{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \ %{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \
%{mrelocatable} %{mrelocatable-lib} %{memb} \ %{mrelocatable} %{mrelocatable-lib} %{memb} \
%{mlittle} %{mlittle-endian} %{mbig} %{mbig-endian}" %{mlittle} %{mlittle-endian} %{mbig} %{mbig-endian}"
...@@ -620,7 +624,9 @@ do { \ ...@@ -620,7 +624,9 @@ do { \
%{mno-powerpc: %{!mpower: %{!mpower2: -D_ARCH_COM}}} \ %{mno-powerpc: %{!mpower: %{!mpower2: -D_ARCH_COM}}} \
%{!mno-powerpc: -D_ARCH_PPC}} \ %{!mno-powerpc: -D_ARCH_PPC}} \
%{mcpu=common: -D_ARCH_COM} \ %{mcpu=common: -D_ARCH_COM} \
%{mcpu=rs6000: -D_ARCH_PWR} \
%{mcpu=power: -D_ARCH_PWR} \ %{mcpu=power: -D_ARCH_PWR} \
%{mcpu=power2: -D_ARCH_PWR2} \
%{mcpu=powerpc: -D_ARCH_PPC} \ %{mcpu=powerpc: -D_ARCH_PPC} \
%{mcpu=rios: -D_ARCH_PWR} \ %{mcpu=rios: -D_ARCH_PWR} \
%{mcpu=rios1: -D_ARCH_PWR} \ %{mcpu=rios1: -D_ARCH_PWR} \
......
...@@ -43,7 +43,9 @@ Boston, MA 02111-1307, USA. */ ...@@ -43,7 +43,9 @@ Boston, MA 02111-1307, USA. */
%{mno-powerpc: %{!mpower: %{!mpower2: -D_ARCH_COM}}} \ %{mno-powerpc: %{!mpower: %{!mpower2: -D_ARCH_COM}}} \
%{!mno-powerpc: -D_ARCH_PPC}} \ %{!mno-powerpc: -D_ARCH_PPC}} \
%{mcpu=common: -D_ARCH_COM} \ %{mcpu=common: -D_ARCH_COM} \
%{mcpu=rs6000: -D_ARCH_PWR} \
%{mcpu=power: -D_ARCH_PWR} \ %{mcpu=power: -D_ARCH_PWR} \
%{mcpu=power2: -D_ARCH_PWR2} \
%{mcpu=powerpc: -D_ARCH_PPC} \ %{mcpu=powerpc: -D_ARCH_PPC} \
%{mcpu=rios: -D_ARCH_PWR} \ %{mcpu=rios: -D_ARCH_PWR} \
%{mcpu=rios1: -D_ARCH_PWR} \ %{mcpu=rios1: -D_ARCH_PWR} \
......
...@@ -13,10 +13,33 @@ fp-bit.c: $(srcdir)/config/fp-bit.c ...@@ -13,10 +13,33 @@ fp-bit.c: $(srcdir)/config/fp-bit.c
echo '#define FLOAT' > fp-bit.c echo '#define FLOAT' > fp-bit.c
cat $(srcdir)/config/fp-bit.c >> fp-bit.c cat $(srcdir)/config/fp-bit.c >> fp-bit.c
# Build the libraries for both hard and soft floating point # Build the libraries for both hard and soft floating point and all of the
# different processor models
MULTILIB_OPTIONS = msoft-float mcpu=common MULTILIB_OPTIONS = msoft-float \
MULTILIB_DIRNAMES = soft-float common mcpu=common/mcpu=power/mcpu=powerpc/mcpu=601/mcpu=power2
MULTILIB_DIRNAMES = soft-float \
common power powerpc 601 power2
MULTILIB_MATCHES = msoft-float=mcpu?403 \
mcpu?power=mpower \
mcpu?power=mrios1 \
mcpu?power=mcpu=rios1 \
mcpu?power2=mpower2 \
mcpu?power2=mrios2 \
mcpu?power2=mcpu=rios2 \
mcpu?powerpc=mcpu?602 \
mcpu?powerpc=mcpu?603 \
mcpu?powerpc=mcpu?603e \
mcpu?powerpc=mcpu?604 \
mcpu?powerpc=mcpu?620 \
mcpu?powerpc=mcpu?403 \
mcpu?powerpc=mpowerpc \
mcpu?powerpc=mpowerpc-gpopt \
mcpu?powerpc=mpowerpc-gfxopt \
mcpu?601=mcpu?rsc \
mcpu?601=mcpu?rsc1
LIBGCC = stmp-multilib LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib INSTALL_LIBGCC = install-multilib
......
# Same as t-newas, except don't build libgcc1-test. This is because
# the compiler emits code to call external functions to save the
# arguments that are in libc, but since libgcc1-test is linked without
# libc, they will show up as errors.
LIBGCC1_TEST =
# Do not build libgcc1.
LIBGCC1 =
CROSS_LIBGCC1 =
# These are really part of libgcc1, but this will cause them to be
# built correctly, so... [taken from t-sparclite]
LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c
dp-bit.c: $(srcdir)/config/fp-bit.c
cat $(srcdir)/config/fp-bit.c > dp-bit.c
fp-bit.c: $(srcdir)/config/fp-bit.c
echo '#define FLOAT' > fp-bit.c
cat $(srcdir)/config/fp-bit.c >> fp-bit.c
# Build the libraries for both hard and soft floating point and all of the
# different processor models
MULTILIB_OPTIONS = msoft-float \
mcpu=common/mcpu=power/mcpu=powerpc/mcpu=601/mcpu=power2
MULTILIB_DIRNAMES = soft-float \
common power powerpc 601 power2
MULTILIB_MATCHES = msoft-float=mcpu?403 \
mcpu?power=mpower \
mcpu?power=mrios1 \
mcpu?power=mcpu=rios1 \
mcpu?power2=mpower2 \
mcpu?power2=mrios2 \
mcpu?power2=mcpu=rios2 \
mcpu?powerpc=mcpu?602 \
mcpu?powerpc=mcpu?603 \
mcpu?powerpc=mcpu?603e \
mcpu?powerpc=mcpu?604 \
mcpu?powerpc=mcpu?620 \
mcpu?powerpc=mcpu?403 \
mcpu?powerpc=mpowerpc \
mcpu?powerpc=mpowerpc-gpopt \
mcpu?powerpc=mpowerpc-gfxopt \
mcpu?601=mcpu?rsc \
mcpu?601=mcpu?rsc1
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
# Aix 3.2.x needs milli.exp for -mcpu=common
EXTRA_PARTS = milli.exp
milli.exp: $(srcdir)/config/rs6000/milli.exp
rm -f milli.exp
cp $(srcdir)/config/rs6000/milli.exp ./milli.exp
# Same as t-rs6000, except don't build libgcc1-test. This is because
# the compiler emits code to call external functions to save the
# arguments that are in libc, but since libgcc1-test is linked without
# libc, they will show up as errors.
LIBGCC1_TEST =
# Do not build libgcc1.
LIBGCC1 =
CROSS_LIBGCC1 =
# These are really part of libgcc1, but this will cause them to be
# built correctly, so... [taken from t-sparclite]
LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c
dp-bit.c: $(srcdir)/config/fp-bit.c
cat $(srcdir)/config/fp-bit.c > dp-bit.c
fp-bit.c: $(srcdir)/config/fp-bit.c
echo '#define FLOAT' > fp-bit.c
cat $(srcdir)/config/fp-bit.c >> fp-bit.c
# Build the libraries for both hard and soft floating point
MULTILIB_OPTIONS = msoft-float
MULTILIB_DIRNAMES = soft-float
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment