📄 s390.h
字号:
s390_function_value ((VALTYPE), VOIDmode)#define LIBCALL_VALUE(MODE) \ s390_function_value (NULL, (MODE))/* Only gpr 2 and fpr 0 are ever used as return registers. */#define FUNCTION_VALUE_REGNO_P(N) ((N) == 2 || (N) == 16)/* Function entry and exit. *//* When returning from a function, the stack pointer does not matter. */#define EXIT_IGNORE_STACK 1/* Profiling. */#define FUNCTION_PROFILER(FILE, LABELNO) \ s390_function_profiler ((FILE), ((LABELNO)))#define PROFILE_BEFORE_PROLOGUE 1/* Implementing the varargs macros. */#define EXPAND_BUILTIN_VA_START(valist, nextarg) \ s390_va_start (valist, nextarg)/* Trampolines for nested functions. */#define TRAMPOLINE_SIZE (TARGET_64BIT ? 32 : 16)#define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, CXT) \ s390_initialize_trampoline ((ADDR), (FNADDR), (CXT))#define TRAMPOLINE_TEMPLATE(FILE) \ s390_trampoline_template (FILE)/* Addressing modes, and classification of registers for them. *//* Recognize any constant value that is a valid address. */#define CONSTANT_ADDRESS_P(X) 0/* Maximum number of registers that can appear in a valid memory address. */#define MAX_REGS_PER_ADDRESS 2/* The macros REG_OK_FOR..._P assume that the arg is a REG rtx and check its validity for a certain class. We have two alternate definitions for each of them. The usual definition accepts all pseudo regs; the other rejects them all. The symbol REG_OK_STRICT causes the latter definition to be used. Most source files want to accept pseudo regs in the hope that they will get allocated to the class that the insn wants them to be in. Some source files that are used after register allocation need to be strict. */#define REG_OK_FOR_INDEX_NONSTRICT_P(X) \((GET_MODE (X) == Pmode) && \ ((REGNO (X) >= FIRST_PSEUDO_REGISTER) \ || REGNO_REG_CLASS (REGNO (X)) == ADDR_REGS))#define REG_OK_FOR_BASE_NONSTRICT_P(X) REG_OK_FOR_INDEX_NONSTRICT_P (X)#define REG_OK_FOR_INDEX_STRICT_P(X) \((GET_MODE (X) == Pmode) && (REGNO_OK_FOR_INDEX_P (REGNO (X))))#define REG_OK_FOR_BASE_STRICT_P(X) \((GET_MODE (X) == Pmode) && (REGNO_OK_FOR_BASE_P (REGNO (X))))#ifndef REG_OK_STRICT#define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_INDEX_NONSTRICT_P(X)#define REG_OK_FOR_BASE_P(X) REG_OK_FOR_BASE_NONSTRICT_P(X)#else#define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_INDEX_STRICT_P(X)#define REG_OK_FOR_BASE_P(X) REG_OK_FOR_BASE_STRICT_P(X)#endif/* S/390 has no mode dependent addresses. */#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)/* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression that is a valid memory address for an instruction. The MODE argument is the machine mode for the MEM expression that wants to use this address. */#ifdef REG_OK_STRICT#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \{ \ if (legitimate_address_p (MODE, X, 1)) \ goto ADDR; \}#else#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \{ \ if (legitimate_address_p (MODE, X, 0)) \ goto ADDR; \}#endif/* Try machine-dependent ways of modifying an illegitimate address to be legitimate. If we find one, return the new, valid address. This macro is used in only one place: `memory_address' in explow.c. */#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN) \{ \ (X) = legitimize_address (X, OLDX, MODE); \ if (memory_address_p (MODE, X)) \ goto WIN; \}/* Try a machine-dependent way of reloading an illegitimate address operand. If we find one, push the reload and jump to WIN. This macro is used in only one place: `find_reloads_address' in reload.c. */#define LEGITIMIZE_RELOAD_ADDRESS(AD, MODE, OPNUM, TYPE, IND, WIN) \do { \ rtx new = legitimize_reload_address (AD, MODE, OPNUM, (int)(TYPE)); \ if (new) \ { \ (AD) = new; \ goto WIN; \ } \} while (0)/* Nonzero if the constant value X is a legitimate general operand. It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */#define LEGITIMATE_CONSTANT_P(X) \ legitimate_constant_p (X)/* Helper macro for s390.c and s390.md to check for symbolic constants. */#define SYMBOLIC_CONST(X) \(GET_CODE (X) == SYMBOL_REF \ || GET_CODE (X) == LABEL_REF \ || (GET_CODE (X) == CONST && symbolic_reference_mentioned_p (X)))#define TLS_SYMBOLIC_CONST(X) \((GET_CODE (X) == SYMBOL_REF && tls_symbolic_operand (X)) \ || (GET_CODE (X) == CONST && tls_symbolic_reference_mentioned_p (X)))/* Condition codes. *//* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, return the mode to be used for the comparison. */#define SELECT_CC_MODE(OP, X, Y) s390_select_ccmode ((OP), (X), (Y))/* Canonicalize a comparison from one we don't have to one we do have. */#define CANONICALIZE_COMPARISON(CODE, OP0, OP1) \ s390_canonicalize_comparison (&(CODE), &(OP0), &(OP1))/* Define the information needed to generate branch and scc insns. This is stored from the compare operation. Note that we can't use "rtx" here since it hasn't been defined! */extern struct rtx_def *s390_compare_op0, *s390_compare_op1, *s390_compare_emitted;/* Relative costs of operations. *//* On s390, copy between fprs and gprs is expensive. */#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) \ (( ( reg_classes_intersect_p ((CLASS1), GENERAL_REGS) \ && reg_classes_intersect_p ((CLASS2), FP_REGS)) \ || ( reg_classes_intersect_p ((CLASS1), FP_REGS) \ && reg_classes_intersect_p ((CLASS2), GENERAL_REGS))) ? 10 : 1)/* A C expression for the cost of moving data of mode M between a register and memory. A value of 2 is the default; this cost is relative to those in `REGISTER_MOVE_COST'. */#define MEMORY_MOVE_COST(M, C, I) 1/* A C expression for the cost of a branch instruction. A value of 1 is the default; other values are interpreted relative to that. */#define BRANCH_COST 1/* Nonzero if access to memory by bytes is slow and undesirable. */#define SLOW_BYTE_ACCESS 1/* An integer expression for the size in bits of the largest integer machine mode that should actually be used. We allow pairs of registers. */ #define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (TARGET_64BIT ? TImode : DImode)/* The maximum number of bytes that a single instruction can move quickly between memory and registers or between two memory locations. */#define MOVE_MAX (TARGET_64BIT ? 16 : 8)#define MOVE_MAX_PIECES (TARGET_64BIT ? 8 : 4)#define MAX_MOVE_MAX 16/* Determine whether to use move_by_pieces or block move insn. */#define MOVE_BY_PIECES_P(SIZE, ALIGN) \ ( (SIZE) == 1 || (SIZE) == 2 || (SIZE) == 4 \ || (TARGET_64BIT && (SIZE) == 8) )/* Determine whether to use clear_by_pieces or block clear insn. */#define CLEAR_BY_PIECES_P(SIZE, ALIGN) \ ( (SIZE) == 1 || (SIZE) == 2 || (SIZE) == 4 \ || (TARGET_64BIT && (SIZE) == 8) )/* This macro is used to determine whether store_by_pieces should be called to "memset" storage with byte values other than zero, or to "memcpy" storage when the source is a constant string. */#define STORE_BY_PIECES_P(SIZE, ALIGN) MOVE_BY_PIECES_P (SIZE, ALIGN)/* Don't perform CSE on function addresses. */#define NO_FUNCTION_CSE/* Sections. *//* Output before read-only data. */#define TEXT_SECTION_ASM_OP ".text"/* Output before writable (initialized) data. */#define DATA_SECTION_ASM_OP ".data"/* Output before writable (uninitialized) data. */#define BSS_SECTION_ASM_OP ".bss"/* S/390 constant pool breaks the devices in crtstuff.c to control section in where code resides. We have to write it as asm code. */#ifndef __s390x__#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \ asm (SECTION_OP "\n\ bras\t%r2,1f\n\0: .long\t" USER_LABEL_PREFIX #FUNC " - 0b\n\1: l\t%r3,0(%r2)\n\ bas\t%r14,0(%r3,%r2)\n\ .previous");#endif/* Position independent code. */extern int flag_pic;#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? 12 : INVALID_REGNUM)#define LEGITIMATE_PIC_OPERAND_P(X) legitimate_pic_operand_p (X)/* Assembler file format. *//* Character to start a comment. */#define ASM_COMMENT_START "#"/* Declare an uninitialized external linkage data object. */#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)/* Globalizing directive for a label. */#define GLOBAL_ASM_OP ".globl "/* Advance the location counter to a multiple of 2**LOG bytes. */#define ASM_OUTPUT_ALIGN(FILE, LOG) \ if ((LOG)) fprintf ((FILE), "\t.align\t%d\n", 1 << (LOG))/* Advance the location counter by SIZE bytes. */#define ASM_OUTPUT_SKIP(FILE, SIZE) \ fprintf ((FILE), "\t.set\t.,.+"HOST_WIDE_INT_PRINT_UNSIGNED"\n", (SIZE))/* The LOCAL_LABEL_PREFIX variable is used by dbxelf.h. */#define LOCAL_LABEL_PREFIX "."/* How to refer to registers in assembler output. This sequence is indexed by compiler's hard-register-number (see above). */#define REGISTER_NAMES \{ "%r0", "%r1", "%r2", "%r3", "%r4", "%r5", "%r6", "%r7", \ "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15", \ "%f0", "%f2", "%f4", "%f6", "%f1", "%f3", "%f5", "%f7", \ "%f8", "%f10", "%f12", "%f14", "%f9", "%f11", "%f13", "%f15", \ "%ap", "%cc", "%fp", "%rp", "%a0", "%a1" \}/* Print operand X (an rtx) in assembler syntax to file FILE. */#define PRINT_OPERAND(FILE, X, CODE) print_operand (FILE, X, CODE)#define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR)/* Output machine-dependent UNSPECs in address constants. */#define OUTPUT_ADDR_CONST_EXTRA(FILE, X, FAIL) \do { \ if (!s390_output_addr_const_extra (FILE, (X))) \ goto FAIL; \} while (0);/* Output an element of a case-vector that is absolute. */#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \do { \ char buf[32]; \ fputs (integer_asm_op (UNITS_PER_WORD, TRUE), (FILE)); \ ASM_GENERATE_INTERNAL_LABEL (buf, "L", (VALUE)); \ assemble_name ((FILE), buf); \ fputc ('\n', (FILE)); \} while (0)/* Output an element of a case-vector that is relative. */#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \do { \ char buf[32]; \ fputs (integer_asm_op (UNITS_PER_WORD, TRUE), (FILE)); \ ASM_GENERATE_INTERNAL_LABEL (buf, "L", (VALUE)); \ assemble_name ((FILE), buf); \ fputc ('-', (FILE)); \ ASM_GENERATE_INTERNAL_LABEL (buf, "L", (REL)); \ assemble_name ((FILE), buf); \ fputc ('\n', (FILE)); \} while (0)/* Miscellaneous parameters. *//* Specify the machine mode that this machine uses for the index in the tablejump instruction. */#define CASE_VECTOR_MODE (TARGET_64BIT ? DImode : SImode)/* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits is done just by pretending it is already truncated. */#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1/* Specify the machine mode that pointers have. After generation of rtl, the compiler makes no further distinction between pointers and any other objects of this machine mode. */#define Pmode ((enum machine_mode) (TARGET_64BIT ? DImode : SImode))/* This is -1 for "pointer mode" extend. See ptr_extend in s390.md. */#define POINTERS_EXTEND_UNSIGNED -1/* A function address in a call instruction is a byte address (for indexing purposes) so give the MEM rtx a byte's mode. */#define FUNCTION_MODE QImode/* Specify the value which is used when clz operand is zero. */#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = 64, 1)/* Machine-specific symbol_ref flags. */#define SYMBOL_FLAG_ALIGN1 (SYMBOL_FLAG_MACH_DEP << 0)/* Check whether integer displacement is in range. */#define DISP_IN_RANGE(d) \ (TARGET_LONG_DISPLACEMENT? ((d) >= -524288 && (d) <= 524287) \ : ((d) >= 0 && (d) <= 4095))#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -