📄 pa.h
字号:
/* Conditional branches with empty delay slots have a length of two. */#define ADJUST_INSN_LENGTH(INSN, LENGTH) \ if (GET_CODE (INSN) == CALL_INSN \ || (GET_CODE (INSN) == JUMP_INSN && ! simplejump_p (insn))) \ LENGTH += 1;/* Control the assembler format that we output. *//* Output at beginning of assembler file. */#define ASM_FILE_START(FILE) \do { fprintf (FILE, "\t.SPACE $PRIVATE$\n\\t.SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31\n\\t.SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82\n\\t.SPACE $TEXT$\n\\t.SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44\n\\t.SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY\n\\t.IMPORT $global$,DATA\n\\t.IMPORT $$dyncall,MILLICODE\n");\ if (profile_flag)\ fprintf (FILE, "\t.IMPORT _mcount, CODE\n");\ } while (0)/* 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 ""/* We don't yet know how to identify GCC to HP-PA machines. */#define ASM_IDENTIFY_GCC(FILE) fprintf (FILE, "; gcc_compiled.:\n")/* Output before code. *//* Supposedly the assembler rejects the command if there is no tab! */#define TEXT_SECTION_ASM_OP "\t.SPACE $TEXT$\n\t.SUBSPA $CODE$\n"/* Output before writable data. *//* Supposedly the assembler rejects the command if there is no tab! */#define DATA_SECTION_ASM_OP "\t.SPACE $PRIVATE$\n\t.SUBSPA $DATA$\n"/* Output before uninitialized data. */#define BSS_SECTION_ASM_OP "\t.SPACE $PRIVATE$\n\t.SUBSPA $BSS$\n"/* Define the .bss section for ASM_OUTPUT_LOCAL to use. */#define EXTRA_SECTIONS in_bss#define EXTRA_SECTION_FUNCTIONS \void \bss_section () \{ \ if (in_section != in_bss) \ { \ fprintf (asm_out_file, "%s\n", BSS_SECTION_ASM_OP); \ in_section = in_bss; \ } \}/* How to refer to registers in assembler output. This sequence is indexed by compiler's hard-register-number (see above). */#define REGISTER_NAMES \{"0", "%r1", "%r2", "%r3", "%r4", "%r5", "%r6", "%r7", \ "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15", \ "%r16", "%r17", "%r18", "%r19", "%r20", "%r21", "%r22", "%r23", \ "%r24", "%r25", "%r26", "%r27", "%r28", "%r29", "%r30", "%r31", \ "%fr0", "%fr1", "%fr2", "%fr3", "%fr4", "%fr5", "%fr6", "%fr7", \ "%fr8", "%fr9", "%fr10", "%fr11", "%fr12", "%fr13", "%fr14", "%fr15", \ "%fr0", "%fr0R", "%fr1", "%fr1R", "%fr2", "%fr2R", "%fr3", "%fr3R", \ "%fr4", "%fr4R", "%fr5", "%fr5R", "%fr6", "%fr6R", "%fr7", "%fr7R", \ "%fr8", "%fr8R", "%fr9", "%fr9R", "%fr10", "%fr10R", "%fr11", "%fr11R",\ "%fr12", "%fr12R", "%fr13", "%fr13R", "%fr14", "%fr14R", "%fr15", "%fr15R",\ "%fr16", "%fr16R", "%fr17", "%fr17R", "%fr18", "%fr18R", "%fr19", "%fr19R",\ "%fr20", "%fr20R", "%fr21", "%fr21R", "%fr22", "%fr22R", "%fr23", "%fr23R",\ "%fr24", "%fr24R", "%fr25", "%fr25R", "%fr26", "%fr26R", "%fr27", "%fr27R",\ "%fr28", "%fr28R", "%fr29", "%fr29R", "%fr30", "%fr30R", "%fr31", "%fr31R",\ "SAR"}/* 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); fputc ('\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_OUTPUT_EXTERNAL(FILE, DECL, NAME) \ do { fputs ("\t.IMPORT ", FILE); \ assemble_name (FILE, NAME); \ if (FUNCTION_NAME_P (NAME)) \ fputs (",CODE\n", FILE); \ else \ fputs (",DATA\n", FILE); \ } while (0)/* hpux ld doesn't output the object file name, or anything useful at all, to indicate the start of an object file's symbols. This screws up gdb, so we'll output this magic cookie at the end of an object file with debugging symbols */#define ASM_FILE_END(FILE) \ do { if (write_symbols == DBX_DEBUG)\ { fputs (TEXT_SECTION_ASM_OP, FILE);\ fputs (".stabs \"end_file.\",4,0,0,Ltext_end\nLtext_end:\n",\ (FILE));\ }\ } while (0)/* The bogus HP assembler requires ALL external references to be "imported", even library calls. They look a bit different, so here's this macro. */#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, RTL) \ do { fputs ("\t.IMPORT ", FILE); \ assemble_name (FILE, XSTR ((RTL), 0)); \ fputs (",CODE\n", FILE); \ } while (0)#define ASM_GLOBALIZE_LABEL(FILE, NAME) \ do { fputs ("\t.EXPORT ", FILE); assemble_name (FILE, NAME); \ if (FUNCTION_NAME_P (NAME)) \ fputs (",CODE\n", FILE); \ else \ fputs (",DATA\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) + (FUNCTION_NAME_P (NAME) ? 1 : 0))/* 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) \ fprintf (FILE, "%s$%04d\n", 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) \ sprintf (LABEL, "*%s$%04d", PREFIX, NUM)/* This is how to output an assembler line defining a `double' constant. */#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ do { union { double d; int i[2];} __u; \ __u.d = (VALUE); \ fprintf (FILE, "\t; .double %.20e\n\t.word %d ; = 0x%x\n\t.word %d ; = 0x%x\n", \ __u.d, __u.i[0], __u.i[0], __u.i[1], __u.i[1]); \ } while (0)/* This is how to output an assembler line defining a `float' constant. */#define ASM_OUTPUT_FLOAT(FILE,VALUE) \ do { union { float f; int i;} __u; \ __u.f = (VALUE); \ fprintf (FILE, "\t; .float %.12e\n\t.word %d ; = 0x%x\n", __u.f, __u.i, __u.i); \ } while (0)/* This is how to output an assembler line defining an `int' constant. */#define ASM_OUTPUT_INT(FILE,VALUE) \( fprintf (FILE, "\t.word "), \ output_addr_const (FILE, (VALUE)), \ fprintf (FILE, "\n"))/* Likewise for `short' and `char' constants. */#define ASM_OUTPUT_SHORT(FILE,VALUE) \( fprintf (FILE, "\t.half "), \ output_addr_const (FILE, (VALUE)), \ fprintf (FILE, "\n"))#define ASM_OUTPUT_CHAR(FILE,VALUE) \( fprintf (FILE, "\t.byte "), \ output_addr_const (FILE, (VALUE)), \ fprintf (FILE, "\n"))/* This is how to output an assembler line for a numeric constant byte. */#define ASM_OUTPUT_BYTE(FILE,VALUE) \ fprintf (FILE, "\t.byte 0x%x\n", (VALUE))#define ASM_OUTPUT_ASCII(FILE, P, SIZE) \ output_ascii ((FILE), (P), (SIZE))#if 0#define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \ fprintf (FILE, "\tstws,mb %s,4(0,30)\n", reg_names[REGNO])/* This is how to output an insn to pop a register from the stack. It need not be very fast code. */#define ASM_OUTPUT_REG_POP(FILE,REGNO) \ fprintf (FILE, "\tldws,ma -4(0,30),%s\n", reg_names[REGNO])#endif#define ASM_OUTPUT_REG_PUSH(FILE,REGNO)#define ASM_OUTPUT_REG_POP(FILE,REGNO) /* This is how to output an element of a case-vector that is absolute. Note that this method makes filling these branch delay slots virtually impossible. */#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ fprintf (FILE, "\tb L$%04d\n\tnop\n", VALUE)/* This is how to output an element of a case-vector that is relative. (The HP-PA does not use such vectors, but we must define this macro anyway.) */#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \ fprintf (FILE, "\tword L%d-L%d\n", VALUE, REL)/* This is how to output an assembler line that says to advance the location counter to a multiple of 2**LOG bytes. */#define ASM_OUTPUT_ALIGN(FILE,LOG) \ fprintf (FILE, "\t.align %d\n", (1<<(LOG)))#define ASM_OUTPUT_SKIP(FILE,SIZE) \ fprintf (FILE, "\t.blockz %d\n", (SIZE))/* This says how to output an assembler line to define a global common symbol. *//* Supposedly the assembler rejects the command if there is no tab! */#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \( (TARGET_NO_BSS) ? data_section (): bss_section (), \ assemble_name ((FILE), (NAME)), \ fputs ("\t.comm ", (FILE)), \ fprintf ((FILE), "%d\n", (ROUNDED)))/* This says how to output an assembler line to define a local common symbol. */#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \( (TARGET_NO_BSS) ? data_section (): bss_section (), \ fprintf ((FILE), "\t.align %d\n", (SIZE) <= 4 ? 4 : 8), \ assemble_name ((FILE), (NAME)), \ (TARGET_NO_BSS) ? fprintf ((FILE), "\n\t.blockz %d\n", (ROUNDED)) \ : fprintf ((FILE), "\n\t.block %d\n", (ROUNDED)))/* Store in OUTPUT a string (made with alloca) containing an assembler-name for a local static variable named NAME. LABELNO is an integer which is different for each call. */#define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 12), \ sprintf ((OUTPUT), "%s___%d", (NAME), (LABELNO)))/* Define the parentheses used to group arithmetic operations in assembler code. */#define ASM_OPEN_PAREN "("#define ASM_CLOSE_PAREN ")"/* 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#define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \ ((CHAR) == '@' || (CHAR) == '#' || (CHAR) == '*' || (CHAR) == '^')/* Print operand X (an rtx) in assembler syntax to file FILE. CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified. For `%' followed by punctuation, CODE is the punctuation and X is null. On the HP-PA, the CODE can be `r', meaning this is a register-only operand and an immediate zero should be represented as `r0'. Several % codes are defined: O an operation C compare conditions N extract conditions M modifier to handle preincrement addressing for memory refs. F modifier to handle preincrement addressing for fp memory refs */#define PRINT_OPERAND(FILE, X, CODE) print_operand (FILE, X, CODE)/* Print a memory address as an operand to reference that memory location. */#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \{ register rtx addr = ADDR; \ register rtx base; \ int offset; \ switch (GET_CODE (addr)) \ { \ case REG: \ fprintf (FILE, "0(0,%s)", reg_names [REGNO (addr)]); \ break; \ case PLUS: \ if (GET_CODE (XEXP (addr, 0)) == CONST_INT) \ offset = INTVAL (XEXP (addr, 0)), base = XEXP (addr, 1); \ else if (GET_CODE (XEXP (addr, 1)) == CONST_INT) \ offset = INTVAL (XEXP (addr, 1)), base = XEXP (addr, 0); \ else \ abort (); \ fprintf (FILE, "%d(0,%s)", offset, reg_names [REGNO (base)]); \ break; \ case LO_SUM: \ fputs ("R'", FILE); \ output_global_address (FILE, XEXP (addr, 1)); \ fputs ("(", FILE); \ output_operand (XEXP (addr, 0), 0); \ fputs (")", FILE); \ break; \ case CONST_INT: \ fprintf (FILE, "%d(0,0)", INTVAL (addr)); \ break; \ default: \ output_addr_const (FILE, addr); \ }}#define SMALL_INT(OP) INT_14_BITS (OP)/* Define functions in pa.c and used in insn-output.c. */extern char *output_and ();extern char *output_ior ();extern char *output_move_double ();extern char *output_fp_move_double ();extern char *output_block_move ();extern char *output_scc_insn ();extern char *output_cbranch ();extern char *output_return ();extern char *output_floatsisf2 ();extern char *output_floatsidf2 ();extern char *output_mul_insn ();extern c
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -