Commit 952fc2ed by Richard Henderson Committed by Richard Henderson

alpha.h (CPP_SPEC): Tidy.

        * alpha.h (CPP_SPEC): Tidy.  Hook to cpp_cpu and cpp_subtarget.
        (CPP_SUBTARGET_SPEC): Default to empty string.
        (CPP_AM_*, CPP_IM_*, CPP_CPU_*, CPP_CPU_SPEC): New.
        (EXTRA_SPECS, SUBTARGET_EXTRA_SPECS): New.
        * alpha/elf.h (LD_SPEC): Use %(elf_dynamic_linker).
        * alpha/linux-elf.h (SUBTARGET_EXTRA_SPECS): New.
        (LIB_SPEC): Tidy.
        * alpha/linux.h (CPP_PREDEFINES): Tidy.
        * alpha/netbsd-elf.h (SUBTARGET_EXTRA_SPECS): New.
        * alpha/netbsd.h (CPP_PREDEFINES): Tidy.
        * alpha/osf.h (CPP_PREDEFINES): Remove bits subsumed by CPP_CPU_SPEC.
        * alpha/win-nt.h (CPP_PREDEFINES): Likewise.
        * alpha/vsf.h (CPP_PREDEFINES): Likewise.
        (CPP_SUBTARGET_SPEC): New.  Do this instead of overriding CPP_SPEC.
        * alpha/vxworks.h: Likewise.

From-SVN: r21311
parent 254fcdd2
Mon Jul 20 22:34:17 1998 Richard Henderson <rth@cygnus.com>
* alpha.h (CPP_SPEC): Tidy. Hook to cpp_cpu and cpp_subtarget.
(CPP_SUBTARGET_SPEC): Default to empty string.
(CPP_AM_*, CPP_IM_*, CPP_CPU_*, CPP_CPU_SPEC): New.
(EXTRA_SPECS, SUBTARGET_EXTRA_SPECS): New.
* alpha/elf.h (LD_SPEC): Use %(elf_dynamic_linker).
* alpha/linux-elf.h (SUBTARGET_EXTRA_SPECS): New.
(LIB_SPEC): Tidy.
* alpha/linux.h (CPP_PREDEFINES): Tidy.
* alpha/netbsd-elf.h (SUBTARGET_EXTRA_SPECS): New.
* alpha/netbsd.h (CPP_PREDEFINES): Tidy.
* alpha/osf.h (CPP_PREDEFINES): Remove bits subsumed by CPP_CPU_SPEC.
* alpha/win-nt.h (CPP_PREDEFINES): Likewise.
* alpha/vsf.h (CPP_PREDEFINES): Likewise.
(CPP_SUBTARGET_SPEC): New. Do this instead of overriding CPP_SPEC.
* alpha/vxworks.h: Likewise.
Mon Jul 20 22:51:57 1998 Ken Raeburn <raeburn@cygnus.com>
* mips.md (reload_outsi): Added missing REGNO call.
......
......@@ -23,14 +23,18 @@ Boston, MA 02111-1307, USA. */
/* Write out the correct language type definition for the header files.
Unless we have assembler language, write out the symbols for C. */
#define CPP_SPEC "\
%{!.S: -D__LANGUAGE_C__ -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}} \
%{.S: -D__LANGUAGE_ASSEMBLY__ -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
%{.cc: -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus} \
%{.cxx: -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus} \
%{.C: -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus} \
%{.m: -D__LANGUAGE_OBJECTIVE_C__ -D__LANGUAGE_OBJECTIVE_C} \
%{mieee:-D_IEEE_FP} \
%{mieee-with-inexact:-D_IEEE_FP -D_IEEE_FP_INEXACT}"
%{!undef:\
%{.S:-D__LANGUAGE_ASSEMBLY__ -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY }}\
%{.cc|.cxx|.C:-D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus }\
%{.m:-D__LANGUAGE_OBJECTIVE_C__ -D__LANGUAGE_OBJECTIVE_C }\
%{!.S:%{!.cc:%{!.cxx:%{!.C:%{!.m:-D__LANGUAGE_C__ -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C }}}}}}\
%{mieee:-D_IEEE_FP }\
%{mieee-with-inexact:-D_IEEE_FP -D_IEEE_FP_INEXACT }}\
%(cpp_cpu) %(cpp_subtarget)"
#ifndef CPP_SUBTARGET_SPEC
#define CPP_SUBTARGET_SPEC ""
#endif
/* Set the spec to use for signed char. The default tests the above macro
but DEC's compiler can't handle the conditional in a "constant"
......@@ -240,6 +244,88 @@ extern char *alpha_mlat_string; /* For -mmemory-latency= */
{"memory-latency=", &alpha_mlat_string}, \
}
/* Attempt to describe CPU characteristics to the preprocessor. */
/* Corresponding to amask... */
#define CPP_AM_BWX_SPEC "-D__alpha_bwx__ -Acpu(bwx)"
#define CPP_AM_MAX_SPEC "-D__alpha_max__ -Acpu(max)"
#define CPP_AM_CIX_SPEC "-D__alpha_cix__ -Acpu(cix)"
/* Corresponding to implver... */
#define CPP_IM_EV4_SPEC "-D__alpha_ev4__ -Acpu(ev4)"
#define CPP_IM_EV5_SPEC "-D__alpha_ev5__ -Acpu(ev5)"
#define CPP_IM_EV6_SPEC "-D__alpha_ev6__ -Acpu(ev6)"
/* Common combinations. */
#define CPP_CPU_EV4_SPEC "%(cpp_im_ev4)"
#define CPP_CPU_EV5_SPEC "%(cpp_im_ev5)"
#define CPP_CPU_EV56_SPEC "%(cpp_im_ev5) %(cpp_am_bwx)"
#define CPP_CPU_PCA56_SPEC "%(cpp_im_ev5) %(cpp_am_bwx) %(cpp_am_max)"
#define CPP_CPU_EV6_SPEC "%(cpp_im_ev6) %(cpp_am_bwx) %(cpp_am_max) %(cpp_am_cix)"
#ifndef CPP_CPU_DEFAULT_SPEC
# if TARGET_CPU_DEFAULT & MASK_CPU_EV6
# define CPP_CPU_DEFAULT_SPEC CPP_CPU_EV6_SPEC
# else
# if TARGET_CPU_DEFAULT & MASK_CPU_EV5
# if TARGET_CPU_DEFAULT & MASK_MAX
# define CPP_CPU_DEFAULT_SPEC CPP_CPU_PCA56_SPEC
# else
# if TARGET_CPU_DEFAULT & MASK_BWX
# define CPP_CPU_DEFAULT_SPEC CPP_CPU_EV56_SPEC
# else
# define CPP_CPU_DEFAULT_SPEC CPP_CPU_EV5_SPEC
# endif
# endif
# else
# define CPP_CPU_DEFAULT_SPEC CPP_CPU_EV4_SPEC
# endif
# endif
#endif /* CPP_CPU_DEFAULT_SPEC */
#ifndef CPP_CPU_SPEC
#define CPP_CPU_SPEC "\
%{!undef:-Acpu(alpha) -Amachine(alpha) -D__alpha -D__alpha__ \
%{mcpu=ev4|mcpu=21064:%(cpp_cpu_ev4) }\
%{mcpu=ev5|mcpu=21164:%(cpp_cpu_ev5) }\
%{mcpu=ev56|mcpu=21164a:%(cpp_cpu_ev56) }\
%{mcpu=pca56|mcpu=21164pc|mcpu=21164PC:%(cpp_cpu_pca56) }\
%{mcpu=ev6|mcpu=21264:%(cpp_cpu_ev6) }\
%{!mcpu*:%(cpp_cpu_default) }}"
#endif
/* 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.
Each subgrouping contains a string constant, that defines the
specification name, and a string constant that used by the GNU CC driver
program.
Do not define this macro if it does not need to do anything. */
#ifndef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS
#endif
#define EXTRA_SPECS \
{ "cpp_am_bwx", CPP_AM_BWX_SPEC }, \
{ "cpp_am_max", CPP_AM_MAX_SPEC }, \
{ "cpp_am_cix", CPP_AM_CIX_SPEC }, \
{ "cpp_im_ev4", CPP_IM_EV4_SPEC }, \
{ "cpp_im_ev5", CPP_IM_EV5_SPEC }, \
{ "cpp_im_ev6", CPP_IM_EV6_SPEC }, \
{ "cpp_cpu_ev4", CPP_CPU_EV4_SPEC }, \
{ "cpp_cpu_ev5", CPP_CPU_EV5_SPEC }, \
{ "cpp_cpu_ev56", CPP_CPU_EV56_SPEC }, \
{ "cpp_cpu_pca56", CPP_CPU_PCA56_SPEC }, \
{ "cpp_cpu_ev6", CPP_CPU_EV6_SPEC }, \
{ "cpp_cpu_default", CPP_CPU_DEFAULT_SPEC }, \
{ "cpp_cpu", CPP_CPU_SPEC }, \
{ "cpp_subtarget", CPP_SUBTARGET_SPEC }, \
SUBTARGET_EXTRA_SPECS
/* Sometimes certain combinations of command options do not make sense
on a particular target machine. You can define a macro
`OVERRIDE_OPTIONS' to take account of this. This macro, if
......@@ -1209,7 +1295,7 @@ do { \
/* A C expression whose value is RTL representing the value of the return
address for the frame COUNT steps up from the current frame.
FRAMEADDR is the frame pointer of the COUNT frame, or the frame pointer of
the COUNT-1 frame if RETURN_ADDR_IN_PREVIOUS_FRAME} is defined. */
the COUNT-1 frame if RETURN_ADDR_IN_PREVIOUS_FRAME is defined. */
#define RETURN_ADDR_RTX alpha_return_addr
extern struct rtx_def *alpha_return_addr ();
......
......@@ -43,7 +43,7 @@ Boston, MA 02111-1307, USA. */
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}}\
%{!dynamic-linker:-dynamic-linker %(elf_dynamic_linker)}} \
%{static:-static}}"
/* Output at beginning of assembler file. */
......
......@@ -22,8 +22,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (Alpha GNU/Linux for ECOFF)");
#undef SUB_CPP_PREDEFINES
#define SUB_CPP_PREDEFINES "-D__ECOFF__"
#undef CPP_SUBTARGET_SPEC
#define CPP_SUBTARGET_SPEC "-D__ECOFF__"
#undef LINK_SPEC
#define LINK_SPEC "-G 8 %{O*:-O3} %{!O*:-O1}"
......
......@@ -22,6 +22,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (Alpha GNU/Linux for ELF)");
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
{ "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
#undef SUB_CPP_PREDEFINES
#define SUB_CPP_PREDEFINES "-D__ELF__"
......@@ -39,7 +43,5 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifndef USE_GNULIBC_1
#undef LIB_SPEC
#define LIB_SPEC \
"%{shared: -lc} \
%{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
%{profile:-lc_p} %{!profile: -lc}}"
"%{shared:-lc}%{!shared:%{pthread:-lpthread }%{profile:-lc_p}%{!profile:-lc}} "
#endif
......@@ -23,9 +23,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define TARGET_DEFAULT (MASK_FP | MASK_FPREGS | MASK_GAS)
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "\
-D__alpha -D__alpha__ -D__linux__ -D__linux -D_LONGLONG -Dlinux -Dunix \
-Asystem(linux) -Acpu(alpha) -Amachine(alpha) " SUB_CPP_PREDEFINES
#define CPP_PREDEFINES \
"-Dlinux -Dunix -Asystem(linux) -D_LONGLONG " SUB_CPP_PREDEFINES
#undef LIB_SPEC
#define LIB_SPEC "%{pg:-lgmon} %{pg:-lc_p} %{!pg:-lc}"
......
......@@ -24,4 +24,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#undef SUB_CPP_PREDEFINES
#define SUB_CPP_PREDEFINES "-D__ELF__"
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
{ "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
#define ELF_DYNAMIC_LINKER "/usr/libexec/ld.elf_so"
......@@ -22,9 +22,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define TARGET_DEFAULT (MASK_FP | MASK_FPREGS | MASK_GAS)
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "\
-D__alpha -D__alpha__ -D__linux__ -D__linux -D_LONGLONG -Dnetbsd -Dunix \
-Asystem(linux) -Acpu(alpha) -Amachine(alpha) " SUB_CPP_PREDEFINES
#define CPP_PREDEFINES "-D_LONGLONG -Dnetbsd -Dunix " SUB_CPP_PREDEFINES
#undef LIB_SPEC
#define LIB_SPEC "%{pg:-lgmon} %{pg:-lc_p} %{!pg:-lc}"
......
......@@ -27,8 +27,8 @@ Boston, MA 02111-1307, USA. */
/* Names to predefine in the preprocessor for this target machine. */
#define CPP_PREDEFINES "\
-Dunix -D__osf__ -D__alpha -D__alpha__ -D_LONGLONG -DSYSTYPE_BSD \
-D_SYSTYPE_BSD -Asystem(unix) -Asystem(xpg4) -Acpu(alpha) -Amachine(alpha)"
-Dunix -D__osf__ -D_LONGLONG -DSYSTYPE_BSD \
-D_SYSTYPE_BSD -Asystem(unix) -Asystem(xpg4)"
/* Under OSF4, -p and -pg require -lprof1, and -lprof1 requires -lpdf. */
......
......@@ -31,20 +31,13 @@ Boston, MA 02111-1307, USA. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES \
"-D__ALPHA -Dvms -DVMS -D__alpha__ -D__alpha -D__vms__ -D__VMS__\
-Asystem(vms) -Acpu(alpha) -Amachine(alpha)"
"-D__ALPHA -Dvms -DVMS -D__vms__ -D__VMS__ -Asystem(vms)"
#undef CPP_SPEC
#define CPP_SPEC "\
#undef CPP_SUBTARGET_SPEC
#define CPP_SUBTARGET_SPEC "\
%{mfloat-ieee:-D__IEEE_FLOAT} \
%{mfloat-vax:-D__G_FLOAT} \
%{!mfloat-vax:-D__IEEE_FLOAT} \
%{!.S: -D__LANGUAGE_C__ -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}} \
%{.S: -D__LANGUAGE_ASSEMBLY__ -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
%{.cc: -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus} \
%{.cxx: -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus} \
%{.C: -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus} \
%{.m: -D__LANGUAGE_OBJECTIVE_C__ -D__LANGUAGE_OBJECTIVE_C}"
%{!mfloat-vax:-D__IEEE_FLOAT}"
/* Under OSF4, -p and -pg require -lprof1, and -lprof1 requires -lpdf. */
......
......@@ -20,20 +20,16 @@ Boston, MA 02111-1307, USA. */
/* This file just exists to give specs for the Alpha running on VxWorks. */
#undef CPP_SPEC
#define CPP_SPEC "\
#undef CPP_SUBTARGET_SPEC
#define CPP_SUBTARGET_SPEC "\
%{mvxsim:-DCPU=SIMALPHADUNIX} \
%{!mvxsim: %{!mcpu*:-DCPU=21064} \
%{mcpu=21064:-DCPU=21064} \
%{mcpu=21164:-DCPU=21164}} \
%{posix: -D_POSIX_SOURCE} \
%{!.S: -D__LANGUAGE_C__ -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}} \
%{.S: -D__LANGUAGE_ASSEMBLY__ -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}}"
%{!mvxsim: %{!mcpu*|mcpu=21064:-DCPU=21064} %{mcpu=21164:-DCPU=21164}} \
%{posix: -D_POSIX_SOURCE}"
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "\
-D__vxworks -D__alpha_vxworks -Asystem(vxworks) \
-Asystem(embedded) -D_LONGLONG -Acpu(alpha) -Amachine(alpha)"
-Asystem(embedded) -D_LONGLONG"
/* VxWorks does all the library stuff itself. */
......
......@@ -29,10 +29,8 @@ Boston, MA 02111-1307, USA. */
/* Names to predefine in the preprocessor for this target machine. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-DWIN32 -D_WIN32 -DWINNT -D__STDC__=0 -DALMOST_STDC\
-D_M_ALPHA -D_ALPHA_ -D__alpha -D__alpha__\
-D_LONGLONG -D__unaligned= -D__stdcall= \
-Asystem(winnt) -Acpu(alpha) -Amachine(alpha)"
#define CPP_PREDEFINES "-DWIN32 -D_WIN32 -DWINNT -D__STDC__=0 -DALMOST_STDC \
-D_M_ALPHA -D_ALPHA_ -D_LONGLONG -D__unaligned= -D__stdcall= -Asystem(winnt)"
#undef ASM_SPEC
#undef ASM_FINAL_SPEC
......
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