📄 linux64.h
字号:
#else#define OPTION_DEFAULT_SPECS \ {"cpu", "%{!m32:%{!mcpu=*:-mcpu=%(VALUE)}}" }, \ {"tune", "%{!mtune=*:-mtune=%(VALUE)}" }, \ {"float", "%{!msoft-float:%{!mhard-float:%{!fpu:%{!no-fpu:-m%(VALUE)-float}}}}" }#endif#if DEFAULT_ARCH32_P#define MULTILIB_DEFAULTS { "m32" }#else#define MULTILIB_DEFAULTS { "m64" }#endif#else /* !SPARC_BI_ARCH */#undef LINK_SPEC#define LINK_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \ %{!shared: \ %{!ibcs: \ %{!static: \ %{rdynamic:-export-dynamic} \ %{!dynamic-linker:-dynamic-linker /lib64/ld-linux.so.2}} \ %{static:-static}}} \%{mlittle-endian:-EL} \%{!mno-relax:%{!r:-relax}} \"#endif /* !SPARC_BI_ARCH *//* The sun bundled assembler doesn't accept -Yd, (and neither does gas). It's safe to pass -s always, even if -g is not used. */#undef ASM_SPEC#define ASM_SPEC "\%{V} \%{v:%{!V:-V}} \%{!Qn:-Qy} \%{n} \%{T} \%{Ym,*} \%{Wa,*:%*} \-s %{fpic|fPIC|fpie|fPIE:-K PIC} \%{mlittle-endian:-EL} \%(asm_cpu) %(asm_arch) %(asm_relax)"/* Same as sparc.h */#undef DBX_REGISTER_NUMBER#define DBX_REGISTER_NUMBER(REGNO) (REGNO)#define DWARF2_DEBUGGING_INFO 1#define DBX_DEBUGGING_INFO 1#undef ASM_OUTPUT_ALIGNED_LOCAL#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \do { \ fputs ("\t.local\t", (FILE)); \ assemble_name ((FILE), (NAME)); \ putc ('\n', (FILE)); \ ASM_OUTPUT_ALIGNED_COMMON (FILE, NAME, SIZE, ALIGN); \} while (0)#undef COMMON_ASM_OP#define COMMON_ASM_OP "\t.common\t"#undef LOCAL_LABEL_PREFIX#define LOCAL_LABEL_PREFIX "."/* This is how to output a reference to an internal numbered label where PREFIX is the class of label and NUM is the number within the class. */#undef ASM_OUTPUT_INTERNAL_LABELREF#define ASM_OUTPUT_INTERNAL_LABELREF(FILE,PREFIX,NUM) \ fprintf (FILE, ".L%s%d", PREFIX, NUM)/* This is how to store into the string LABEL the symbol_ref name of an internal numbered label where PREFIX is the class of label and NUM is the number within the class. This is suitable for output with `assemble_name'. */#undef ASM_GENERATE_INTERNAL_LABEL#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ sprintf (LABEL, "*.L%s%ld", PREFIX, (long)(NUM))/* DWARF bits. *//* Follow Irix 6 and not the Dwarf2 draft in using 64-bit offsets. Obviously the Dwarf2 folks haven't tried to actually build systems with their spec. On a 64-bit system, only 64-bit relocs become RELATIVE relocations. *//* #define DWARF_OFFSET_SIZE PTR_SIZE */#undef DITF_CONVERSION_LIBFUNCS#define DITF_CONVERSION_LIBFUNCS 1#if defined(HAVE_LD_EH_FRAME_HDR)#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "#endif#ifdef HAVE_AS_TLS#undef TARGET_SUN_TLS#undef TARGET_GNU_TLS#define TARGET_SUN_TLS 0#define TARGET_GNU_TLS 1#endif/* Don't be different from other Linux platforms in this regard. */#define HANDLE_PRAGMA_PACK_PUSH_POP/* We use GNU ld so undefine this so that attribute((init_priority)) works. */#undef CTORS_SECTION_ASM_OP#undef DTORS_SECTION_ASM_OP#define TARGET_ASM_FILE_END file_end_indicate_exec_stack/* Determine whether the the entire c99 runtime is present in the runtime library. */#define TARGET_C99_FUNCTIONS 1#define TARGET_HAS_F_SETLKW#undef LINK_GCC_C_SEQUENCE_SPEC#define LINK_GCC_C_SEQUENCE_SPEC \ "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"/* Do code reading to identify a signal frame, and set the frame state data appropriately. See unwind-dw2.c for the structs. *//* Handle multilib correctly. */#if defined(__arch64__)/* 64-bit SPARC version */#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ do { \ unsigned int *pc_ = (CONTEXT)->ra; \ long new_cfa_, i_; \ long regs_off_, fpu_save_off_; \ long this_cfa_, fpu_save_; \ \ if (pc_[0] != 0x82102065 /* mov NR_rt_sigreturn, %g1 */ \ || pc_[1] != 0x91d0206d) /* ta 0x6d */ \ break; \ regs_off_ = 192 + 128; \ fpu_save_off_ = regs_off_ + (16 * 8) + (3 * 8) + (2 * 4); \ this_cfa_ = (long) (CONTEXT)->cfa; \ new_cfa_ = *(long *)(((CONTEXT)->cfa) + (regs_off_ + (14 * 8))); \ new_cfa_ += 2047; /* Stack bias */ \ fpu_save_ = *(long *)((this_cfa_) + (fpu_save_off_)); \ (FS)->cfa_how = CFA_REG_OFFSET; \ (FS)->cfa_reg = 14; \ (FS)->cfa_offset = new_cfa_ - (long) (CONTEXT)->cfa; \ for (i_ = 1; i_ < 16; ++i_) \ { \ (FS)->regs.reg[i_].how = REG_SAVED_OFFSET; \ (FS)->regs.reg[i_].loc.offset = \ this_cfa_ + (regs_off_ + (i_ * 8)) - new_cfa_; \ } \ for (i_ = 0; i_ < 16; ++i_) \ { \ (FS)->regs.reg[i_ + 16].how = REG_SAVED_OFFSET; \ (FS)->regs.reg[i_ + 16].loc.offset = \ this_cfa_ + (i_ * 8) - new_cfa_; \ } \ if (fpu_save_) \ { \ for (i_ = 0; i_ < 64; ++i_) \ { \ if (i_ > 32 && (i_ & 0x1)) \ continue; \ (FS)->regs.reg[i_ + 32].how = REG_SAVED_OFFSET; \ (FS)->regs.reg[i_ + 32].loc.offset = \ (fpu_save_ + (i_ * 4)) - new_cfa_; \ } \ } \ /* Stick return address into %g0, same trick Alpha uses. */ \ (FS)->regs.reg[0].how = REG_SAVED_OFFSET; \ (FS)->regs.reg[0].loc.offset = \ this_cfa_ + (regs_off_ + (16 * 8) + 8) - new_cfa_; \ (FS)->retaddr_column = 0; \ goto SUCCESS; \ } while (0)#else/* 32-bit SPARC version */#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ do { \ unsigned int *pc_ = (CONTEXT)->ra; \ int new_cfa_, i_, oldstyle_; \ int regs_off_, fpu_save_off_; \ int fpu_save_, this_cfa_; \ \ if (pc_[1] != 0x91d02010) /* ta 0x10 */ \ break; \ if (pc_[0] == 0x821020d8) /* mov NR_sigreturn, %g1 */ \ oldstyle_ = 1; \ else if (pc_[0] == 0x82102065) /* mov NR_rt_sigreturn, %g1 */ \ oldstyle_ = 0; \ else \ break; \ if (oldstyle_) \ { \ regs_off_ = 96; \ fpu_save_off_ = regs_off_ + (4 * 4) + (16 * 4); \ } \ else \ { \ regs_off_ = 96 + 128; \ fpu_save_off_ = regs_off_ + (4 * 4) + (16 * 4) + (2 * 4); \ } \ this_cfa_ = (int) (CONTEXT)->cfa; \ new_cfa_ = *(int *)(((CONTEXT)->cfa) + (regs_off_+(4*4)+(14 * 4))); \ fpu_save_ = *(int *)((this_cfa_) + (fpu_save_off_)); \ (FS)->cfa_how = CFA_REG_OFFSET; \ (FS)->cfa_reg = 14; \ (FS)->cfa_offset = new_cfa_ - (int) (CONTEXT)->cfa; \ for (i_ = 1; i_ < 16; ++i_) \ { \ if (i_ == 14) \ continue; \ (FS)->regs.reg[i_].how = REG_SAVED_OFFSET; \ (FS)->regs.reg[i_].loc.offset = \ this_cfa_ + (regs_off_+(4 * 4)+(i_ * 4)) - new_cfa_; \ } \ for (i_ = 0; i_ < 16; ++i_) \ { \ (FS)->regs.reg[i_ + 16].how = REG_SAVED_OFFSET; \ (FS)->regs.reg[i_ + 16].loc.offset = \ this_cfa_ + (i_ * 4) - new_cfa_; \ } \ if (fpu_save_) \ { \ for (i_ = 0; i_ < 32; ++i_) \ { \ (FS)->regs.reg[i_ + 32].how = REG_SAVED_OFFSET; \ (FS)->regs.reg[i_ + 32].loc.offset = \ (fpu_save_ + (i_ * 4)) - new_cfa_; \ } \ } \ /* Stick return address into %g0, same trick Alpha uses. */ \ (FS)->regs.reg[0].how = REG_SAVED_OFFSET; \ (FS)->regs.reg[0].loc.offset = this_cfa_+(regs_off_+4)-new_cfa_; \ (FS)->retaddr_column = 0; \ goto SUCCESS; \ } while (0)#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -