📄 sysv4.h
字号:
/* Define this to set the endianness to use in libgcc2.c, which can not depend on target_flags. */#if !defined(__LITTLE_ENDIAN__) && !defined(__sun__)#define LIBGCC2_WORDS_BIG_ENDIAN 1#else#define LIBGCC2_WORDS_BIG_ENDIAN 0#endif/* Define cutoff for using external functions to save floating point. Currently on V.4, always use inline stores. */#define FP_SAVE_INLINE(FIRST_REG) ((FIRST_REG) < 64)/* Put jump tables in read-only memory, rather than in .text. */#define JUMP_TABLES_IN_TEXT_SECTION 0/* Prefix and suffix to use to saving floating point. */#define SAVE_FP_PREFIX "_savefpr_"#define SAVE_FP_SUFFIX "_l"/* Prefix and suffix to use to restoring floating point. */#define RESTORE_FP_PREFIX "_restfpr_"#define RESTORE_FP_SUFFIX "_l"/* Type used for ptrdiff_t, as a string used in a declaration. */#define PTRDIFF_TYPE "int"/* Type used for wchar_t, as a string used in a declaration. *//* Override svr4.h definition. */#undef WCHAR_TYPE#define WCHAR_TYPE "long int"/* Width of wchar_t in bits. *//* Override svr4.h definition. */#undef WCHAR_TYPE_SIZE#define WCHAR_TYPE_SIZE 32/* Make int foo : 8 not cause structures to be aligned to an int boundary. *//* Override elfos.h definition. */#undef PCC_BITFIELD_TYPE_MATTERS#define PCC_BITFIELD_TYPE_MATTERS (TARGET_BITFIELD_TYPE)#undef BITFIELD_NBYTES_LIMITED#define BITFIELD_NBYTES_LIMITED (TARGET_NO_BITFIELD_WORD)/* Define this macro to be the value 1 if instructions will fail to work if given data not on the nominal alignment. If instructions will merely go slower in that case, define this macro as 0. */#undef STRICT_ALIGNMENT#define STRICT_ALIGNMENT (TARGET_STRICT_ALIGN)/* Define this macro if you wish to preserve a certain alignment for the stack pointer, greater than what the hardware enforces. The definition is a C expression for the desired alignment (measured in bits). This macro must evaluate to a value equal to or larger than STACK_BOUNDARY. For the SYSV ABI and variants the alignment of the stack pointer is usually controlled manually in rs6000.c. However, to maintain alignment across alloca () in all circumstances, PREFERRED_STACK_BOUNDARY needs to be set as well. This has the additional advantage of allowing a bigger maximum alignment of user objects on the stack. */#undef PREFERRED_STACK_BOUNDARY#define PREFERRED_STACK_BOUNDARY 128/* Real stack boundary as mandated by the appropriate ABI. */#define ABI_STACK_BOUNDARY \ ((TARGET_EABI && !TARGET_ALTIVEC && !TARGET_ALTIVEC_ABI) ? 64 : 128)/* An expression for the alignment of a structure field FIELD if the alignment computed in the usual way is COMPUTED. */#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \ ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \ ? 128 : COMPUTED)/* Define this macro as an expression for the alignment of a type (given by TYPE as a tree node) if the alignment computed in the usual way is COMPUTED and the alignment explicitly specified was SPECIFIED. */#define ROUND_TYPE_ALIGN(TYPE, COMPUTED, SPECIFIED) \ ((TARGET_ALTIVEC && TREE_CODE (TYPE) == VECTOR_TYPE) \ ? MAX (MAX ((COMPUTED), (SPECIFIED)), 128) \ : MAX (COMPUTED, SPECIFIED))#undef BIGGEST_FIELD_ALIGNMENT/* Use ELF style section commands. */#define TEXT_SECTION_ASM_OP "\t.section\t\".text\""#define DATA_SECTION_ASM_OP "\t.section\t\".data\""#define BSS_SECTION_ASM_OP "\t.section\t\".bss\""/* APPLE LOCAL begin hot/cold partitioning */#define HOT_TEXT_SECTION_NAME ".text"#define UNLIKELY_EXECUTED_TEXT_SECTION_NAME ".text.unlikely"/* APPLE LOCAL end hot/cold partitioning *//* Override elfos.h definition. */#undef INIT_SECTION_ASM_OP#define INIT_SECTION_ASM_OP "\t.section\t\".init\",\"ax\""/* Override elfos.h definition. */#undef FINI_SECTION_ASM_OP#define FINI_SECTION_ASM_OP "\t.section\t\".fini\",\"ax\""#define TOC_SECTION_ASM_OP "\t.section\t\".got\",\"aw\""/* Put PC relative got entries in .got2. */#define MINIMAL_TOC_SECTION_ASM_OP \ (TARGET_RELOCATABLE || (flag_pic && DEFAULT_ABI != ABI_AIX) \ ? "\t.section\t\".got2\",\"aw\"" : "\t.section\t\".got1\",\"aw\"")#define SDATA_SECTION_ASM_OP "\t.section\t\".sdata\",\"aw\""#define SDATA2_SECTION_ASM_OP "\t.section\t\".sdata2\",\"a\""#define SBSS_SECTION_ASM_OP "\t.section\t\".sbss\",\"aw\",@nobits"/* Besides the usual ELF sections, we need a toc section. *//* Override elfos.h definition. */#undef EXTRA_SECTIONS#define EXTRA_SECTIONS in_toc, in_sdata, in_sdata2, in_sbss, in_init, in_fini/* Override elfos.h definition. */#undef EXTRA_SECTION_FUNCTIONS#define EXTRA_SECTION_FUNCTIONS \ TOC_SECTION_FUNCTION \ SDATA_SECTION_FUNCTION \ SDATA2_SECTION_FUNCTION \ SBSS_SECTION_FUNCTION \ INIT_SECTION_FUNCTION \ FINI_SECTION_FUNCTION#define TOC_SECTION_FUNCTION \void \toc_section (void) \{ \ if (in_section != in_toc) \ { \ in_section = in_toc; \ if (DEFAULT_ABI == ABI_AIX \ && TARGET_MINIMAL_TOC \ && !TARGET_RELOCATABLE) \ { \ if (! toc_initialized) \ { \ toc_initialized = 1; \ fprintf (asm_out_file, "%s\n", TOC_SECTION_ASM_OP); \ (*targetm.asm_out.internal_label) (asm_out_file, "LCTOC", 0); \ fprintf (asm_out_file, "\t.tc "); \ ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1[TC],"); \ ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1"); \ fprintf (asm_out_file, "\n"); \ \ fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP); \ ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1"); \ fprintf (asm_out_file, " = .+32768\n"); \ } \ else \ fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP); \ } \ else if (DEFAULT_ABI == ABI_AIX && !TARGET_RELOCATABLE) \ fprintf (asm_out_file, "%s\n", TOC_SECTION_ASM_OP); \ else \ { \ fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP); \ if (! toc_initialized) \ { \ ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1"); \ fprintf (asm_out_file, " = .+32768\n"); \ toc_initialized = 1; \ } \ } \ } \} \ \extern int in_toc_section (void); \int in_toc_section (void) \{ \ return in_section == in_toc; \}#define SDATA_SECTION_FUNCTION \void \sdata_section (void) \{ \ if (in_section != in_sdata) \ { \ in_section = in_sdata; \ fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP); \ } \}#define SDATA2_SECTION_FUNCTION \void \sdata2_section (void) \{ \ if (in_section != in_sdata2) \ { \ in_section = in_sdata2; \ fprintf (asm_out_file, "%s\n", SDATA2_SECTION_ASM_OP); \ } \}#define SBSS_SECTION_FUNCTION \void \sbss_section (void) \{ \ if (in_section != in_sbss) \ { \ in_section = in_sbss; \ fprintf (asm_out_file, "%s\n", SBSS_SECTION_ASM_OP); \ } \}#define INIT_SECTION_FUNCTION \void \init_section (void) \{ \ if (in_section != in_init) \ { \ in_section = in_init; \ fprintf (asm_out_file, "%s\n", INIT_SECTION_ASM_OP); \ } \}#define FINI_SECTION_FUNCTION \void \fini_section (void) \{ \ if (in_section != in_fini) \ { \ in_section = in_fini; \ fprintf (asm_out_file, "%s\n", FINI_SECTION_ASM_OP); \ } \}/* Override default elf definitions. */#undef TARGET_ASM_SELECT_RTX_SECTION#define TARGET_ASM_SELECT_RTX_SECTION rs6000_elf_select_rtx_section#undef TARGET_ASM_SELECT_SECTION#define TARGET_ASM_SELECT_SECTION rs6000_elf_select_section#define TARGET_ASM_UNIQUE_SECTION rs6000_elf_unique_section/* 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. Unlike AIX, we don't key off of -mminimal-toc, but instead do not allow floating point constants in the TOC if -mrelocatable. */#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)) \ || (!TARGET_NO_FP_IN_TOC \ && !TARGET_RELOCATABLE \ && GET_CODE (X) == CONST_DOUBLE \ && GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \ && BITS_PER_WORD == HOST_BITS_PER_INT)))/* These macros generate the special .type and .size directives which are used to set the corresponding fields of the linker symbol table entries in an ELF object file under SVR4. These macros also output the starting labels for the relevant functions/objects. *//* Write the extra assembler code needed to declare a function properly. Some svr4 assemblers need to also have something extra said about the function's return value. We allow for that here. */extern int rs6000_pic_labelno;/* Override elfos.h definition. */#undef ASM_DECLARE_FUNCTION_NAME#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ rs6000_elf_declare_function_name ((FILE), (NAME), (DECL))/* The USER_LABEL_PREFIX stuff is affected by the -fleading-underscore flag. The LOCAL_LABEL_PREFIX variable is used by dbxelf.h. */#define LOCAL_LABEL_PREFIX "."#define USER_LABEL_PREFIX ""/* svr4.h overrides (*targetm.asm_out.internal_label). */#define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX) \ asm_fprintf (FILE, "%L%s", PREFIX)/* Globalizing directive for a label. */#define GLOBAL_ASM_OP "\t.globl "/* This says how to output assembler code to declare an uninitialized internal linkage data object. Under SVR4, the linker seems to want the alignment of data objects to depend on their types. We do exactly that here. */#define LOCAL_ASM_OP "\t.local\t"#define LCOMM_ASM_OP "\t.lcomm\t"/* Override elfos.h definition. */#undef ASM_OUTPUT_ALIGNED_LOCAL#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \do { \ if (rs6000_sdata != SDATA_NONE && (SIZE) > 0 \ && (SIZE) <= g_switch_value) \ { \ sbss_section (); \ ASM_OUTPUT_ALIGN (FILE, exact_log2 (ALIGN / BITS_PER_UNIT)); \ ASM_OUTPUT_LABEL (FILE, NAME); \ ASM_OUTPUT_SKIP (FILE, SIZE); \ if (!flag_inhibit_size_directive && (SIZE) > 0) \ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \ } \ else \ { \ fprintf (FILE, "%s", LCOMM_ASM_OP); \ assemble_name ((FILE), (NAME)); \ fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \ (SIZE), (ALIGN) / BITS_PER_UNIT); \ } \ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \} while (0)/* Describe how to emit uninitialized external linkage items. */#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \do { \ ASM_OUTPUT_ALIGNED_LOCAL (FILE, NAME, SIZE, ALIGN); \} while (0)#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN/* To support -falign-* switches we need to use .p2align so that alignment directives in code sections will be padded with no-op instructions, rather than zeroes. */#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -