📄 sysv4.h
字号:
#undef ASM_FILE_START#define ASM_FILE_START(FILE) \do { \ output_file_directive ((FILE), main_input_filename); \ rs6000_file_start (FILE, TARGET_CPU_DEFAULT); \} while (0)/* This is how to output an assembler line defining an `int' constant. For -mrelocatable, we mark all addresses that need to be fixed up in the .fixup section. */#undef ASM_OUTPUT_INT#define ASM_OUTPUT_INT(FILE,VALUE) \do { \ static int recurse = 0; \ if ((TARGET_RELOCATABLE || flag_pic) \ && in_section != in_toc \ && in_section != in_text \ && in_section != in_ctors \ && in_section != in_dtors \ && !recurse \ && GET_CODE (VALUE) != CONST_INT \ && GET_CODE (VALUE) != CONST_DOUBLE \ && CONSTANT_P (VALUE)) \ { \ static int labelno = 0; \ char buf[256], *p; \ \ recurse = 1; \ ASM_GENERATE_INTERNAL_LABEL (buf, "LCP", labelno++); \ STRIP_NAME_ENCODING (p, buf); \ fprintf (FILE, "%s:\n", p); \ fprintf (FILE, "\t.long ("); \ output_addr_const (FILE, (VALUE)); \ fprintf (FILE, ")@fixup\n"); \ fprintf (FILE, "\t.section\t\".fixup\",\"aw\"\n"); \ ASM_OUTPUT_ALIGN (FILE, 2); \ fprintf (FILE, "\t.long\t%s\n", p); \ fprintf (FILE, "\t.previous\n"); \ recurse = 0; \ } \ /* Remove initial .'s to turn a -mcall-aixdesc or -mcall-nt function \ address into the address of the descriptor, not the function \ itself. */ \ else if (GET_CODE (VALUE) == SYMBOL_REF \ && XSTR (VALUE, 0)[0] == '.' \ && (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_NT)) \ { \ char *name = XSTR (VALUE, 0); \ while (*name == '.') \ name++; \ \ fprintf (FILE, "\t.long %s\n", name); \ } \ else \ { \ fprintf (FILE, "\t.long "); \ output_addr_const (FILE, (VALUE)); \ fprintf (FILE, "\n"); \ } \} while (0)/* This is the end of what might become sysv4.h. *//* Allow stabs and dwarf, for now, make stabs the default debugging type, not dwarf since G++ doesn't support dwarf. */#undef PREFERRED_DEBUGGING_TYPE#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG#define DBX_DEBUGGING_INFO#define DWARF_DEBUGGING_INFO/* If we are referencing a function that is static or is known to be in this file, make the SYMBOL_REF special. We can use this to indicate that we can branch to this function without emitting a no-op after the call. For real AIX and NT calling sequences, we also replace the function name with the real name (1 or 2 leading .'s), rather than the function descriptor name. This saves a lot of overriding code to readd the prefixes. */#undef ENCODE_SECTION_INFO#define ENCODE_SECTION_INFO(DECL) rs6000_encode_section_info (DECL)extern void rs6000_encode_section_info ();/* This macro gets just the user-specified name out of the string in a SYMBOL_REF. Discard a leading * or @. */#undef STRIP_NAME_ENCODING#define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \do { \ char *_name = SYMBOL_NAME; \ while (*_name == '*' || *_name == '@') \ _name++; \ (VAR) = _name; \} while (0)/* This is how to output a reference to a user-level label named NAME. `assemble_name' uses this. */#undef ASM_OUTPUT_LABELREF#define ASM_OUTPUT_LABELREF(FILE,NAME) \do { \ char *_name = NAME; \ while (*_name == '*' || *_name == '@') \ _name++; \ fputs (_name, FILE); \} while (0)/* * Switch into a generic section. * * We make the section read-only and executable for a function decl, * read-only for a const data decl, and writable for a non-const data decl. * * If the section has already been defined, we must not * emit the attributes here. The SVR4 assembler does not * recognize section redefinitions. * If DECL is NULL, no attributes are emitted. * * Note, Solaris as doesn't like @nobits, and gas can handle .sbss without * needing @nobits. */#undef ASM_OUTPUT_SECTION_NAME#define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME, RELOC) \do { \ static struct section_info \ { \ struct section_info *next; \ char *name; \ enum sect_enum {SECT_RW, SECT_RO, SECT_EXEC} type; \ } *sections; \ struct section_info *s; \ char *mode; \ enum sect_enum type; \ \ for (s = sections; s; s = s->next) \ if (!strcmp (NAME, s->name)) \ break; \ \ if (DECL && TREE_CODE (DECL) == FUNCTION_DECL) \ type = SECT_EXEC, mode = "ax"; \ else if (DECL && DECL_READONLY_SECTION (DECL, RELOC) && !TARGET_RELOCATABLE && !flag_pic) \ type = SECT_RO, mode = "a"; \ else \ type = SECT_RW, mode = "aw"; \ \ if (s == 0) \ { \ s = (struct section_info *) xmalloc (sizeof (struct section_info)); \ s->name = xmalloc ((strlen (NAME) + 1) * sizeof (*NAME)); \ strcpy (s->name, NAME); \ s->type = type; \ s->next = sections; \ sections = s; \ fprintf (FILE, "\t.section\t\"%s\",\"%s\"\n", NAME, mode); \ } \ else \ { \ if (DECL && s->type != type) \ error_with_decl (DECL, "%s causes a section type conflict"); \ \ fprintf (FILE, "\t.section\t\"%s\"\n", NAME); \ } \} while (0)#undef ASM_OUTPUT_CONSTRUCTOR#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ do { \ if (DEFAULT_ABI != ABI_SOLARIS) \ { \ ctors_section (); \ fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ assemble_name (FILE, NAME); \ } \ else \ { \ init_section (); \ fputs ("\tbl ", FILE); \ assemble_name (FILE, NAME); \ } \ fputs ("\n", FILE); \ } while (0)/* A C statement (sans semicolon) to output an element in the table of global destructors. */#undef ASM_OUTPUT_DESTRUCTOR#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ do { \ if (DEFAULT_ABI != ABI_SOLARIS) \ { \ dtors_section (); \ fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ assemble_name (FILE, NAME); \ } \ else \ { \ fini_section (); \ fputs ("\tbl ", FILE); \ assemble_name (FILE, NAME); \ } \ fputs ("\n", FILE); \ } while (0)/* But, to make this work, we have to output the stabs for the function name *first*... */#define DBX_FUNCTION_FIRST/* This is the end of what might become sysv4dbx.h. */#undef TARGET_VERSION#define TARGET_VERSION fprintf (stderr, " (PowerPC System V.4)");#undef CPP_PREDEFINES#define CPP_PREDEFINES \ "-DPPC -Dunix -D__svr4__ -Asystem(unix) -Asystem(svr4) -Acpu(powerpc) -Amachine(powerpc)"/* Pass various options to the assembler */#undef ASM_SPEC#define ASM_SPEC "%(asm_cpu) \%{.s: %{mregnames} %{mno-regnames}} %{.S: %{mregnames} %{mno-regnames}} \%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \%{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} \%{memb} %{!memb: %{msdata: -memb} %{msdata=eabi: -memb}} \%{mlittle} %{mlittle-endian} %{mbig} %{mbig-endian} \%{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \ %{mcall-solaris: -mlittle -msolaris} \ %{mcall-linux: -mbig} }}}}"#ifndef CC1_ENDIAN_BIG_SPEC#define CC1_ENDIAN_BIG_SPEC ""#endif#ifndef CC1_ENDIAN_LITTLE_SPEC#define CC1_ENDIAN_LITTLE_SPEC "\%{!mstrict-align: %{!mno-strict-align: \ -mstrict-align \}}"#endif#ifndef CC1_ENDIAN_DEFAULT_SPEC#define CC1_ENDIAN_DEFAULT_SPEC "%(cc1_endian_big_spec)"#endif#undef CC1_SPEC/* Pass -G xxx to the compiler and set correct endian mode */#define CC1_SPEC "%{G*} \%{mlittle: %(cc1_endian_little)} %{!mlittle: %{mlittle-endian: %(cc1_endian_little)}} \%{mbig: %(cc1_endian_big)} %{!mbig: %{mbig-endian: %(cc1_endian_big)}} \ %{mcall-nt: -mlittle %{cc1_endian_little} } \ %{mcall-aixdesc: -mbig %{cc1_endian_big} } \ %{mcall-solaris: -mlittle %{cc1_endian_little} } \ %{mcall-linux: -mbig %{cc1_endian_big} } \ %{!mcall-nt: %{!mcall-aixdesc: %{!mcall-solaris: %{!mcall-linux: \ %(cc1_endian_default) \ }}}} \%{mcall-solaris: -mregnames } \%{mno-sdata: -msdata=none } \%{meabi: %{!mcall-*: -mcall-sysv }} \%{!meabi: %{!mno-eabi: \ %{mrelocatable: -meabi } \ %{mcall-solaris: -mno-eabi } \ %{mcall-linux: -mno-eabi }}} \%{msdata: -msdata=default} \%{mno-sdata: -msdata=none} \%{profile: -p}"/* Don't put -Y P,<path> for cross compilers */#undef LINK_PATH_SPEC#ifndef CROSS_COMPILE#define LINK_PATH_SPEC "\%{!R*:%{L*:-R %*}} \%{!nostdlib: %{!YP,*: \ %{compat-bsd: \ %{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ %{!p:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}} \ %{!R*: %{!L*: -R /usr/ucblib}} \ %{!compat-bsd: \ %{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ %{!p:-Y P,/usr/ccs/lib:/usr/lib}}}}"#else#define LINK_PATH_SPEC ""#endif/* Default starting address if specified */#ifndef LINK_START_SPEC#define LINK_START_SPEC "\%{mads: %(link_start_ads) } \%{myellowknife: %(link_start_yellowknife) } \%{mmvme: %(link_start_mvme) } \%{msim: %(link_start_sim) } \%{mcall-linux: %(link_start_linux) } \%{mcall-solaris: %(link_start_solaris) } \%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(link_start_default) }}}}}}"#endif#ifndef LINK_START_DEFAULT_SPEC#define LINK_START_DEFAULT_SPEC ""#endif#undef LINK_SPEC#define LINK_SPEC "\%{h*} %{v:-V} %{G*} \%{Wl,*:%*} %{YP,*} %{R*} \%{Qy:} %{!Qn:-Qy} \%(link_shlib) \%{!Ttext*: %(link_start) } \%(link_target) \%(link_os)"/* For now, turn off shared libraries by default. */#ifndef SHARED_LIB_SUPPORT#define NO_SHARED_LIB_SUPPORT#endif#undef LINK_SHLIB_SPEC#ifndef NO_SHARED_LIB_SUPPORT/* Shared libraries are default. */#define LINK_SHLIB_SPEC "\%{!static: %(link_path) %{!R*:%{L*:-R %*}}} \%{mshlib: } \%{static:-dn -Bstatic} \%{shared:-G -dy -z text} \%{symbolic:-Bsymbolic -G -dy -z text}"#else/* Shared libraries are not default. */#define LINK_SHLIB_SPEC "\%{mshlib: %(link_path) } \%{!mshlib: %{!shared: %{!symbolic: -dn -Bstatic}}} \%{static: } \%{shared:-G -dy -z text %(link_path) } \%{symbolic:-Bsymbolic -G -dy -z text %(link_path) }"#endif/* Override the default target of the linker. */#undef LINK_TARGET_SPEC#define LINK_TARGET_SPEC "\%{mlittle: -oformat elf32-powerpcle } %{mlittle-endian: -oformat elf32-powerpcle } \%{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: %{mcall-solaris: -oformat elf32-powerpcle}}}}}"/* Any specific OS flags */#ifndef LINK_OS_SPEC#define LINK_OS_SPEC "\%{mads: %(link_os_ads) } \%{myellowknife: %(link_os_yellowknife) } \%{mmvme: %(link_os_mvme) } \%{msim: %(link_os_sim) } \%{mcall-linux: %(link_os_linux) } \%{mcall-solaris: %(link_os_solaris) } \%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(link_os_default) }}}}}}"#endif#ifndef LINK_OS_DEFAULT_SPEC#define LINK_OS_DEFAULT_SPEC ""#endif#undef CPP_SYSV_SPEC#define CPP_SYSV_SPEC \"%{mrelocatable*: -D_RELOCATABLE} \%{fpic: -D__PIC__=1 -D__pic__=1} \%{!fpic: %{fPIC: -D__PIC__=2 -D__pic__=2}} \%{mcall-sysv: -D_CALL_SYSV} %{mcall-nt: -D_CALL_NT} \%{mcall-aix: -D_CALL_AIX} %{mcall-aixdesc: -D_CALL_AIX -D_CALL_AIXDESC} \%{!mcall-sysv: %{!mcall-aix: %{!mcall-aixdesc: %{!mcall-nt: %(cpp_sysv_default) }}}} \%{msoft-float: -D_SOFT_FLOAT} %{mcpu=403: -D_SOFT_FLOAT}"#undef CPP_SYSV_DEFAULT_SPEC#define CPP_SYSV_DEFAULT_SPEC "-D_CALL_SYSV"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -