📄 frv.h
字号:
(frv_cpu_type == FRV_CPU_FR500 \ || frv_cpu_type == FRV_CPU_FR550)#define TARGET_FR405_BUILTINS \ (frv_cpu_type == FRV_CPU_FR405 \ || frv_cpu_type == FRV_CPU_FR450)#ifndef HAVE_AS_TLS#define HAVE_AS_TLS 0#endif/* This macro is a C statement to print on `stderr' a string describing the particular machine description choice. Every machine description should define `TARGET_VERSION'. For example: #ifdef MOTOROLA #define TARGET_VERSION \ fprintf (stderr, " (68k, Motorola syntax)"); #else #define TARGET_VERSION \ fprintf (stderr, " (68k, MIT syntax)"); #endif */#define TARGET_VERSION fprintf (stderr, _(" (frv)"))/* 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. */#define OVERRIDE_OPTIONS frv_override_options ()/* Some machines may desire to change what optimizations are performed for various optimization levels. This macro, if defined, is executed once just after the optimization level is determined and before the remainder of the command options have been parsed. Values set in this macro are used as the default values for the other command line options. LEVEL is the optimization level specified; 2 if `-O2' is specified, 1 if `-O' is specified, and 0 if neither is specified. SIZE is nonzero if `-Os' is specified, 0 otherwise. You should not use this macro to change options that are not machine-specific. These should uniformly selected by the same optimization level on all supported machines. Use this macro to enable machine-specific optimizations. *Do not examine `write_symbols' in this macro!* The debugging options are *not supposed to alter the generated code. */#define OPTIMIZATION_OPTIONS(LEVEL,SIZE) frv_optimization_options (LEVEL, SIZE)/* Define this macro if debugging can be performed even without a frame pointer. If this macro is defined, GCC will turn on the `-fomit-frame-pointer' option whenever `-O' is specified. *//* Frv needs a specific frame layout that includes the frame pointer. */#define CAN_DEBUG_WITHOUT_FP#define LABEL_ALIGN_AFTER_BARRIER(LABEL) (TARGET_ALIGN_LABELS ? 3 : 0)/* Small Data Area Support. *//* Maximum size of variables that go in .sdata/.sbss. The -msdata=foo switch also controls how small variables are handled. */#ifndef SDATA_DEFAULT_SIZE#define SDATA_DEFAULT_SIZE 8#endif/* Storage Layout *//* Define this macro to have the value 1 if the most significant bit in a byte has the lowest number; otherwise define it to have the value zero. This means that bit-field instructions count from the most significant bit. If the machine has no bit-field instructions, then this must still be defined, but it doesn't matter which value it is defined to. This macro need not be a constant. This macro does not affect the way structure fields are packed into bytes or words; that is controlled by `BYTES_BIG_ENDIAN'. */#define BITS_BIG_ENDIAN 1/* Define this macro to have the value 1 if the most significant byte in a word has the lowest number. This macro need not be a constant. */#define BYTES_BIG_ENDIAN 1/* Define this macro to have the value 1 if, in a multiword object, the most significant word has the lowest number. This applies to both memory locations and registers; GCC fundamentally assumes that the order of words in memory is the same as the order in registers. This macro need not be a constant. */#define WORDS_BIG_ENDIAN 1/* Number of storage units in a word; normally 4. */#define UNITS_PER_WORD 4/* A macro to update MODE and UNSIGNEDP when an object whose type is TYPE and which has the specified mode and signedness is to be stored in a register. This macro is only called when TYPE is a scalar type. On most RISC machines, which only have operations that operate on a full register, define this macro to set M to `word_mode' if M is an integer mode narrower than `BITS_PER_WORD'. In most cases, only integer modes should be widened because wider-precision floating-point operations are usually more expensive than their narrower counterparts. For most machines, the macro definition does not change UNSIGNEDP. However, some machines, have instructions that preferentially handle either signed or unsigned quantities of certain modes. For example, on the DEC Alpha, 32-bit loads from memory and 32-bit add instructions sign-extend the result to 64 bits. On such machines, set UNSIGNEDP according to which kind of extension is more efficient. Do not define this macro if it would never modify MODE. */#define PROMOTE_MODE(MODE, UNSIGNEDP, TYPE) \ do \ { \ if (GET_MODE_CLASS (MODE) == MODE_INT \ && GET_MODE_SIZE (MODE) < 4) \ (MODE) = SImode; \ } \ while (0)/* Normal alignment required for function parameters on the stack, in bits. All stack parameters receive at least this much alignment regardless of data type. On most machines, this is the same as the size of an integer. */#define PARM_BOUNDARY 32/* Define this macro if you wish to preserve a certain alignment for the stack pointer. The definition is a C expression for the desired alignment (measured in bits). If `PUSH_ROUNDING' is not defined, the stack will always be aligned to the specified boundary. If `PUSH_ROUNDING' is defined and specifies a less strict alignment than `STACK_BOUNDARY', the stack may be momentarily unaligned while pushing arguments. */#define STACK_BOUNDARY 64/* Alignment required for a function entry point, in bits. */#define FUNCTION_BOUNDARY 128/* Biggest alignment that any data type can require on this machine, in bits. */#define BIGGEST_ALIGNMENT 64/* @@@ A hack, needed because libobjc wants to use ADJUST_FIELD_ALIGN for some reason. */#ifdef IN_TARGET_LIBS#define BIGGEST_FIELD_ALIGNMENT 64#else/* An expression for the alignment of a structure field FIELD if the alignment computed in the usual way is COMPUTED. GCC uses this value instead of the value in `BIGGEST_ALIGNMENT' or `BIGGEST_FIELD_ALIGNMENT', if defined, for structure fields only. */#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \ frv_adjust_field_align (FIELD, COMPUTED)#endif/* If defined, a C expression to compute the alignment for a static variable. TYPE is the data type, and ALIGN is the alignment that the object would ordinarily have. The value of this macro is used instead of that alignment to align the object. If this macro is not defined, then ALIGN is used. One use of this macro is to increase alignment of medium-size data to make it all fit in fewer cache lines. Another is to cause character arrays to be word-aligned so that `strcpy' calls that copy constants to character arrays can be done inline. */#define DATA_ALIGNMENT(TYPE, ALIGN) \ (TREE_CODE (TYPE) == ARRAY_TYPE \ && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \ && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))/* If defined, a C expression to compute the alignment given to a constant that is being placed in memory. CONSTANT is the constant and ALIGN is the alignment that the object would ordinarily have. The value of this macro is used instead of that alignment to align the object. If this macro is not defined, then ALIGN is used. The typical use of this macro is to increase alignment for string constants to be word aligned so that `strcpy' calls that copy constants can be done inline. */#define CONSTANT_ALIGNMENT(EXP, ALIGN) \ (TREE_CODE (EXP) == STRING_CST \ && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))/* 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. */#define STRICT_ALIGNMENT 1/* Define this if you wish to imitate the way many other C compilers handle alignment of bitfields and the structures that contain them. The behavior is that the type written for a bit-field (`int', `short', or other integer type) imposes an alignment for the entire structure, as if the structure really did contain an ordinary field of that type. In addition, the bit-field is placed within the structure so that it would fit within such a field, not crossing a boundary for it. Thus, on most machines, a bit-field whose type is written as `int' would not cross a four-byte boundary, and would force four-byte alignment for the whole structure. (The alignment used may not be four bytes; it is controlled by the other alignment parameters.) If the macro is defined, its definition should be a C expression; a nonzero value for the expression enables this behavior. Note that if this macro is not defined, or its value is zero, some bitfields may cross more than one alignment boundary. The compiler can support such references if there are `insv', `extv', and `extzv' insns that can directly reference memory. The other known way of making bitfields work is to define `STRUCTURE_SIZE_BOUNDARY' as large as `BIGGEST_ALIGNMENT'. Then every structure can be accessed with fullwords. Unless the machine has bit-field instructions or you define `STRUCTURE_SIZE_BOUNDARY' that way, you must define `PCC_BITFIELD_TYPE_MATTERS' to have a nonzero value. If your aim is to make GCC use the same conventions for laying out bitfields as are used by another compiler, here is how to investigate what the other compiler does. Compile and run this program: struct foo1 { char x; char :0; char y; }; struct foo2 { char x; int :0; char y; }; main () { printf ("Size of foo1 is %d\n", sizeof (struct foo1)); printf ("Size of foo2 is %d\n", sizeof (struct foo2)); exit (0); } If this prints 2 and 5, then the compiler's behavior is what you would get from `PCC_BITFIELD_TYPE_MATTERS'. Defined in svr4.h. */#define PCC_BITFIELD_TYPE_MATTERS 1/* Layout of Source Language Data Types. */#define CHAR_TYPE_SIZE 8#define SHORT_TYPE_SIZE 16#define INT_TYPE_SIZE 32#define LONG_TYPE_SIZE 32#define LONG_LONG_TYPE_SIZE 64#define FLOAT_TYPE_SIZE 32#define DOUBLE_TYPE_SIZE 64#define LONG_DOUBLE_TYPE_SIZE 64/* An expression whose value is 1 or 0, according to whether the type `char' should be signed or unsigned by default. The user can always override this default with the options `-fsigned-char' and `-funsigned-char'. */#define DEFAULT_SIGNED_CHAR 1/* General purpose registers. */#define GPR_FIRST 0 /* First gpr */#define GPR_LAST (GPR_FIRST + 63) /* Last gpr */#define GPR_R0 GPR_FIRST /* R0, constant 0 */#define GPR_FP (GPR_FIRST + 2) /* Frame pointer */#define GPR_SP (GPR_FIRST + 1) /* Stack pointer */ /* small data register */#define SDA_BASE_REG ((unsigned)(TARGET_FDPIC ? -1 : flag_pic ? PIC_REGNO : (GPR_FIRST + 16)))#define PIC_REGNO (GPR_FIRST + (TARGET_FDPIC?15:17)) /* PIC register. */#define FDPIC_FPTR_REGNO (GPR_FIRST + 14) /* uClinux PIC function pointer register. */#define FDPIC_REGNO (GPR_FIRST + 15) /* uClinux PIC register. */#define OUR_FDPIC_REG get_hard_reg_initial_val (SImode, FDPIC_REGNO)#define FPR_FIRST 64 /* First FP reg */#define FPR_LAST 127 /* Last FP reg */#define GPR_TEMP_NUM frv_condexec_temps /* # gprs to reserve for temps *//* We reserve the last CR and CCR in each category to be used as a reload register to reload the CR/CCR registers. This is a kludge. */#define CC_FIRST 128 /* First ICC/FCC reg */#define CC_LAST 135 /* Last ICC/FCC reg */#define ICC_FIRST (CC_FIRST + 4) /* First ICC reg */#define ICC_LAST (CC_FIRST + 7) /* Last ICC reg */#define ICC_TEMP (CC_FIRST + 7) /* Temporary ICC reg */#define FCC_FIRST (CC_FIRST) /* First FCC reg */#define FCC_LAST (CC_FIRST + 3) /* Last FCC reg */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -