include dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h netbsd.h
and netbsd-elf.h on powerpc64-netbsd. port netbsd64.h forward from GCC changes. (it's a pity that a vast portion of linux64.h isn't in some common header that netbsd64.h and freebsd64.h could also used. there's 100s of lines of copypasta here, oh well.)
This commit is contained in:
parent
93bd3693a8
commit
c9d652c862
4
external/gpl3/gcc/dist/gcc/config.gcc
vendored
4
external/gpl3/gcc/dist/gcc/config.gcc
vendored
@ -2114,13 +2114,15 @@ powerpc*-*-freebsd*)
|
|||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
powerpc*-*-netbsd*)
|
powerpc*-*-netbsd*)
|
||||||
|
tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h"
|
||||||
|
tm_file="${tm_file} netbsd.h netbsd-elf.h"
|
||||||
case ${target} in
|
case ${target} in
|
||||||
powerpc64*)
|
powerpc64*)
|
||||||
tm_file="rs6000/biarch64.h ${tm_file} rs6000/default64.h rs6000/netbsd64.h"
|
tm_file="rs6000/biarch64.h ${tm_file} rs6000/default64.h rs6000/netbsd64.h"
|
||||||
tmake_file="${tmake_file} rs6000/t-netbsd64"
|
tmake_file="${tmake_file} rs6000/t-netbsd64"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
|
tm_file="${tm_file} rs6000/netbsd.h"
|
||||||
tmake_file="${tmake_file} rs6000/t-netbsd"
|
tmake_file="${tmake_file} rs6000/t-netbsd"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
136
external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h
vendored
136
external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h
vendored
@ -59,6 +59,15 @@ extern int dot_symbols;
|
|||||||
|
|
||||||
#define TARGET_PROFILE_KERNEL profile_kernel
|
#define TARGET_PROFILE_KERNEL profile_kernel
|
||||||
|
|
||||||
|
#define TARGET_USES_LINUX64_OPT 1
|
||||||
|
#ifdef HAVE_LD_LARGE_TOC
|
||||||
|
#undef TARGET_CMODEL
|
||||||
|
#define TARGET_CMODEL rs6000_current_cmodel
|
||||||
|
#define SET_CMODEL(opt) rs6000_current_cmodel = opt
|
||||||
|
#else
|
||||||
|
#define SET_CMODEL(opt) do {} while (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef PROCESSOR_DEFAULT
|
#undef PROCESSOR_DEFAULT
|
||||||
#define PROCESSOR_DEFAULT PROCESSOR_POWER4
|
#define PROCESSOR_DEFAULT PROCESSOR_POWER4
|
||||||
#undef PROCESSOR_DEFAULT64
|
#undef PROCESSOR_DEFAULT64
|
||||||
@ -80,7 +89,7 @@ extern int dot_symbols;
|
|||||||
#define SUBSUBTARGET_OVERRIDE_OPTIONS \
|
#define SUBSUBTARGET_OVERRIDE_OPTIONS \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
if (!rs6000_explicit_options.alignment) \
|
if (!global_options_set.x_rs6000_alignment_flags) \
|
||||||
rs6000_alignment_flags = MASK_ALIGN_NATURAL; \
|
rs6000_alignment_flags = MASK_ALIGN_NATURAL; \
|
||||||
if (TARGET_64BIT) \
|
if (TARGET_64BIT) \
|
||||||
{ \
|
{ \
|
||||||
@ -90,14 +99,14 @@ extern int dot_symbols;
|
|||||||
error (INVALID_64BIT, "call"); \
|
error (INVALID_64BIT, "call"); \
|
||||||
} \
|
} \
|
||||||
dot_symbols = !strcmp (rs6000_abi_name, "aixdesc"); \
|
dot_symbols = !strcmp (rs6000_abi_name, "aixdesc"); \
|
||||||
if (target_flags & MASK_RELOCATABLE) \
|
if (rs6000_isa_flags & OPTION_MASK_RELOCATABLE) \
|
||||||
{ \
|
{ \
|
||||||
target_flags &= ~MASK_RELOCATABLE; \
|
rs6000_isa_flags &= ~OPTION_MASK_RELOCATABLE; \
|
||||||
error (INVALID_64BIT, "relocatable"); \
|
error (INVALID_64BIT, "relocatable"); \
|
||||||
} \
|
} \
|
||||||
if (target_flags & MASK_EABI) \
|
if (rs6000_isa_flags & OPTION_MASK_EABI) \
|
||||||
{ \
|
{ \
|
||||||
target_flags &= ~MASK_EABI; \
|
rs6000_isa_flags &= ~OPTION_MASK_EABI; \
|
||||||
error (INVALID_64BIT, "eabi"); \
|
error (INVALID_64BIT, "eabi"); \
|
||||||
} \
|
} \
|
||||||
if (TARGET_PROTOTYPE) \
|
if (TARGET_PROTOTYPE) \
|
||||||
@ -105,11 +114,28 @@ extern int dot_symbols;
|
|||||||
target_prototype = 0; \
|
target_prototype = 0; \
|
||||||
error (INVALID_64BIT, "prototype"); \
|
error (INVALID_64BIT, "prototype"); \
|
||||||
} \
|
} \
|
||||||
if ((target_flags & MASK_POWERPC64) == 0) \
|
if ((rs6000_isa_flags & OPTION_MASK_POWERPC64) == 0) \
|
||||||
{ \
|
{ \
|
||||||
target_flags |= MASK_POWERPC64; \
|
rs6000_isa_flags |= OPTION_MASK_POWERPC64; \
|
||||||
error ("-m64 requires a PowerPC64 cpu"); \
|
error ("-m64 requires a PowerPC64 cpu"); \
|
||||||
} \
|
} \
|
||||||
|
if ((rs6000_isa_flags_explicit \
|
||||||
|
& OPTION_MASK_MINIMAL_TOC) != 0) \
|
||||||
|
{ \
|
||||||
|
if (global_options_set.x_rs6000_current_cmodel \
|
||||||
|
&& rs6000_current_cmodel != CMODEL_SMALL) \
|
||||||
|
error ("-mcmodel incompatible with other toc options"); \
|
||||||
|
SET_CMODEL (CMODEL_SMALL); \
|
||||||
|
} \
|
||||||
|
{ \
|
||||||
|
if (!global_options_set.x_rs6000_current_cmodel) \
|
||||||
|
SET_CMODEL (CMODEL_MEDIUM); \
|
||||||
|
if (rs6000_current_cmodel != CMODEL_SMALL) \
|
||||||
|
{ \
|
||||||
|
TARGET_NO_FP_IN_TOC = 0; \
|
||||||
|
TARGET_NO_SUM_IN_TOC = 0; \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
} \
|
} \
|
||||||
else \
|
else \
|
||||||
{ \
|
{ \
|
||||||
@ -120,16 +146,23 @@ extern int dot_symbols;
|
|||||||
TARGET_PROFILE_KERNEL = 0; \
|
TARGET_PROFILE_KERNEL = 0; \
|
||||||
error (INVALID_32BIT, "profile-kernel"); \
|
error (INVALID_32BIT, "profile-kernel"); \
|
||||||
} \
|
} \
|
||||||
|
if (global_options_set.x_rs6000_current_cmodel) \
|
||||||
|
{ \
|
||||||
|
SET_CMODEL (CMODEL_SMALL); \
|
||||||
|
error (INVALID_32BIT, "cmodel"); \
|
||||||
|
} \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
while (0)
|
while (0)
|
||||||
|
|
||||||
#ifdef RS6000_BI_ARCH
|
#ifdef RS6000_BI_ARCH
|
||||||
|
|
||||||
|
#if 0
|
||||||
#undef OVERRIDE_OPTIONS
|
#undef OVERRIDE_OPTIONS
|
||||||
#define OVERRIDE_OPTIONS \
|
#define OVERRIDE_OPTIONS \
|
||||||
rs6000_override_options (((TARGET_DEFAULT ^ target_flags) & MASK_64BIT) \
|
rs6000_override_options (((TARGET_DEFAULT ^ target_flags) & MASK_64BIT) \
|
||||||
? (char *) 0 : TARGET_CPU_DEFAULT)
|
? (char *) 0 : TARGET_CPU_DEFAULT)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -153,23 +186,15 @@ extern int dot_symbols;
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ASM_SPEC32 "-a32 %{n} %{T} %{Ym,*} %{Yd,*} \
|
#define ASM_SPEC32 "-a32 \
|
||||||
%{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} \
|
%{mrelocatable} %{mrelocatable-lib} %{fpic|fpie|fPIC|fPIE:-K PIC} \
|
||||||
%{memb} %{!memb: %{msdata: -memb} %{msdata=eabi: -memb}} \
|
%{memb|msdata=eabi: -memb}"
|
||||||
%{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \
|
|
||||||
%{mcall-freebsd: -mbig} \
|
|
||||||
%{mcall-i960-old: -mlittle} \
|
|
||||||
%{mcall-linux: -mbig} \
|
|
||||||
%{mcall-gnu: -mbig} \
|
|
||||||
%{mcall-netbsd: -mbig} \
|
|
||||||
}}}}"
|
|
||||||
|
|
||||||
#define ASM_SPEC64 "-a64"
|
#define ASM_SPEC64 "-a64"
|
||||||
|
|
||||||
#define ASM_SPEC_COMMON "%(asm_cpu) \
|
#define ASM_SPEC_COMMON "%(asm_cpu) \
|
||||||
%{.s: %{mregnames} %{mno-regnames}} %{.S: %{mregnames} %{mno-regnames}} \
|
%{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}}" \
|
||||||
%{v:-V} %{Qy:} %{!Qn:-Qy} %{Wa,*:%*} \
|
ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
|
||||||
%{mlittle} %{mlittle-endian} %{mbig} %{mbig-endian}"
|
|
||||||
|
|
||||||
#undef SUBSUBTARGET_EXTRA_SPECS
|
#undef SUBSUBTARGET_EXTRA_SPECS
|
||||||
#define SUBSUBTARGET_EXTRA_SPECS \
|
#define SUBSUBTARGET_EXTRA_SPECS \
|
||||||
@ -260,10 +285,6 @@ extern int dot_symbols;
|
|||||||
#define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \
|
#define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \
|
||||||
(!(FIRST) ? upward : FUNCTION_ARG_PADDING (MODE, TYPE))
|
(!(FIRST) ? upward : FUNCTION_ARG_PADDING (MODE, TYPE))
|
||||||
|
|
||||||
/* Override svr4.h */
|
|
||||||
#undef MD_EXEC_PREFIX
|
|
||||||
#undef MD_STARTFILE_PREFIX
|
|
||||||
|
|
||||||
/* NetBSD doesn't support saving and restoring 64-bit regs in a 32-bit
|
/* NetBSD doesn't support saving and restoring 64-bit regs in a 32-bit
|
||||||
process. XXXMRG? */
|
process. XXXMRG? */
|
||||||
#define OS_MISSING_POWERPC64 !TARGET_64BIT
|
#define OS_MISSING_POWERPC64 !TARGET_64BIT
|
||||||
@ -328,9 +349,6 @@ extern int dot_symbols;
|
|||||||
#undef ENDFILE_DEFAULT_SPEC
|
#undef ENDFILE_DEFAULT_SPEC
|
||||||
#define ENDFILE_DEFAULT_SPEC "%(endfile_netbsd)"
|
#define ENDFILE_DEFAULT_SPEC "%(endfile_netbsd)"
|
||||||
|
|
||||||
#undef CRTSAVRES_DEFAULT_SPEC
|
|
||||||
#define CRTSAVRES_DEFAULT_SPEC ""
|
|
||||||
|
|
||||||
#undef LINK_START_DEFAULT_SPEC
|
#undef LINK_START_DEFAULT_SPEC
|
||||||
#define LINK_START_DEFAULT_SPEC "%(link_start_netbsd)"
|
#define LINK_START_DEFAULT_SPEC "%(link_start_netbsd)"
|
||||||
|
|
||||||
@ -468,68 +486,6 @@ extern int dot_symbols;
|
|||||||
&& SCALAR_FLOAT_MODE_P (GET_MODE (X)) \
|
&& SCALAR_FLOAT_MODE_P (GET_MODE (X)) \
|
||||||
&& BITS_PER_WORD == HOST_BITS_PER_INT)))))
|
&& BITS_PER_WORD == HOST_BITS_PER_INT)))))
|
||||||
|
|
||||||
/* This ABI cannot use DBX_LINES_FUNCTION_RELATIVE, nor can it use
|
|
||||||
dbxout_stab_value_internal_label_diff, because we must
|
|
||||||
use the function code label, not the function descriptor label. */
|
|
||||||
#define DBX_OUTPUT_SOURCE_LINE(FILE, LINE, COUNTER) \
|
|
||||||
do \
|
|
||||||
{ \
|
|
||||||
char temp[256]; \
|
|
||||||
const char *s; \
|
|
||||||
ASM_GENERATE_INTERNAL_LABEL (temp, "LM", COUNTER); \
|
|
||||||
dbxout_begin_stabn_sline (LINE); \
|
|
||||||
assemble_name (FILE, temp); \
|
|
||||||
putc ('-', FILE); \
|
|
||||||
s = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0); \
|
|
||||||
rs6000_output_function_entry (FILE, s); \
|
|
||||||
putc ('\n', FILE); \
|
|
||||||
targetm.asm_out.internal_label (FILE, "LM", COUNTER); \
|
|
||||||
COUNTER += 1; \
|
|
||||||
} \
|
|
||||||
while (0)
|
|
||||||
|
|
||||||
/* Similarly, we want the function code label here. Cannot use
|
|
||||||
dbxout_stab_value_label_diff, as we have to use
|
|
||||||
rs6000_output_function_entry. FIXME. */
|
|
||||||
#define DBX_OUTPUT_BRAC(FILE, NAME, BRAC) \
|
|
||||||
do \
|
|
||||||
{ \
|
|
||||||
const char *s; \
|
|
||||||
dbxout_begin_stabn (BRAC); \
|
|
||||||
s = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0); \
|
|
||||||
/* dbxout_block passes this macro the function name as NAME, \
|
|
||||||
assuming that it is the function code start label. In our \
|
|
||||||
case, the function name is the OPD entry. dbxout_block is \
|
|
||||||
broken, hack around it here. */ \
|
|
||||||
if (NAME == s) \
|
|
||||||
putc ('0', FILE); \
|
|
||||||
else \
|
|
||||||
{ \
|
|
||||||
assemble_name (FILE, NAME); \
|
|
||||||
putc ('-', FILE); \
|
|
||||||
rs6000_output_function_entry (FILE, s); \
|
|
||||||
} \
|
|
||||||
putc ('\n', FILE); \
|
|
||||||
} \
|
|
||||||
while (0)
|
|
||||||
|
|
||||||
#define DBX_OUTPUT_LBRAC(FILE, NAME) DBX_OUTPUT_BRAC (FILE, NAME, N_LBRAC)
|
|
||||||
#define DBX_OUTPUT_RBRAC(FILE, NAME) DBX_OUTPUT_BRAC (FILE, NAME, N_RBRAC)
|
|
||||||
|
|
||||||
/* Another case where we want the dot name. */
|
|
||||||
#define DBX_OUTPUT_NFUN(FILE, LSCOPE, DECL) \
|
|
||||||
do \
|
|
||||||
{ \
|
|
||||||
const char *s; \
|
|
||||||
dbxout_begin_empty_stabs (N_FUN); \
|
|
||||||
assemble_name (FILE, LSCOPE); \
|
|
||||||
putc ('-', FILE); \
|
|
||||||
s = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0); \
|
|
||||||
rs6000_output_function_entry (FILE, s); \
|
|
||||||
putc ('\n', FILE); \
|
|
||||||
} \
|
|
||||||
while (0)
|
|
||||||
|
|
||||||
/* Select a format to encode pointers in exception handling data. CODE
|
/* Select a format to encode pointers in exception handling data. CODE
|
||||||
is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
|
is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
|
||||||
true if the symbol may be affected by dynamic relocations. */
|
true if the symbol may be affected by dynamic relocations. */
|
||||||
@ -545,8 +501,6 @@ while (0)
|
|||||||
#undef DRAFT_V4_STRUCT_RET
|
#undef DRAFT_V4_STRUCT_RET
|
||||||
#define DRAFT_V4_STRUCT_RET (!TARGET_64BIT)
|
#define DRAFT_V4_STRUCT_RET (!TARGET_64BIT)
|
||||||
|
|
||||||
#define TARGET_ASM_FILE_END rs6000_elf_end_indicate_exec_stack
|
|
||||||
|
|
||||||
#define TARGET_POSIX_IO
|
#define TARGET_POSIX_IO
|
||||||
|
|
||||||
#define LINK_GCC_C_SEQUENCE_SPEC \
|
#define LINK_GCC_C_SEQUENCE_SPEC \
|
||||||
|
Loading…
Reference in New Issue
Block a user