📄 pa.h
字号:
/* This macro defines command-line switches that modify the default target name. The definition is be an initializer for an array of structures. Each array element has have three elements: the switch name, one of the enumeration codes ADD or DELETE to indicate whether the string should be inserted or deleted, and the string to be inserted or deleted. */#define MODIFY_TARGET_NAME {{"-32", DELETE, "64"}, {"-64", ADD, "64"}}/* Make gcc agree with <machine/ansi.h> */#define SIZE_TYPE "unsigned int"#define PTRDIFF_TYPE "int"#define WCHAR_TYPE "unsigned int"#define WCHAR_UNSIGNED 1#define WCHAR_TYPE_SIZE 32/* Show we can debug even without a frame pointer. */#define CAN_DEBUG_WITHOUT_FP/* Machine dependent reorg pass. */#define MACHINE_DEPENDENT_REORG(X) pa_reorg(X)/* Names to predefine in the preprocessor for this target machine. */#define CPP_PREDEFINES "-Dhppa -Dhp9000s800 -D__hp9000s800 -Dhp9k8 -Dunix -Dhp9000 -Dhp800 -Dspectrum -DREVARGV -Asystem=unix -Asystem=bsd -Acpu=hppa -Amachine=hppa"/* target machine storage layout *//* Define for cross-compilation from a host with a different float format or endianness (e.g. VAX, x86). */#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 most significant bit is lowest numbered in instructions that operate on numbered bit-fields. */#define BITS_BIG_ENDIAN 1/* Define this if most significant byte of a word is the lowest numbered. *//* That is true on the HP-PA. */#define BYTES_BIG_ENDIAN 1/* Define this if most significant word of a multiword number is lowest numbered. */#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_64BIT ? 64 : 32)#define MAX_BITS_PER_WORD 64#define MAX_LONG_TYPE_SIZE 32#define MAX_WCHAR_TYPE_SIZE 32/* Width of a word, in units (bytes). */#define UNITS_PER_WORD (TARGET_64BIT ? 8 : 4)#define MIN_UNITS_PER_WORD 4/* Width in bits of a pointer. See also the macro `Pmode' defined below. */#define POINTER_SIZE BITS_PER_WORD/* Allocation boundary (in *bits*) for storing arguments in argument list. */#define PARM_BOUNDARY BITS_PER_WORD/* Largest alignment required for any stack parameter, in bits. Don't define this if it is equal to PARM_BOUNDARY */#define MAX_PARM_BOUNDARY 64/* Boundary (in *bits*) on which stack pointer is always aligned; certain optimizations in combine depend on this. GCC for the PA always rounds its stacks to a 512bit boundary, but that happens late in the compilation process. */#define STACK_BOUNDARY (TARGET_64BIT ? 128 : 64)#define PREFERRED_STACK_BOUNDARY 512/* Allocation boundary (in *bits*) for the code of a function. */#define FUNCTION_BOUNDARY (TARGET_64BIT ? 64 : 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. This is set to 128 bits to allow for lock semaphores in the stack frame.*/#define BIGGEST_ALIGNMENT 128/* Get around hp-ux assembler bug, and make strcpy of constants fast. */#define CONSTANT_ALIGNMENT(CODE, TYPEALIGN) \ ((TYPEALIGN) < 32 ? 32 : (TYPEALIGN))/* 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) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))/* Set this nonzero if move instructions will actually fail to work when given unaligned data. */#define STRICT_ALIGNMENT 1/* Generate calls to memcpy, memcmp and memset. */#define TARGET_MEM_FUNCTIONS/* Value is 1 if it is a good idea to tie two pseudo registers when one has mode MODE1 and one has mode MODE2. If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2, for any hard reg, then this must be 0 for correct output. */#define MODES_TIEABLE_P(MODE1, MODE2) \ (GET_MODE_CLASS (MODE1) == GET_MODE_CLASS (MODE2))/* Specify the registers used for certain standard purposes. The values of these macros are register numbers. *//* The HP-PA pc isn't overloaded on a register that the compiler knows about. *//* #define PC_REGNUM *//* Register to use for pushing function arguments. */#define STACK_POINTER_REGNUM 30/* Base register for access to local variables of the function. */#define FRAME_POINTER_REGNUM 3/* Value should be nonzero if functions must have frame pointers. */#define FRAME_POINTER_REQUIRED \ (current_function_calls_alloca)/* C statement to store the difference between the frame pointer and the stack pointer values immediately after the function prologue. Note, we always pretend that this is a leaf function because if it's not, there's no point in trying to eliminate the frame pointer. If it is a leaf function, we guessed right! */#define INITIAL_FRAME_POINTER_OFFSET(VAR) \ do {(VAR) = - compute_frame_size (get_frame_size (), 0);} while (0)/* Base register for access to arguments of the function. */#define ARG_POINTER_REGNUM 3/* Register in which static-chain is passed to a function. */#define STATIC_CHAIN_REGNUM 29/* Register which holds offset table for position-independent data references. */#define PIC_OFFSET_TABLE_REGNUM (TARGET_64BIT ? 27 : 19)#define PIC_OFFSET_TABLE_REG_CALL_CLOBBERED 1/* Function to return the rtx used to save the pic offset table register across function calls. */extern struct rtx_def *hppa_pic_save_rtx PARAMS ((void));#define DEFAULT_PCC_STRUCT_RETURN 0/* SOM ABI says that objects larger than 64 bits are returned in memory. PA64 ABI says that objects larger than 128 bits are returned in memory. Note, int_size_in_bytes can return -1 if the size of the object is variable or larger than the maximum value that can be expressed as a HOST_WIDE_INT. */#define RETURN_IN_MEMORY(TYPE) \ ((unsigned HOST_WIDE_INT) int_size_in_bytes (TYPE) > (TARGET_64BIT ? 16 : 8))/* Register in which address to store a structure value is passed to a function. */#define STRUCT_VALUE_REGNUM 28/* Describe how we implement __builtin_eh_return. */#define EH_RETURN_DATA_REGNO(N) \ ((N) < 3 ? (N) + 20 : (N) == 4 ? 31 : INVALID_REGNUM)#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, 29)#define EH_RETURN_HANDLER_RTX gen_rtx_REG (Pmode, 2)/* The letters I, J, K, L and M 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 the 11 bit constants. `J' is used for the 14 bit constants. `K' is used for values that can be moved with a zdepi insn. `L' is used for the 5 bit constants. `M' is used for 0. `N' is used for values with the least significant 11 bits equal to zero and when sign extended from 32 to 64 bits the value does not change. `O' is used for numbers n such that n+1 is a power of 2. */#define CONST_OK_FOR_LETTER_P(VALUE, C) \ ((C) == 'I' ? VAL_11_BITS_P (VALUE) \ : (C) == 'J' ? VAL_14_BITS_P (VALUE) \ : (C) == 'K' ? zdepi_cint_p (VALUE) \ : (C) == 'L' ? VAL_5_BITS_P (VALUE) \ : (C) == 'M' ? (VALUE) == 0 \ : (C) == 'N' ? (((VALUE) & (((HOST_WIDE_INT) -1 << 31) | 0x7ff)) == 0 \ || (((VALUE) & (((HOST_WIDE_INT) -1 << 31) | 0x7ff)) \ == (HOST_WIDE_INT) -1 << 31)) \ : (C) == 'O' ? (((VALUE) & ((VALUE) + 1)) == 0) \ : (C) == 'P' ? and_mask_p (VALUE) \ : 0)/* Similar, but for floating or large integer constants, and defining letters G and H. Here VALUE is the CONST_DOUBLE rtx itself. For PA, `G' is the floating-point constant zero. `H' is undefined. */#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \ ((C) == 'G' ? (GET_MODE_CLASS (GET_MODE (VALUE)) == MODE_FLOAT \ && (VALUE) == CONST0_RTX (GET_MODE (VALUE))) \ : 0)/* The class value for index registers, and the one for base regs. */#define INDEX_REG_CLASS GENERAL_REGS#define BASE_REG_CLASS GENERAL_REGS#define FP_REG_CLASS_P(CLASS) \ ((CLASS) == FP_REGS || (CLASS) == FPUPPER_REGS)/* True if register is floating-point. */#define FP_REGNO_P(N) ((N) >= FP_REG_FIRST && (N) <= FP_REG_LAST)/* 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 register class of a scratch register needed to copy IN into or out of a register in CLASS in MODE. If it can be done directly NO_REGS is returned. Avoid doing any work for the common case calls. */#define SECONDARY_RELOAD_CLASS(CLASS,MODE,IN) \ ((CLASS == BASE_REG_CLASS && GET_CODE (IN) == REG \ && REGNO (IN) < FIRST_PSEUDO_REGISTER) \ ? NO_REGS : secondary_reload_class (CLASS, MODE, IN))/* On the PA it is not possible to directly move data between GENERAL_REGS and FP_REGS. */#define SECONDARY_MEMORY_NEEDED(CLASS1, CLASS2, MODE) \ (FP_REG_CLASS_P (CLASS1) != FP_REG_CLASS_P (CLASS2))/* Return the stack location to use for secondary memory needed reloads. */#define SECONDARY_MEMORY_NEEDED_RTX(MODE) \ gen_rtx_MEM (MODE, gen_rtx_PLUS (Pmode, stack_pointer_rtx, GEN_INT (-16)))/* Stack layout; function entry, exit and calling. *//* Define this if pushing a word on the stack makes the stack pointer a smaller address. *//* #define STACK_GROWS_DOWNWARD *//* Believe it or not. */#define ARGS_GROW_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 in the frame. *//* #define FRAME_GROWS_DOWNWARD *//* Offset within stack frame 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. */#define STARTING_FRAME_OFFSET 8/* If we generate an insn to push BYTES bytes, this says how many the stack pointer really advances by. On the HP-PA, don't define this because there are no push insns. *//* #define PUSH_ROUNDING(BYTES) *//* Offset of first parameter from the argument pointer register value. This value will be negated because the arguments grow down. Also note that on STACK_GROWS_UPWARD machines (such as this one) this is the distance from the frame pointer to the end of the first argument, not it's beginning. To get the real offset of the first argument, the size of the argument must be added. */#define FIRST_PARM_OFFSET(FNDECL) (TARGET_64BIT ? -64 : -32)/* When a parameter is passed in a register, stack space is still allocated for it. */#define REG_PARM_STACK_SPACE(DECL) (TARGET_64BIT ? 64 : 16)/* Define this if the above stack space is to be considered part of the space allocated by the caller. */#define OUTGOING_REG_PARM_STACK_SPACE/* Keep the stack pointer constant throughout the function. This is both an optimization and a necessity: longjmp doesn't behave itself when the stack pointer moves within the function! */#define ACCUMULATE_OUTGOING_ARGS 1/* The weird HPPA calling conventions require a minimum of 48 bytes on the stack: 16 bytes for register saves, and 32 bytes for magic. This is the difference between the logical top of stack and the actual sp. */#define STACK_POINTER_OFFSET \ (TARGET_64BIT ? -(current_function_outgoing_args_size + 16): -32)#define STACK_DYNAMIC_OFFSET(FNDECL) \ (TARGET_64BIT \ ? (STACK_POINTER_OFFSET) \ : ((STACK_POINTER_OFFSET) - current_function_outgoing_args_size))/* Value is 1 if returning from a function call automatically pops the arguments described by the number-of-args field in the call. FUNDECL is the declaration node of the function (as a tree), FUNTYPE is the data type of the function (as a tree),
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -