📄 m32r.h
字号:
/* Boundary (in *bits*) on which stack pointer should be aligned. */#define STACK_BOUNDARY 32/* ALIGN FRAMES on word boundaries */#define M32R_STACK_ALIGN(LOC) (((LOC)+3) & ~3)/* Allocation boundary (in *bits*) for the code of a function. */#define FUNCTION_BOUNDARY 32/* 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/* No data type wants to be aligned rounder than this. */#define BIGGEST_ALIGNMENT 32/* The best alignment to use in cases where we have a choice. */#define FASTEST_ALIGNMENT 32/* Make strings word-aligned so strcpy from constants will be faster. */#define CONSTANT_ALIGNMENT(EXP, ALIGN) \ ((TREE_CODE (EXP) == STRING_CST \ && (ALIGN) < FASTEST_ALIGNMENT) \ ? FASTEST_ALIGNMENT : (ALIGN))/* Make arrays of chars word-aligned for the same reasons. */#define DATA_ALIGNMENT(TYPE, ALIGN) \ (TREE_CODE (TYPE) == ARRAY_TYPE \ && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \ && (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN))/* Set this nonzero if move instructions will actually fail to work when given unaligned data. */#define STRICT_ALIGNMENT 1/* Layout of source language data types. */#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/* Define this as 1 if `char' should by default be signed; else as 0. */#define DEFAULT_SIGNED_CHAR 1#define SIZE_TYPE "long unsigned int"#define PTRDIFF_TYPE "long int"#define WCHAR_TYPE "short unsigned int"#define WCHAR_TYPE_SIZE 16/* Define results of standard character escape sequences. */#define TARGET_BELL 007#define TARGET_BS 010#define TARGET_TAB 011#define TARGET_NEWLINE 012#define TARGET_VT 013#define TARGET_FF 014#define TARGET_CR 015/* 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. */#define FIRST_PSEUDO_REGISTER 18 /* 1 for registers that have pervasive standard uses and are not available for the register allocator. 0-3 - arguments/results 4-5 - call used [4 is used as a tmp during prologue/epilogue generation] 6 - call used, gptmp 7 - call used, static chain pointer 8-11 - call saved 12 - call saved [reserved for global pointer] 13 - frame pointer 14 - subroutine link register 15 - stack pointer 16 - arg pointer 17 - carry flag By default, the extension registers are not available. */#define FIXED_REGISTERS \{ 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 1, \ 1, 1 }/* 1 for registers not available across function calls. These must include the FIXED_REGISTERS and also any registers that can be used without being saved. The latter must include the registers where values are returned and the register where structure-value addresses are passed. Aside from that, you can include as many other registers as you like. */#define CALL_USED_REGISTERS \{ 1, 1, 1, 1, 1, 1, 1, 1, \ 0, 0, 0, 0, 0, 0, 1, 1, \ 1, 1 }/* Zero or more C statements that may conditionally modify two variables `fixed_regs' and `call_used_regs' (both of type `char []') after they have been initialized from the two preceding macros. This is necessary in case the fixed or call-clobbered registers depend on target flags. You need not define this macro if it has no work to do. *//*#define CONDITIONAL_REGISTER_USAGE*//* If defined, an initializer for a vector of integers, containing the numbers of hard registers in the order in which GNU CC should prefer to use them (from most preferred to least). */#if 1 /* better for int code */#define REG_ALLOC_ORDER \{ 4, 5, 6, 7, 2, 3, 8, 9, 10, 11, 12, 13, 14, 0, 1, 15, 16, 17 }#else /* better for fp code at expense of int code */#define REG_ALLOC_ORDER \{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }#endif/* Return number of consecutive hard regs needed starting at reg REGNO to hold something of mode MODE. This is ordinarily the length in words of a value of mode MODE but can be less for certain modes in special long registers. */#define HARD_REGNO_NREGS(REGNO, MODE) \((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)/* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. */extern unsigned int m32r_hard_regno_mode_ok[];extern unsigned int m32r_mode_class[];#define HARD_REGNO_MODE_OK(REGNO, MODE) \((m32r_hard_regno_mode_ok[REGNO] & m32r_mode_class[MODE]) != 0)/* A C expression that is nonzero if it is desirable to choose register allocation so as to avoid move instructions between a value of mode MODE1 and a value of mode MODE2. If `HARD_REGNO_MODE_OK (R, MODE1)' and `HARD_REGNO_MODE_OK (R, MODE2)' are ever different for any R, then `MODES_TIEABLE_P (MODE1, MODE2)' must be zero. *//* Tie QI/HI/SI modes together. */#define MODES_TIEABLE_P(MODE1, MODE2) \(GET_MODE_CLASS (MODE1) == MODE_INT \ && GET_MODE_CLASS (MODE2) == MODE_INT \ && GET_MODE_SIZE (MODE1) <= UNITS_PER_WORD \ && GET_MODE_SIZE (MODE2) <= UNITS_PER_WORD)/* Register classes and constants. *//* Define the classes of registers for register constraints in the machine description. Also define ranges of constants. One of the classes must always be named ALL_REGS and include all hard regs. If there is more than one class, another class must be named NO_REGS and contain no registers. The name GENERAL_REGS must be the name of a class (or an alias for another name such as ALL_REGS). This is the class of registers that is allowed by "g" or "r" in a register constraint. Also, registers outside this class are allocated only when instructions express preferences for them. The classes must be numbered in nondecreasing order; that is, a larger-numbered class must never be contained completely in a smaller-numbered class. For any two classes, it is very desirable that there be another class that represents their union. It is important that any condition codes have class NO_REGS. See `register_operand'. */enum reg_class { NO_REGS, CARRY_REG, GENERAL_REGS, ALL_REGS, LIM_REG_CLASSES};#define N_REG_CLASSES (int) LIM_REG_CLASSES/* Give names of register classes as strings for dump file. */#define REG_CLASS_NAMES \{ "NO_REGS", "CARRY_REG", "GENERAL_REGS", "ALL_REGS" }/* Define which registers fit in which classes. This is an initializer for a vector of HARD_REG_SET of length N_REG_CLASSES. */#define REG_CLASS_CONTENTS \{ {0}, {0x20000}, {0x1ffff}, {0x3ffff} }/* The same information, inverted: Return the class number of the smallest class containing reg number REGNO. This could be a conditional expression or could index an array. */extern enum reg_class m32r_regno_reg_class[FIRST_PSEUDO_REGISTER];#define REGNO_REG_CLASS(REGNO) \(m32r_regno_reg_class[REGNO])/* The class value for index registers, and the one for base regs. */#define INDEX_REG_CLASS GENERAL_REGS#define BASE_REG_CLASS GENERAL_REGS/* Get reg_class from a letter such as appears in the machine description. */#define REG_CLASS_FROM_LETTER(C) NO_REGS/* These assume that REGNO is a hard or pseudo reg number. They give nonzero only if REGNO is a hard reg of the suitable class or a pseudo reg currently allocated to a suitable hard reg. Since they use reg_renumber, they are safe only once reg_renumber has been allocated, which happens in local-alloc.c. */#define REGNO_OK_FOR_BASE_P(REGNO) \((REGNO) < FIRST_PSEUDO_REGISTER \ ? GPR_P (REGNO) || (REGNO) == ARG_POINTER_REGNUM \ : GPR_P (reg_renumber[REGNO]))#define REGNO_OK_FOR_INDEX_P(REGNO) REGNO_OK_FOR_BASE_P(REGNO)/* Given an rtx X being reloaded into a reg required to be in class CLASS, return the class of reg to actually use. In general this is just CLASS; but on some machines in some cases it is preferable to use a more restrictive class. */#define PREFERRED_RELOAD_CLASS(X,CLASS) \(CLASS)/* Return the maximum number of consecutive registers needed to represent mode MODE in a register of class CLASS. */#define CLASS_MAX_NREGS(CLASS, MODE) \((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)/* The letters I, J, K, L, M, N, O, P in a register constraint string can be used to stand for particular ranges of immediate operands. This macro defines what the ranges are. C is the letter, and VALUE is a constant value. Return 1 if VALUE is in the range specified by C. *//* 'I' is used for 8 bit signed immediates. 'J' is used for 16 bit signed immediates. 'K' is used for 16 bit unsigned immediates. 'L' is used for 16 bit immediates left shifted by 16 (sign ???). 'M' is used for 24 bit unsigned immediates. 'N' is used for any 32 bit non-symbolic value. 'O' is used for 5 bit unsigned immediates (shift count). 'P' is used for 16 bit signed immediates for compares (values in the range -32767 to +32768). *//* local to this file */#define INT8_P(X) ((unsigned) ((X) + 0x80) < 0x100)#define INT16_P(X) ((unsigned) ((X) + 0x8000) < 0x10000)#define CMP_INT16_P(X) ((unsigned) ((X) - 1 + 0x8000) < 0x10000)#define UINT16_P(X) ((unsigned) (X) < 0x10000)#define UPPER16_P(X) (((X) & ~0xffff0000) == 0)#define UINT24_P(X) ((unsigned) (X) < 0x1000000)#define INT32_P(X) ((X) >= (-(HOST_WIDE_INT) 0x7fffffff - 1) \ && (X) <= (unsigned HOST_WIDE_INT) 0xffffffff)#define UINT5_P(X) ((unsigned) (X) < 32)#define INVERTED_SIGNED_8BIT(VAL) ((VAL) >= -127 && (VAL) <= 128)#define CONST_OK_FOR_LETTER_P(VALUE, C) \((C) == 'I' ? INT8_P (VALUE) \ : (C) == 'J' ? INT16_P (VALUE) \ : (C) == 'K' ? UINT16_P (VALUE) \ : (C) == 'L' ? UPPER16_P (VALUE) \ : (C) == 'M' ? UINT24_P (VALUE) \ : (C) == 'N' ? INVERTED_SIGNED_8BIT (VALUE) \ : (C) == 'O' ? UINT5_P (VALUE) \ : (C) == 'P' ? CMP_INT16_P (VALUE) \ : 0)/* Similar, but for floating constants, and defining letters G and H. Here VALUE is the CONST_DOUBLE rtx itself. For the m32r, handle a few constants inline. ??? We needn't treat DI and DF modes differently, but for now we do. */#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \((C) == 'G' ? easy_di_const (VALUE) \ : (C) == 'H' ? easy_df_const (VALUE) \ : 0)/* A C expression that defines the optional machine-dependent constraint letters that can be used to segregate specific types of operands, usually memory references, for the target machine. It should return 1 if VALUE corresponds to the operand type represented by the constraint letter C. If C is not defined as an extra constraint, the value returned should be 0 regardless of VALUE. *//* Q is for symbolic addresses loadable with ld24. R is for symbolic addresses when ld24 can't be used. S is unused. T is for indirect of a pointer. U is for pushes and pops of the stack pointer. */#define EXTRA_CONSTRAINT(VALUE, C) \((C) == 'Q' \ ? ((TARGET_ADDR24 && GET_CODE (VALUE) == LABEL_REF) \ || addr24_operand (VALUE, VOIDmode)) \ : (C) == 'R' \ ? ((TARGET_ADDR32 && GET_CODE (VALUE) == LABEL_REF) \ || addr32_operand (VALUE, VOIDmode)) \ : (C) == 'S' \ ? 0 \ : (C) == 'T' \ ? (GET_CODE (VALUE) == MEM \ && memreg_operand (VALUE, GET_MODE (VALUE))) \ : (C) == 'U' \ ? (GET_CODE (VALUE) == MEM \ && PUSH_POP_P (GET_MODE (VALUE), XEXP (VALUE, 0))) \ : 0)/* Stack layout and stack pointer usage. *//* Define this macro if pushing a word onto the stack moves the stack pointer to a smaller address. */#define STACK_GROWS_DOWNWARD/* Define this if the nominal address of the stack frame is at the high-address end of the local variables; that is, each additional local variable allocated goes at a more negative offset from the frame pointer. *//*#define FRAME_GROWS_DOWNWARD*//* Offset from frame pointer to start allocating local variables at. If FRAME_GROWS_DOWNWARD, this is the offset to the END of the first local allocated. Otherwise, it is the offset to the BEGINNING of the first local allocated. *//* The frame pointer points at the same place as the stack pointer, except if alloca has been called. */#define STARTING_FRAME_OFFSET \
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -