⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 i386.c

📁 Mac OS X 10.4.9 for x86 Source Code gcc 实现源代码
💻 C
📖 第 1 页 / 共 5 页
字号:
#endif/* APPLE LOCAL end why is this local? */static bool ix86_rtx_costs (rtx, int, int, int *);static int min_insn_size (rtx);static tree ix86_md_asm_clobbers (tree clobbers);static bool ix86_must_pass_in_stack (enum machine_mode mode, tree type);static bool ix86_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode,				    tree, bool);static void ix86_init_builtins (void);static rtx ix86_expand_builtin (tree, rtx, rtx, enum machine_mode, int);/* APPLE LOCAL begin mainline 2006-02-17 4356747 stack realign */static rtx ix86_internal_arg_pointer (void);static void ix86_dwarf_handle_frame_unspec (const char *, rtx, int);/* APPLE LOCAL end mainline 2006-02-17 4356747 stack realign *//* This function is only used on Solaris.  */static void i386_solaris_elf_named_section (const char *, unsigned int, tree)  ATTRIBUTE_UNUSED;/* Register class used for passing given 64bit part of the argument.   These represent classes as documented by the PS ABI, with the exception   of SSESF, SSEDF classes, that are basically SSE class, just gcc will   use SF or DFmode move instead of DImode to avoid reformatting penalties.   Similarly we play games with INTEGERSI_CLASS to use cheaper SImode moves   whenever possible (upper half does contain padding). */enum x86_64_reg_class  {    X86_64_NO_CLASS,    X86_64_INTEGER_CLASS,    X86_64_INTEGERSI_CLASS,    X86_64_SSE_CLASS,    X86_64_SSESF_CLASS,    X86_64_SSEDF_CLASS,    X86_64_SSEUP_CLASS,    X86_64_X87_CLASS,    X86_64_X87UP_CLASS,    X86_64_COMPLEX_X87_CLASS,    X86_64_MEMORY_CLASS  };static const char * const x86_64_reg_class_name[] = {  "no", "integer", "integerSI", "sse", "sseSF", "sseDF",  "sseup", "x87", "x87up", "cplx87", "no"};#define MAX_CLASSES 4/* Table of constants used by fldpi, fldln2, etc....  */static REAL_VALUE_TYPE ext_80387_constants_table [5];static bool ext_80387_constants_init = 0;static void init_ext_80387_constants (void);/* Initialize the GCC target structure.  */#undef TARGET_ATTRIBUTE_TABLE#define TARGET_ATTRIBUTE_TABLE ix86_attribute_table#if TARGET_DLLIMPORT_DECL_ATTRIBUTES#  undef TARGET_MERGE_DECL_ATTRIBUTES#  define TARGET_MERGE_DECL_ATTRIBUTES merge_dllimport_decl_attributes#endif#undef TARGET_COMP_TYPE_ATTRIBUTES#define TARGET_COMP_TYPE_ATTRIBUTES ix86_comp_type_attributes#undef TARGET_INIT_BUILTINS#define TARGET_INIT_BUILTINS ix86_init_builtins#undef TARGET_EXPAND_BUILTIN#define TARGET_EXPAND_BUILTIN ix86_expand_builtin#undef TARGET_ASM_FUNCTION_EPILOGUE#define TARGET_ASM_FUNCTION_EPILOGUE ix86_output_function_epilogue#undef TARGET_ASM_OPEN_PAREN#define TARGET_ASM_OPEN_PAREN ""#undef TARGET_ASM_CLOSE_PAREN#define TARGET_ASM_CLOSE_PAREN ""#undef TARGET_ASM_ALIGNED_HI_OP#define TARGET_ASM_ALIGNED_HI_OP ASM_SHORT#undef TARGET_ASM_ALIGNED_SI_OP#define TARGET_ASM_ALIGNED_SI_OP ASM_LONG#ifdef ASM_QUAD#undef TARGET_ASM_ALIGNED_DI_OP#define TARGET_ASM_ALIGNED_DI_OP ASM_QUAD#endif#undef TARGET_ASM_UNALIGNED_HI_OP#define TARGET_ASM_UNALIGNED_HI_OP TARGET_ASM_ALIGNED_HI_OP#undef TARGET_ASM_UNALIGNED_SI_OP#define TARGET_ASM_UNALIGNED_SI_OP TARGET_ASM_ALIGNED_SI_OP#undef TARGET_ASM_UNALIGNED_DI_OP#define TARGET_ASM_UNALIGNED_DI_OP TARGET_ASM_ALIGNED_DI_OP#undef TARGET_SCHED_ADJUST_COST#define TARGET_SCHED_ADJUST_COST ix86_adjust_cost#undef TARGET_SCHED_ISSUE_RATE#define TARGET_SCHED_ISSUE_RATE ix86_issue_rate#undef TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD#define TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD \  ia32_multipass_dfa_lookahead#undef TARGET_FUNCTION_OK_FOR_SIBCALL#define TARGET_FUNCTION_OK_FOR_SIBCALL ix86_function_ok_for_sibcall#ifdef HAVE_AS_TLS#undef TARGET_HAVE_TLS#define TARGET_HAVE_TLS true#endif#undef TARGET_CANNOT_FORCE_CONST_MEM#define TARGET_CANNOT_FORCE_CONST_MEM ix86_cannot_force_const_mem#undef TARGET_DELEGITIMIZE_ADDRESS#define TARGET_DELEGITIMIZE_ADDRESS ix86_delegitimize_address#undef TARGET_MS_BITFIELD_LAYOUT_P#define TARGET_MS_BITFIELD_LAYOUT_P ix86_ms_bitfield_layout_p/* APPLE LOCAL begin why is this local? */#if TARGET_MACHO#undef TARGET_BINDS_LOCAL_P#define TARGET_BINDS_LOCAL_P ix86_binds_local_p#endif/* APPLE LOCAL end why is this local? */#undef TARGET_ASM_OUTPUT_MI_THUNK#define TARGET_ASM_OUTPUT_MI_THUNK x86_output_mi_thunk#undef TARGET_ASM_CAN_OUTPUT_MI_THUNK#define TARGET_ASM_CAN_OUTPUT_MI_THUNK x86_can_output_mi_thunk#undef TARGET_ASM_FILE_START#define TARGET_ASM_FILE_START x86_file_start#undef TARGET_RTX_COSTS#define TARGET_RTX_COSTS ix86_rtx_costs#undef TARGET_ADDRESS_COST#define TARGET_ADDRESS_COST ix86_address_cost#undef TARGET_FIXED_CONDITION_CODE_REGS#define TARGET_FIXED_CONDITION_CODE_REGS ix86_fixed_condition_code_regs#undef TARGET_CC_MODES_COMPATIBLE#define TARGET_CC_MODES_COMPATIBLE ix86_cc_modes_compatible#undef TARGET_MACHINE_DEPENDENT_REORG#define TARGET_MACHINE_DEPENDENT_REORG ix86_reorg#undef TARGET_BUILD_BUILTIN_VA_LIST#define TARGET_BUILD_BUILTIN_VA_LIST ix86_build_builtin_va_list#undef TARGET_MD_ASM_CLOBBERS#define TARGET_MD_ASM_CLOBBERS ix86_md_asm_clobbers#undef TARGET_PROMOTE_PROTOTYPES#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true#undef TARGET_STRUCT_VALUE_RTX#define TARGET_STRUCT_VALUE_RTX ix86_struct_value_rtx#undef TARGET_SETUP_INCOMING_VARARGS#define TARGET_SETUP_INCOMING_VARARGS ix86_setup_incoming_varargs#undef TARGET_MUST_PASS_IN_STACK#define TARGET_MUST_PASS_IN_STACK ix86_must_pass_in_stack#undef TARGET_PASS_BY_REFERENCE#define TARGET_PASS_BY_REFERENCE ix86_pass_by_reference/* APPLE LOCAL begin mainline 2006-02-17 4356747 stack realign */#undef TARGET_INTERNAL_ARG_POINTER#define TARGET_INTERNAL_ARG_POINTER ix86_internal_arg_pointer#undef TARGET_DWARF_HANDLE_FRAME_UNSPEC#define TARGET_DWARF_HANDLE_FRAME_UNSPEC ix86_dwarf_handle_frame_unspec/* APPLE LOCAL end mainline 2006-02-17 4356747 stack realign */#undef TARGET_GIMPLIFY_VA_ARG_EXPR#define TARGET_GIMPLIFY_VA_ARG_EXPR ix86_gimplify_va_arg#undef TARGET_VECTOR_MODE_SUPPORTED_P#define TARGET_VECTOR_MODE_SUPPORTED_P ix86_vector_mode_supported_p#ifdef SUBTARGET_INSERT_ATTRIBUTES#undef TARGET_INSERT_ATTRIBUTES#define TARGET_INSERT_ATTRIBUTES SUBTARGET_INSERT_ATTRIBUTES#endif/* APPLE LOCAL begin mainline 2005-09-20 4205103 */#undef TARGET_FUNCTION_VALUE#define TARGET_FUNCTION_VALUE ix86_function_value/* APPLE LOCAL end mainline 2005-09-20 4205103 */struct gcc_target targetm = TARGET_INITIALIZER;/* The svr4 ABI for the i386 says that records and unions are returned   in memory.  */#ifndef DEFAULT_PCC_STRUCT_RETURN#define DEFAULT_PCC_STRUCT_RETURN 1#endif/* Sometimes certain combinations of command options do not make   sense on a particular target machine.  You can define a macro   `OVERRIDE_OPTIONS' to take account of this.  This macro, if   defined, is executed once just after all the command options have   been parsed.   Don't use this macro to turn on various extra optimizations for   `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.  */voidoverride_options (void){  int i;  int ix86_tune_defaulted = 0;  /* Comes from final.c -- no real reason to change it.  */#define MAX_CODE_ALIGN 16  static struct ptt    {      const struct processor_costs *cost;	/* Processor costs */      const int target_enable;			/* Target flags to enable.  */      const int target_disable;			/* Target flags to disable.  */      const int align_loop;			/* Default alignments.  */      const int align_loop_max_skip;      const int align_jump;      const int align_jump_max_skip;      const int align_func;    }  const processor_target_table[PROCESSOR_max] =    {      {&i386_cost, 0, 0, 4, 3, 4, 3, 4},      {&i486_cost, 0, 0, 16, 15, 16, 15, 16},      {&pentium_cost, 0, 0, 16, 7, 16, 7, 16},      {&pentiumpro_cost, 0, 0, 16, 15, 16, 7, 16},      {&k6_cost, 0, 0, 32, 7, 32, 7, 32},      {&athlon_cost, 0, 0, 16, 7, 16, 7, 16},      {&pentium4_cost, 0, 0, 0, 0, 0, 0, 0},      {&k8_cost, 0, 0, 16, 7, 16, 7, 16},    /* APPLE LOCAL begin mainline 2006-04-19 4434601 */      {&nocona_cost, 0, 0, 0, 0, 0, 0, 0},      {&generic32_cost, 0, 0, 16, 7, 16, 7, 16},      {&generic64_cost, 0, 0, 16, 7, 16, 7, 16}    /* APPLE LOCAL end mainline 2006-04-19 4434601 */    };  static const char * const cpu_names[] = TARGET_CPU_DEFAULT_NAMES;  static struct pta    {      const char *const name;		/* processor name or nickname.  */      const enum processor_type processor;      const enum pta_flags	{	  PTA_SSE = 1,	  PTA_SSE2 = 2,	  PTA_SSE3 = 4,	  PTA_MMX = 8,	  PTA_PREFETCH_SSE = 16,	  PTA_3DNOW = 32,	  PTA_3DNOW_A = 64,	  /* APPLE LOCAL begin mni 4424835 */	  PTA_64BIT = 128,	  PTA_MNI = 256	  /* APPLE LOCAL end mni */	} flags;    }  /* APPLE LOCAL begin x86_64 support */  const processor_alias_table[] =    {      {"i386", PROCESSOR_I386, 0},      {"i486", PROCESSOR_I486, 0},      {"i586", PROCESSOR_PENTIUM, 0},      {"pentium", PROCESSOR_PENTIUM, 0},      {"pentium-mmx", PROCESSOR_PENTIUM, PTA_MMX},      {"winchip-c6", PROCESSOR_I486, PTA_MMX},      {"winchip2", PROCESSOR_I486, PTA_MMX | PTA_3DNOW},      {"c3", PROCESSOR_I486, PTA_MMX | PTA_3DNOW},      {"c3-2", PROCESSOR_PENTIUMPRO, PTA_MMX | PTA_PREFETCH_SSE | PTA_SSE},      {"i686", PROCESSOR_PENTIUMPRO, 0},      {"pentiumpro", PROCESSOR_PENTIUMPRO, 0},      {"pentium2", PROCESSOR_PENTIUMPRO, PTA_MMX},      {"pentium3", PROCESSOR_PENTIUMPRO, PTA_MMX | PTA_SSE | PTA_PREFETCH_SSE},      {"pentium3m", PROCESSOR_PENTIUMPRO, PTA_MMX | PTA_SSE | PTA_PREFETCH_SSE},      {"pentium-m", PROCESSOR_PENTIUMPRO, PTA_MMX | PTA_SSE | PTA_PREFETCH_SSE					  | PTA_SSE2 },      {"pentium4", PROCESSOR_PENTIUM4, PTA_SSE | PTA_SSE2				       | PTA_MMX | PTA_PREFETCH_SSE},      {"pentium4m", PROCESSOR_PENTIUM4, PTA_SSE | PTA_SSE2				        | PTA_MMX | PTA_PREFETCH_SSE},      {"prescott", PROCESSOR_NOCONA, PTA_SSE | PTA_SSE2 | PTA_SSE3				        | PTA_MMX | PTA_PREFETCH_SSE},      {"nocona", PROCESSOR_NOCONA, PTA_SSE | PTA_SSE2 | PTA_64BIT				        | PTA_MMX | PTA_PREFETCH_SSE},      {"k6", PROCESSOR_K6, PTA_MMX},      {"k6-2", PROCESSOR_K6, PTA_MMX | PTA_3DNOW},      {"k6-3", PROCESSOR_K6, PTA_MMX | PTA_3DNOW},      {"athlon", PROCESSOR_ATHLON, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW				   | PTA_3DNOW_A},      {"athlon-tbird", PROCESSOR_ATHLON, PTA_MMX | PTA_PREFETCH_SSE					 | PTA_3DNOW | PTA_3DNOW_A},      {"athlon-4", PROCESSOR_ATHLON, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW				    | PTA_3DNOW_A | PTA_SSE},      {"athlon-xp", PROCESSOR_ATHLON, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW				      | PTA_3DNOW_A | PTA_SSE},      {"athlon-mp", PROCESSOR_ATHLON, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW				      | PTA_3DNOW_A | PTA_SSE},      {"x86-64", PROCESSOR_K8, PTA_MMX | PTA_PREFETCH_SSE | PTA_64BIT			       | PTA_SSE | PTA_SSE2 },      {"k8", PROCESSOR_K8, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW | PTA_64BIT				      | PTA_3DNOW_A | PTA_SSE | PTA_SSE2},      {"opteron", PROCESSOR_K8, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW | PTA_64

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -