📄 sysv4.h
字号:
#define RESTORE_FP_PREFIX "_restfpr_"#define RESTORE_FP_SUFFIX "_l"/* Type used for ptrdiff_t, as a string used in a declaration. */#undef PTRDIFF_TYPE#define PTRDIFF_TYPE "int"/* Type used for wchar_t, as a string used in a declaration. */#undef WCHAR_TYPE#define WCHAR_TYPE "long int"/* Width of wchar_t in bits. */#undef WCHAR_TYPE_SIZE#define WCHAR_TYPE_SIZE 32/* Make int foo : 8 not cause structures to be aligned to an int boundary */#undef PCC_BITFIELD_TYPE_MATTERS#define PCC_BITFIELD_TYPE_MATTERS (TARGET_BITFIELD_TYPE)/* 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)/* Alignment in bits of the stack boundary. Note, in order to allow building one set of libraries with -mno-eabi instead of eabi libraries and non-eabi versions, just use 64 as the stack boundary. */#undef STACK_BOUNDARY#define STACK_BOUNDARY 64/* Real stack boundary as mandated by the appropriate ABI */#define ABI_STACK_BOUNDARY ((TARGET_EABI) ? 64 : 128)/* No data type wants to be aligned rounder than this. */#undef BIGGEST_ALIGNMENT#define BIGGEST_ALIGNMENT ((TARGET_EABI) ? 64 : 128)#undef BIGGEST_FIELD_ALIGNMENT#undef ADJUST_FIELD_ALIGN#undef ROUND_TYPE_ALIGN/* Use ELF style section commands. */#undef TEXT_SECTION_ASM_OP#define TEXT_SECTION_ASM_OP "\t.section\t\".text\""#undef DATA_SECTION_ASM_OP#define DATA_SECTION_ASM_OP "\t.section\t\".data\""#undef BSS_SECTION_ASM_OP#define BSS_SECTION_ASM_OP "\t.section\t\".bss\""#undef INIT_SECTION_ASM_OP#define INIT_SECTION_ASM_OP "\t.section\t\".init\",\"ax\""#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) ? "\t.section\t\".got2\",\"aw\"" : "\t.section\t\".got1\",\"aw\"")/* Put relocatable data in .data, not .rodata so initialized pointers can be updated */#undef CONST_SECTION_ASM_OP#define CONST_SECTION_ASM_OP \ ((TARGET_RELOCATABLE || flag_pic) ? "\t.section\t\".data\"\t# .rodata" : "\t.section\t\".rodata\"")#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 \ ((DEFAULT_ABI == ABI_SOLARIS) ? "\t.section\t\".sbss\",\"aw\"" : "\t.section\t\".sbss\",\"aw\",@nobits")/* Besides the usual ELF sections, we need a toc section. */#undef EXTRA_SECTIONS#define EXTRA_SECTIONS in_const, in_ctors, in_dtors, in_toc, in_sdata, in_sdata2, in_sbss, in_init, in_fini#undef EXTRA_SECTION_FUNCTIONS#define EXTRA_SECTION_FUNCTIONS \ CONST_SECTION_FUNCTION \ CTORS_SECTION_FUNCTION \ DTORS_SECTION_FUNCTION \ TOC_SECTION_FUNCTION \ SDATA_SECTION_FUNCTION \ SDATA2_SECTION_FUNCTION \ SBSS_SECTION_FUNCTION \ INIT_SECTION_FUNCTION \ FINI_SECTION_FUNCTIONextern void toc_section (), sdata_section (), sdata2_section ();extern void sbss_section ();#define TOC_SECTION_FUNCTION \void \toc_section () \{ \ if (in_section != in_toc) \ { \ in_section = in_toc; \ if ((DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_NT) \ && TARGET_MINIMAL_TOC \ && !TARGET_RELOCATABLE) \ { \ if (! toc_initialized) \ { \ toc_initialized = 1; \ fprintf (asm_out_file, "%s\n", TOC_SECTION_ASM_OP); \ ASM_OUTPUT_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 || DEFAULT_ABI == ABI_NT) \ && !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; \ } \ } \ } \}#define SDATA_SECTION_FUNCTION \void \sdata_section () \{ \ 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 () \{ \ 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 () \{ \ 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 () \{ \ 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 () \{ \ if (in_section != in_fini) \ { \ in_section = in_fini; \ fprintf (asm_out_file, "%s\n", FINI_SECTION_ASM_OP); \ } \}/* A C statement or statements to switch to the appropriate section for output of RTX in mode MODE. You can assume that RTX is some kind of constant in RTL. The argument MODE is redundant except in the case of a `const_int' rtx. Select the section by calling `text_section' or one of the alternatives for other sections. Do not define this macro if you put all constants in the read-only data section. */extern void rs6000_select_rtx_section (), rs6000_select_section ();#undef SELECT_RTX_SECTION#define SELECT_RTX_SECTION(MODE, X) rs6000_select_rtx_section (MODE, X)/* A C statement or statements to switch to the appropriate section for output of DECL. DECL is either a `VAR_DECL' node or a constant of some sort. RELOC indicates whether forming the initial value of DECL requires link-time relocations. */#undef SELECT_SECTION#define SELECT_SECTION(DECL,RELOC) rs6000_select_section (DECL, RELOC)/* Return non-zero 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) \ (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 \ || (!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;#undef ASM_DECLARE_FUNCTION_NAME#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ do { \ char *orig_name; \ char *init_ptr = (TARGET_64BIT) ? ".quad" : ".long"; \ STRIP_NAME_ENCODING (orig_name, NAME); \ \ if (TARGET_RELOCATABLE && (get_pool_size () != 0 || profile_flag)) \ { \ char buf[256], *buf_ptr; \ \ ASM_OUTPUT_INTERNAL_LABEL (FILE, "LCL", rs6000_pic_labelno); \ \ ASM_GENERATE_INTERNAL_LABEL (buf, "LCTOC", 1); \ STRIP_NAME_ENCODING (buf_ptr, buf); \ fprintf (FILE, "\t%s %s-", init_ptr, buf_ptr); \ \ ASM_GENERATE_INTERNAL_LABEL (buf, "LCF", rs6000_pic_labelno); \ fprintf (FILE, "%s\n", buf_ptr); \ } \ \ fprintf (FILE, "\t%s\t %s,", TYPE_ASM_OP, orig_name); \ fprintf (FILE, TYPE_OPERAND_FMT, "function"); \ putc ('\n', FILE); \ ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ \ if (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_NT) \ { \ char *desc_name = orig_name; \ \ while (*desc_name == '.') \ desc_name++; \ \ if (TREE_PUBLIC (DECL)) \ fprintf (FILE, "\t.globl %s\n", desc_name); \ \ fprintf (FILE, "%s\n", MINIMAL_TOC_SECTION_ASM_OP); \ fprintf (FILE, "%s:\n", desc_name); \ fprintf (FILE, "\t%s %s\n", init_ptr, orig_name); \ fprintf (FILE, "\t%s _GLOBAL_OFFSET_TABLE_\n", init_ptr); \ if (DEFAULT_ABI == ABI_AIX) \ fprintf (FILE, "\t%s 0\n", init_ptr); \ fprintf (FILE, "\t.previous\n"); \ } \ fprintf (FILE, "%s:\n", orig_name); \ } while (0)/* How to renumber registers for dbx and gdb. */#define DBX_REGISTER_NUMBER(REGNO) (REGNO)/* svr4.h overrides ASM_OUTPUT_INTERNAL_LABEL. */#undef ASM_OUTPUT_INTERNAL_LABEL_PREFIX#define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX) \ fprintf (FILE, ".%s", PREFIX)/* This is how to allocate empty space in some section. Use .space instead of .zero because the Solaris PowerPC assembler doesn't like it, and gas accepts either syntax. */#undef SKIP_ASM_OP#define SKIP_ASM_OP ".space"/* 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. */#ifndef LOCAL_ASM_OP#define LOCAL_ASM_OP ".local"#endif#ifndef LCOMM_ASM_OP#define LCOMM_ASM_OP ".lcomm"#endif#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) \ { \ fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ assemble_name (FILE, NAME); \ fprintf (FILE, ",%d\n", SIZE); \ } \ } \ else \ { \ fprintf (FILE, "\t%s\t", LCOMM_ASM_OP); \ assemble_name ((FILE), (NAME)); \ fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \ } \} while (0)/* Describe how to emit uninitialized external linkage items */#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \do { \ ASM_GLOBALIZE_LABEL (FILE, NAME); \ ASM_OUTPUT_ALIGNED_LOCAL (FILE, NAME, SIZE, ALIGN); \} while (0)/* Switch Recognition by gcc.c. Add -G xx support */#undef SWITCH_TAKES_ARG#define SWITCH_TAKES_ARG(CHAR) \ ((CHAR) == 'D' || (CHAR) == 'U' || (CHAR) == 'o' \ || (CHAR) == 'e' || (CHAR) == 'T' || (CHAR) == 'u' \ || (CHAR) == 'I' || (CHAR) == 'm' || (CHAR) == 'x' \ || (CHAR) == 'L' || (CHAR) == 'A' || (CHAR) == 'V' \ || (CHAR) == 'B' || (CHAR) == 'b' || (CHAR) == 'G')/* Output .file. */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -