📄 rs6000.h
字号:
{"no-string", MASK_STRING_SET, \ ""}, \ {"update", - MASK_NO_UPDATE, \ N_("Generate load/store with update instructions")},\ {"no-update", MASK_NO_UPDATE, \ N_("Do not generate load/store with update instructions")},\ {"fused-madd", - MASK_NO_FUSED_MADD, \ N_("Generate fused multiply/add instructions")},\ {"no-fused-madd", MASK_NO_FUSED_MADD, \ N_("Don't generate fused multiply/add instructions")},\ {"sched-prolog", MASK_SCHED_PROLOG, \ ""}, \ {"no-sched-prolog", -MASK_SCHED_PROLOG, \ N_("Don't schedule the start and end of the procedure")},\ {"sched-epilog", MASK_SCHED_PROLOG, \ ""}, \ {"no-sched-epilog", -MASK_SCHED_PROLOG, \ ""}, \ {"aix-struct-return", MASK_AIX_STRUCT_RET | MASK_AIX_STRUCT_RET_SET, \ N_("Return all structures in memory (AIX default)")},\ {"svr4-struct-return", - MASK_AIX_STRUCT_RET,\ N_("Return small structures in registers (SVR4 default)")},\ {"svr4-struct-return",MASK_AIX_STRUCT_RET_SET,\ ""},\ {"no-aix-struct-return", - MASK_AIX_STRUCT_RET,\ ""},\ {"no-aix-struct-return", MASK_AIX_STRUCT_RET_SET,\ ""},\ {"no-svr4-struct-return", MASK_AIX_STRUCT_RET | MASK_AIX_STRUCT_RET_SET,\ ""},\ SUBTARGET_SWITCHES \ {"", TARGET_DEFAULT | MASK_SCHED_PROLOG, \ ""}}#define TARGET_DEFAULT (MASK_POWER | MASK_MULTIPLE | MASK_STRING)/* This is meant to be redefined in the host dependent files */#define SUBTARGET_SWITCHES/* Processor type. Order must match cpu attribute in MD file. */enum processor_type { PROCESSOR_RIOS1, PROCESSOR_RIOS2, PROCESSOR_RS64A, PROCESSOR_MPCCORE, PROCESSOR_PPC403, PROCESSOR_PPC405, PROCESSOR_PPC601, PROCESSOR_PPC603, PROCESSOR_PPC604, PROCESSOR_PPC604e, PROCESSOR_PPC620, PROCESSOR_PPC630, PROCESSOR_PPC750, PROCESSOR_PPC7400, PROCESSOR_PPC7450};extern enum processor_type rs6000_cpu;/* Recast the processor type to the cpu attribute. */#define rs6000_cpu_attr ((enum attr_cpu)rs6000_cpu)/* Define generic processor types based upon current deployment. */#define PROCESSOR_COMMON PROCESSOR_PPC601#define PROCESSOR_POWER PROCESSOR_RIOS1#define PROCESSOR_POWERPC PROCESSOR_PPC604#define PROCESSOR_POWERPC64 PROCESSOR_RS64A/* Define the default processor. This is overridden by other tm.h files. */#define PROCESSOR_DEFAULT PROCESSOR_RIOS1#define PROCESSOR_DEFAULT64 PROCESSOR_RS64A/* Specify the dialect of assembler to use. New mnemonics is dialect one and the old mnemonics are dialect zero. */#define ASSEMBLER_DIALECT (TARGET_NEW_MNEMONICS ? 1 : 0)/* This is meant to be overridden in target specific files. */#define SUBTARGET_OPTIONS#define TARGET_OPTIONS \{ \ {"cpu=", &rs6000_select[1].string, \ N_("Use features of and schedule code for given CPU") }, \ {"tune=", &rs6000_select[2].string, \ N_("Schedule code for given CPU") }, \ {"debug=", &rs6000_debug_name, N_("Enable debug output") }, \ {"abi=", &rs6000_abi_string, N_("Specify ABI to use") }, \ {"long-double-", &rs6000_long_double_size_string, \ N_("Specify size of long double (64 or 128 bits)") }, \ SUBTARGET_OPTIONS \}/* rs6000_select[0] is reserved for the default cpu defined via --with-cpu */struct rs6000_cpu_select{ const char *string; const char *name; int set_tune_p; int set_arch_p;};extern struct rs6000_cpu_select rs6000_select[];/* Debug support */extern const char *rs6000_debug_name; /* Name for -mdebug-xxxx option */extern const char *rs6000_abi_string; /* for -mabi={sysv,darwin,eabi,aix,altivec} */extern int rs6000_debug_stack; /* debug stack applications */extern int rs6000_debug_arg; /* debug argument handling */#define TARGET_DEBUG_STACK rs6000_debug_stack#define TARGET_DEBUG_ARG rs6000_debug_arg/* These are separate from target_flags because we've run out of bits there. */extern const char *rs6000_long_double_size_string;extern int rs6000_long_double_type_size;extern int rs6000_altivec_abi;#define TARGET_LONG_DOUBLE_128 (rs6000_long_double_type_size == 128)#define TARGET_ALTIVEC_ABI rs6000_altivec_abi/* 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. On the RS/6000 this is used to define the target cpu type. */#define OVERRIDE_OPTIONS rs6000_override_options (TARGET_CPU_DEFAULT)/* Define this to change the optimizations performed by default. */#define OPTIMIZATION_OPTIONS(LEVEL,SIZE) optimization_options(LEVEL,SIZE)/* Show we can debug even without a frame pointer. */#define CAN_DEBUG_WITHOUT_FP/* target machine storage layout *//* Define to support cross compilation to an RS6000 target. */#define REAL_ARITHMETIC/* Define this macro if it is advisable to hold scalars in registers in a wider mode than that declared by the program. In such cases, the value is constrained to be within the bounds of the declared type, but kept valid in the wider mode. The signedness of the extension may differ from that of the type. */#define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \ if (GET_MODE_CLASS (MODE) == MODE_INT \ && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \ (MODE) = word_mode;/* Define this if function arguments should also be promoted using the above procedure. */#define PROMOTE_FUNCTION_ARGS/* Likewise, if the function return value is promoted. */#define PROMOTE_FUNCTION_RETURN/* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields. *//* That is true on RS/6000. */#define BITS_BIG_ENDIAN 1/* Define this if most significant byte of a word is the lowest numbered. *//* That is true on RS/6000. */#define BYTES_BIG_ENDIAN 1/* Define this if most significant word of a multiword number is lowest numbered. For RS/6000 we can decide arbitrarily since there are no machine instructions for them. Might as well be consistent with bits and bytes. */#define WORDS_BIG_ENDIAN 1/* number of bits in an addressable storage unit */#define BITS_PER_UNIT 8/* Width in bits of a "word", which is the contents of a machine register. Note that this is not necessarily the width of data type `int'; if using 16-bit ints on a 68000, this would still be 32. But on a machine with 16-bit registers, this would be 16. */#define BITS_PER_WORD (! TARGET_POWERPC64 ? 32 : 64)#define MAX_BITS_PER_WORD 64/* Width of a word, in units (bytes). */#define UNITS_PER_WORD (! TARGET_POWERPC64 ? 4 : 8)#define MIN_UNITS_PER_WORD 4#define UNITS_PER_FP_WORD 8#define UNITS_PER_ALTIVEC_WORD 16/* Type used for ptrdiff_t, as a string used in a declaration. */#define PTRDIFF_TYPE "int"/* Type used for size_t, as a string used in a declaration. */#define SIZE_TYPE "long unsigned int"/* Type used for wchar_t, as a string used in a declaration. */#define WCHAR_TYPE "short unsigned int"/* Width of wchar_t in bits. */#define WCHAR_TYPE_SIZE 16/* A C expression for the size in bits of the type `short' on the target machine. If you don't define this, the default is half a word. (If this would be less than one storage unit, it is rounded up to one unit.) */#define SHORT_TYPE_SIZE 16/* A C expression for the size in bits of the type `int' on the target machine. If you don't define this, the default is one word. */#define INT_TYPE_SIZE 32/* A C expression for the size in bits of the type `long' on the target machine. If you don't define this, the default is one word. */#define LONG_TYPE_SIZE (TARGET_32BIT ? 32 : 64)#define MAX_LONG_TYPE_SIZE 64/* A C expression for the size in bits of the type `long long' on the target machine. If you don't define this, the default is two words. */#define LONG_LONG_TYPE_SIZE 64/* A C expression for the size in bits of the type `char' on the target machine. If you don't define this, the default is one quarter of a word. (If this would be less than one storage unit, it is rounded up to one unit.) */#define CHAR_TYPE_SIZE BITS_PER_UNIT/* A C expression for the size in bits of the type `float' on the target machine. If you don't define this, the default is one word. */#define FLOAT_TYPE_SIZE 32/* A C expression for the size in bits of the type `double' on the target machine. If you don't define this, the default is two words. */#define DOUBLE_TYPE_SIZE 64/* A C expression for the size in bits of the type `long double' on the target machine. If you don't define this, the default is two words. */#define LONG_DOUBLE_TYPE_SIZE rs6000_long_double_type_size/* Constant which presents upper bound of the above value. */#define MAX_LONG_DOUBLE_TYPE_SIZE 128/* Define this to set long double type size to use in libgcc2.c, which can not depend on target_flags. */#ifdef __LONG_DOUBLE_128__#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128#else#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64#endif/* Work around rs6000_long_double_type_size dependency in ada/targtyps.c. */#define WIDEST_HARDWARE_FP_SIZE 64/* Width in bits of a pointer. See also the macro `Pmode' defined below. */#define POINTER_SIZE (TARGET_32BIT ? 32 : 64)/* Allocation boundary (in *bits*) for storing arguments in argument list. */#define PARM_BOUNDARY (TARGET_32BIT ? 32 : 64)/* Boundary (in *bits*) on which stack pointer should be aligned. */#define STACK_BOUNDARY ((TARGET_32BIT && !TARGET_ALTIVEC_ABI) ? 64 : 128)/* Allocation boundary (in *bits*) for the code of a function. */#define FUNCTION_BOUNDARY 32/* No data type wants to be aligned rounder than this. */#define BIGGEST_ALIGNMENT 128/* A C expression to compute the alignment for a variables in the local store. TYPE is the data type, and ALIGN is the alignment that the object would ordinarily have. */#define LOCAL_ALIGNMENT(TYPE, ALIGN) \ ((TARGET_ALTIVEC && TREE_CODE (TYPE) == VECTOR_TYPE) ? 128 : ALIGN)/* Alignment of field after `int : 0' in a structure. */#define EMPTY_FIELD_BOUNDARY 32/* Every structure's size must be a multiple of this. */#define STRUCTURE_SIZE_BOUNDARY 8/* A bitfield declared as `int' forces `int' alignment for the struct. */#define PCC_BITFIELD_TYPE_MATTERS 1/* Make strings word-aligned so strcpy from constants will be faster. Make vector constants quadword aligned. */#define CONSTANT_ALIGNMENT(EXP, ALIGN) \ (TREE_CODE (EXP) == STRING_CST \ && (ALIGN) < BITS_PER_WORD \ ? BITS_PER_WORD \ : (ALIGN))/* Make arrays of chars word-aligned for the same reasons. Align vectors to 128 bits. */#define DATA_ALIGNMENT(TYPE, ALIGN) \ (TREE_CODE (TYPE) == VECTOR_TYPE ? 128 \ : TREE_CODE (TYPE) == ARRAY_TYPE \ && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \ && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))/* Non-zero if move instructions will actually fail to work when given unaligned data. */#define STRICT_ALIGNMENT 0/* Define this macro to be the value 1 if unaligned accesses have a cost many times greater than aligned accesses, for example if they are emulated in a trap handler. */#define SLOW_UNALIGNED_ACCESS(MODE, ALIGN) \ (STRICT_ALIGNMENT \ || (((MODE) == SFmode || (MODE) == DFmode || (MODE) == DImode) \ && (ALIGN) < 32))/* Standard register usage. *//* Number of actual hardware registers. The hardware registers are assigned numbers for the compiler from 0 to just below FIRST_PSEUDO_REGISTER. All registers that the compiler knows about must be given numbers, even those that are not normally considered general registers. RS/6000 has 32 fixed-point registers, 32 floating-point registers, an MQ register, a count register, a link register, and 8 condition register fields, which we view here as separate registers. In addition, the difference between the frame and argument pointers is a function of the number of registers saved, so we need to have a
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -