📄 linux64.h
字号:
#undef TARGET_OS_CPP_BUILTINS#define TARGET_OS_CPP_BUILTINS() \ do \ { \ if (TARGET_64BIT) \ { \ builtin_define ("__PPC__"); \ builtin_define ("__PPC64__"); \ builtin_define ("__powerpc__"); \ builtin_define ("__powerpc64__"); \ builtin_define ("__PIC__"); \ builtin_assert ("cpu=powerpc64"); \ builtin_assert ("machine=powerpc64"); \ } \ else \ { \ builtin_define_std ("PPC"); \ builtin_define_std ("powerpc"); \ builtin_assert ("cpu=powerpc"); \ builtin_assert ("machine=powerpc"); \ TARGET_OS_SYSV_CPP_BUILTINS (); \ } \ } \ while (0)#undef CPP_OS_DEFAULT_SPEC#define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)"/* The GNU C++ standard library currently requires _GNU_SOURCE being defined on glibc-based systems. This temporary hack accomplishes this, it should go away as soon as libstdc++-v3 has a real fix. */#undef CPLUSPLUS_CPP_SPEC#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"#undef LINK_SHLIB_SPEC#define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}"#undef LIB_DEFAULT_SPEC#define LIB_DEFAULT_SPEC "%(lib_linux)"#undef STARTFILE_DEFAULT_SPEC#define STARTFILE_DEFAULT_SPEC "%(startfile_linux)"#undef ENDFILE_DEFAULT_SPEC#define ENDFILE_DEFAULT_SPEC "%(endfile_linux)"#undef LINK_START_DEFAULT_SPEC#define LINK_START_DEFAULT_SPEC "%(link_start_linux)"#undef LINK_OS_DEFAULT_SPEC#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \ %{rdynamic:-export-dynamic} \ %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"#define LINK_OS_LINUX_SPEC64 "-m elf64ppc %{!shared: %{!static: \ %{rdynamic:-export-dynamic} \ %{!dynamic-linker:-dynamic-linker /lib64/ld64.so.1}}}"#undef TOC_SECTION_ASM_OP#define TOC_SECTION_ASM_OP \ (TARGET_64BIT \ ? "\t.section\t\".toc\",\"aw\"" \ : "\t.section\t\".got\",\"aw\"")#undef MINIMAL_TOC_SECTION_ASM_OP#define MINIMAL_TOC_SECTION_ASM_OP \ (TARGET_64BIT \ ? "\t.section\t\".toc1\",\"aw\"" \ : ((TARGET_RELOCATABLE || flag_pic) \ ? "\t.section\t\".got2\",\"aw\"" \ : "\t.section\t\".got1\",\"aw\""))#undef TARGET_VERSION#define TARGET_VERSION fprintf (stderr, " (PowerPC64 GNU/Linux)");/* Must be at least as big as our pointer type. */#undef SIZE_TYPE#define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")#undef PTRDIFF_TYPE#define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int")#undef WCHAR_TYPE#define WCHAR_TYPE (TARGET_64BIT ? "int" : "long int")#undef WCHAR_TYPE_SIZE#define WCHAR_TYPE_SIZE 32/* Override rs6000.h definition. */#undef ASM_APP_ON#define ASM_APP_ON "#APP\n"/* Override rs6000.h definition. */#undef ASM_APP_OFF#define ASM_APP_OFF "#NO_APP\n"/* PowerPC no-op instruction. */#undef RS6000_CALL_GLUE#define RS6000_CALL_GLUE (TARGET_64BIT ? "nop" : "cror 31,31,31")#undef RS6000_MCOUNT#define RS6000_MCOUNT "_mcount"#ifdef __powerpc64__/* _init and _fini functions are built from bits spread across many object files, each potentially with a different TOC pointer. For that reason, place a nop after the call so that the linker can restore the TOC pointer if a TOC adjusting call stub is needed. */#if DOT_SYMBOLS#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \ asm (SECTION_OP "\n" \" bl ." #FUNC "\n" \" nop\n" \" .previous");#else#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \ asm (SECTION_OP "\n" \" bl " #FUNC "\n" \" nop\n" \" .previous");#endif#endif/* FP save and restore routines. */#undef SAVE_FP_PREFIX#define SAVE_FP_PREFIX (TARGET_64BIT ? "._savef" : "_savefpr_")#undef SAVE_FP_SUFFIX#define SAVE_FP_SUFFIX (TARGET_64BIT ? "" : "_l")#undef RESTORE_FP_PREFIX#define RESTORE_FP_PREFIX (TARGET_64BIT ? "._restf" : "_restfpr_")#undef RESTORE_FP_SUFFIX#define RESTORE_FP_SUFFIX (TARGET_64BIT ? "" : "_l")/* Dwarf2 debugging. */#undef PREFERRED_DEBUGGING_TYPE#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG/* This is how to declare the size of a function. */#undef ASM_DECLARE_FUNCTION_SIZE#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ do \ { \ if (!flag_inhibit_size_directive) \ { \ fputs ("\t.size\t", (FILE)); \ if (TARGET_64BIT && DOT_SYMBOLS) \ putc ('.', (FILE)); \ assemble_name ((FILE), (FNAME)); \ fputs (",.-", (FILE)); \ rs6000_output_function_entry (FILE, FNAME); \ putc ('\n', (FILE)); \ } \ } \ while (0)/* Return nonzero if this entry is to be written into the constant pool in a special way. We do so if this is a SYMBOL_REF, LABEL_REF or a CONST containing one of them. If -mfp-in-toc (the default), we also do this for floating-point constants. We actually can only do this if the FP formats of the target and host machines are the same, but we can't check that since not every file that uses GO_IF_LEGITIMATE_ADDRESS_P includes real.h. We also do this when we can write the entry into the TOC and the entry is not larger than a TOC entry. */#undef ASM_OUTPUT_SPECIAL_POOL_ENTRY_P#define ASM_OUTPUT_SPECIAL_POOL_ENTRY_P(X, MODE) \ (TARGET_TOC \ && (GET_CODE (X) == SYMBOL_REF \ || (GET_CODE (X) == CONST && GET_CODE (XEXP (X, 0)) == PLUS \ && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF) \ || GET_CODE (X) == LABEL_REF \ || (GET_CODE (X) == CONST_INT \ && GET_MODE_BITSIZE (MODE) <= GET_MODE_BITSIZE (Pmode)) \ || (GET_CODE (X) == CONST_DOUBLE \ && ((TARGET_64BIT \ && (TARGET_POWERPC64 \ || TARGET_MINIMAL_TOC \ || (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \ && ! TARGET_NO_FP_IN_TOC))) \ || (!TARGET_64BIT \ && !TARGET_NO_FP_IN_TOC \ && !TARGET_RELOCATABLE \ && GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \ && 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 is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is true if the symbol may be affected by dynamic relocations. */#undef ASM_PREFERRED_EH_DATA_FORMAT#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \ ((TARGET_64BIT || flag_pic || TARGET_RELOCATABLE) \ ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel \ | (TARGET_64BIT ? DW_EH_PE_udata8 : DW_EH_PE_sdata4)) \ : DW_EH_PE_absptr)/* For backward compatibility, we must continue to use the AIX structure return convention. */#undef DRAFT_V4_STRUCT_RET#define DRAFT_V4_STRUCT_RET (!TARGET_64BIT)#define TARGET_ASM_FILE_END rs6000_elf_end_indicate_exec_stack#define TARGET_POSIX_IO#define LINK_GCC_C_SEQUENCE_SPEC \ "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"/* Use --as-needed -lgcc_s for eh support. */#ifdef HAVE_LD_AS_NEEDED#define USE_LD_AS_NEEDED 1#endif#define MD_UNWIND_SUPPORT "config/rs6000/linux-unwind.h"#ifdef TARGET_LIBC_PROVIDES_SSP/* ppc32 glibc provides __stack_chk_guard in -0x7008(2), ppc64 glibc provides it at -0x7010(13). */#define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? -0x7010 : -0x7008)#endif#define POWERPC_LINUX
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -