📄 alpha.h
字号:
} \ if (((CODE) == LT || (CODE) == LTU) \ && GET_CODE (OP1) == CONST_INT && INTVAL (OP1) == 256) \ { \ (CODE) = (CODE) == LT ? LE : LEU; \ (OP1) = GEN_INT (255); \ } \ } while (0)/* 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 DImode/* Mode of a function address in a call instruction (for indexing purposes). */#define FUNCTION_MODE Pmode/* Define this if addresses of constant functions shouldn't be put through pseudo regs where they can be cse'd. Desirable on machines where ordinary constants are expensive but a CALL with constant address is cheap. We define this on the Alpha so that gen_call and gen_call_value get to see the SYMBOL_REF (for the hint field of the jsr). It will then copy it into a register, thus actually letting the address be cse'ed. */#define NO_FUNCTION_CSE/* Define this to be nonzero if shift instructions ignore all but the low-order few bits. */#define SHIFT_COUNT_TRUNCATED 1/* Use atexit for static constructors/destructors, instead of defining our own exit function. */#define HAVE_ATEXIT/* Compute the cost of computing a constant rtl expression RTX whose rtx-code is CODE. The body of this macro is a portion of a switch statement. If the code is computed here, return it with a return statement. Otherwise, break from the switch. If this is an 8-bit constant, return zero since it can be used nearly anywhere with no cost. If it is a valid operand for an ADD or AND, likewise return 0 if we know it will be used in that context. Otherwise, return 2 since it might be used there later. All other constants take at least two insns. */#define CONST_COSTS(RTX,CODE,OUTER_CODE) \ case CONST_INT: \ if (INTVAL (RTX) >= 0 && INTVAL (RTX) < 256) \ return 0; \ case CONST_DOUBLE: \ if (((OUTER_CODE) == PLUS && add_operand (RTX, VOIDmode)) \ || ((OUTER_CODE) == AND && and_operand (RTX, VOIDmode))) \ return 0; \ else if (add_operand (RTX, VOIDmode) || and_operand (RTX, VOIDmode)) \ return 2; \ else \ return COSTS_N_INSNS (2); \ case CONST: \ case SYMBOL_REF: \ case LABEL_REF: \ return COSTS_N_INSNS (3); /* Provide the costs of a rtl expression. This is in the body of a switch on CODE. */ #define RTX_COSTS(X,CODE,OUTER_CODE) \ case PLUS: case MINUS: \ if (FLOAT_MODE_P (GET_MODE (X))) \ return COSTS_N_INSNS (6); \ else if (GET_CODE (XEXP (X, 0)) == MULT \ && const48_operand (XEXP (XEXP (X, 0), 1), VOIDmode)) \ return (2 + rtx_cost (XEXP (XEXP (X, 0), 0), OUTER_CODE) \ + rtx_cost (XEXP (X, 1), OUTER_CODE)); \ break; \ case MULT: \ if (FLOAT_MODE_P (GET_MODE (X))) \ return COSTS_N_INSNS (6); \ return COSTS_N_INSNS (23); \ case ASHIFT: \ if (GET_CODE (XEXP (X, 1)) == CONST_INT \ && INTVAL (XEXP (X, 1)) <= 3) \ break; \ /* ... fall through ... */ \ case ASHIFTRT: case LSHIFTRT: case IF_THEN_ELSE: \ return COSTS_N_INSNS (2); \ case DIV: case UDIV: case MOD: case UMOD: \ if (GET_MODE (X) == SFmode) \ return COSTS_N_INSNS (34); \ else if (GET_MODE (X) == DFmode) \ return COSTS_N_INSNS (63); \ else \ return COSTS_N_INSNS (70); \ case MEM: \ return COSTS_N_INSNS (3); \ case FLOAT: case UNSIGNED_FLOAT: case FIX: case UNSIGNED_FIX: \ case FLOAT_EXTEND: case FLOAT_TRUNCATE: \ return COSTS_N_INSNS (6); \ case NEG: case ABS: \ if (FLOAT_MODE_P (GET_MODE (X))) \ return COSTS_N_INSNS (6); \ break;/* Control the assembler format that we output. *//* Output at beginning of assembler file. */#define ASM_FILE_START(FILE) \{ \ alpha_write_verstamp (FILE); \ fprintf (FILE, "\t.set noreorder\n"); \ fprintf (FILE, "\t.set volatile\n"); \ fprintf (FILE, "\t.set noat\n"); \ ASM_OUTPUT_SOURCE_FILENAME (FILE, main_input_filename); \}/* Output to assembler file text saying following lines may contain character constants, extra white space, comments, etc. */#define ASM_APP_ON ""/* Output to assembler file text saying following lines no longer contain unusual constructs. */#define ASM_APP_OFF ""#define TEXT_SECTION_ASM_OP ".text"/* Output before read-only data. */#define READONLY_DATA_SECTION_ASM_OP ".rdata"/* Output before writable data. */#define DATA_SECTION_ASM_OP ".data"/* Define an extra section for read-only data, a routine to enter it, and indicate that it is for read-only data. The first time we enter the readonly data section for a file, we write eight bytes of zero. This works around a bug in DEC's assembler in some versions of OSF/1 V3.x. */#define EXTRA_SECTIONS readonly_data#define EXTRA_SECTION_FUNCTIONS \void \literal_section () \{ \ if (in_section != readonly_data) \ { \ static int firsttime = 1; \ \ fprintf (asm_out_file, "%s\n", READONLY_DATA_SECTION_ASM_OP); \ if (firsttime) \ { \ firsttime = 0; \ ASM_OUTPUT_DOUBLE_INT (asm_out_file, const0_rtx); \ } \ \ in_section = readonly_data; \ } \} \#define READONLY_DATA_SECTION literal_section/* If we are referencing a function that is static, make the SYMBOL_REF special. We use this to see indicate we can branch to this function without setting PV or restoring GP. */#define ENCODE_SECTION_INFO(DECL) \ if (TREE_CODE (DECL) == FUNCTION_DECL && ! TREE_PUBLIC (DECL)) \ SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1;/* How to refer to registers in assembler output. This sequence is indexed by compiler's hard-register-number (see above). */#define REGISTER_NAMES \{"$0", "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \ "$9", "$10", "$11", "$12", "$13", "$14", "$15", \ "$16", "$17", "$18", "$19", "$20", "$21", "$22", "$23", \ "$24", "$25", "$26", "$27", "$28", "$29", "$30", "AP", \ "$f0", "$f1", "$f2", "$f3", "$f4", "$f5", "$f6", "$f7", "$f8", \ "$f9", "$f10", "$f11", "$f12", "$f13", "$f14", "$f15", \ "$f16", "$f17", "$f18", "$f19", "$f20", "$f21", "$f22", "$f23",\ "$f24", "$f25", "$f26", "$f27", "$f28", "$f29", "$f30", "FP"}/* How to renumber registers for dbx and gdb. */#define DBX_REGISTER_NUMBER(REGNO) (REGNO)/* This is how to output the definition of a user-level label named NAME, such as the label on a static function or variable NAME. */#define ASM_OUTPUT_LABEL(FILE,NAME) \ do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)/* This is how to output a command to make the user-level label named NAME defined for reference from other files. */#define ASM_GLOBALIZE_LABEL(FILE,NAME) \ do { fputs ("\t.globl ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0)/* This is how to output a reference to a user-level label named NAME. `assemble_name' uses this. */#define ASM_OUTPUT_LABELREF(FILE,NAME) \ fprintf (FILE, "%s", NAME)/* This is how to output an internal numbered label where PREFIX is the class of label and NUM is the number within the class. */#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ if ((PREFIX)[0] == 'L') \ fprintf (FILE, "$%s%d:\n", & (PREFIX)[1], NUM + 32); \ else \ fprintf (FILE, "%s%d:\n", PREFIX, NUM);/* This is how to output a label for a jump table. Arguments are the same as for ASM_OUTPUT_INTERNAL_LABEL, except the insn for the jump table is passed. */#define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLEINSN) \{ ASM_OUTPUT_ALIGN (FILE, 2); ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM); }/* This is how to store into the string LABEL the symbol_ref name of an internal numbered label where PREFIX is the class of label and NUM is the number within the class. This is suitable for output with `assemble_name'. */#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ if ((PREFIX)[0] == 'L') \ sprintf (LABEL, "*$%s%d", & (PREFIX)[1], NUM + 32); \ else \ sprintf (LABEL, "*%s%d", PREFIX, NUM)/* This is how to output an assembler line defining a `double' constant. */#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ { \ if (REAL_VALUE_ISINF (VALUE) \ || REAL_VALUE_ISNAN (VALUE) \ || REAL_VALUE_MINUS_ZERO (VALUE)) \ { \ long t[2]; \ REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t); \ fprintf (FILE, "\t.quad 0x%lx%08lx\n", \ t[1] & 0xffffffff, t[0] & 0xffffffff); \ } \ else \ { \ char str[30]; \ REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", str); \ fprintf (FILE, "\t.t_floating %s\n", str); \ } \ }/* This is how to output an assembler line defining a `float' constant. */#define ASM_OUTPUT_FLOAT(FILE,VALUE) \ { \ if (REAL_VALUE_ISINF (VALUE) \ || REAL_VALUE_ISNAN (VALUE) \ || REAL_VALUE_MINUS_ZERO (VALUE)) \ { \ long t; \ REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \ fprintf (FILE, "\t.long 0x%lx\n", t & 0xffffffff); \ } \ else \ { \ char str[30]; \ REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str); \ fprintf (FILE, "\t.s_floating %s\n", str); \ } \ } /* This is how to output an assembler line defining an `int' constant. */#define ASM_OUTPUT_INT(FILE,VALUE) \( fprintf (FILE, "\t.long "), \ output_addr_const (FILE, (VALUE)), \ fprintf (FILE, "\n"))/* This is how to output an assembler line defining a `long' constant. */#define ASM_OUTPUT_DOUBLE_INT(FILE,VALUE) \( fprintf (FILE, "\t.quad "), \ output_addr_const (FILE, (VALUE)), \ fprintf (FILE, "\n"))/* Likewise for `char' and `short' constants. */#define ASM_OUTPUT_SHORT(FILE,VALUE) \ fprintf (FILE, "\t.word %d\n", \ (GET_CODE (VALUE) == CONST_INT \ ? INTVAL (VALUE) & 0xffff : (abort (), 0)))#define ASM_OUTPUT_CHAR(FILE,VALUE) \ fprintf (FILE, "\t.byte %d\n", \ (GET_CODE (VALUE) == CONST_INT \ ? INTVAL (VALUE) & 0xff : (abort (), 0)))/* We use the default ASCII-output routine, except that we don't write more than 50 characters since the assembler doesn't support very long lines. */#define ASM_OUTPUT_ASCII(MYFILE, MYSTRING, MYLENGTH) \ do { \ FILE *_hide_asm_out_file = (MYFILE); \ unsigned char *_hide_p = (unsigned char *) (MYSTRING); \ int _hide_thissize = (MYLENGTH); \ int _size_so_far = 0; \ { \ FILE *asm_out_file = _hide_asm_out_file; \ unsigned char *p = _hide_p; \ int thissize = _hide_thissize; \ int i; \ fprintf (asm_out_file, "\t.ascii \""); \ \ for (i = 0; i < thissize; i++) \ { \ register int c = p[i]; \ \ if (_size_so_far ++ > 50 && i < thissize - 4) \ _size_so_far = 0, fprintf (asm_out_file, "\"\n\t.ascii \""); \ \ if (c == '\"' || c == '\\') \ putc ('\\', asm_out_file); \ if (c >= ' ' && c < 0177) \ putc (c, asm_out_file); \ else \ { \ fprintf (asm_out_file, "\\%o", c); \ /* After an octal-escape, if a digit follows, \ terminate one string constant and start another. \ The Vax assembler fails to stop reading the escape \ after three digits, so this is the only way we \ can get it to parse the data properly. */ \ if (i < thissize - 1 \
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -