the stack top is sometimes referred to as "%st(0)" instead of just "%st". TARGET_PRINT_OPERAND handles this with the "y" code. */ #define HI_REGISTER_NAMES \ {"ax","dx","cx","bx","si","di","bp","sp", \ "st","st(1)","st(2)","st(3)","st(4)","st(5)","st(6)","st(7)", \ "argp", "flags", "fpsr", "frame", \ "xmm0","xmm1","xmm2","xmm3","xmm4","xmm5","xmm6","xmm7", \ "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7", \ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \ "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15", \ "xmm16", "xmm17", "xmm18", "xmm19", \ "xmm20", "xmm21", "xmm22", "xmm23", \ "xmm24", "xmm25", "xmm26", "xmm27", \ "xmm28", "xmm29", "xmm30", "xmm31", \ "k0", "k1", "k2", "k3", "k4", "k5", "k6", "k7", \ "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", \ "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31" } #define REGISTER_NAMES HI_REGISTER_NAMES #define QI_REGISTER_NAMES \ {"al", "dl", "cl", "bl", "sil", "dil", "bpl", "spl"} #define QI_HIGH_REGISTER_NAMES \ {"ah", "dh", "ch", "bh"} /* Table of additional register names to use in user input. */ #define ADDITIONAL_REGISTER_NAMES \ { \ { "eax", AX_REG }, { "edx", DX_REG }, { "ecx", CX_REG }, { "ebx", BX_REG }, \ { "esi", SI_REG }, { "edi", DI_REG }, { "ebp", BP_REG }, { "esp", SP_REG }, \ { "rax", AX_REG }, { "rdx", DX_REG }, { "rcx", CX_REG }, { "rbx", BX_REG }, \ { "rsi", SI_REG }, { "rdi", DI_REG }, { "rbp", BP_REG }, { "rsp", SP_REG }, \ { "al", AX_REG }, { "dl", DX_REG }, { "cl", CX_REG }, { "bl", BX_REG }, \ { "sil", SI_REG }, { "dil", DI_REG }, { "bpl", BP_REG }, { "spl", SP_REG }, \ { "ah", AX_REG }, { "dh", DX_REG }, { "ch", CX_REG }, { "bh", BX_REG }, \ { "ymm0", XMM0_REG }, { "ymm1", XMM1_REG }, { "ymm2", XMM2_REG }, { "ymm3", XMM3_REG }, \ { "ymm4", XMM4_REG }, { "ymm5", XMM5_REG }, { "ymm6", XMM6_REG }, { "ymm7", XMM7_REG }, \ { "ymm8", XMM8_REG }, { "ymm9", XMM9_REG }, { "ymm10", XMM10_REG }, { "ymm11", XMM11_REG }, \ { "ymm12", XMM12_REG }, { "ymm13", XMM13_REG }, { "ymm14", XMM14_REG }, { "ymm15", XMM15_REG }, \ { "ymm16", XMM16_REG }, { "ymm17", XMM17_REG }, { "ymm18", XMM18_REG }, { "ymm19", XMM19_REG }, \ { "ymm20", XMM20_REG }, { "ymm21", XMM21_REG }, { "ymm22", XMM22_REG }, { "ymm23", XMM23_REG }, \ { "ymm24", XMM24_REG }, { "ymm25", XMM25_REG }, { "ymm26", XMM26_REG }, { "ymm27", XMM27_REG }, \ { "ymm28", XMM28_REG }, { "ymm29", XMM29_REG }, { "ymm30", XMM30_REG }, { "ymm31", XMM31_REG }, \ { "zmm0", XMM0_REG }, { "zmm1", XMM1_REG }, { "zmm2", XMM2_REG }, { "zmm3", XMM3_REG }, \ { "zmm4", XMM4_REG }, { "zmm5", XMM5_REG }, { "zmm6", XMM6_REG }, { "zmm7", XMM7_REG }, \ { "zmm8", XMM8_REG }, { "zmm9", XMM9_REG }, { "zmm10", XMM10_REG }, { "zmm11", XMM11_REG }, \ { "zmm12", XMM12_REG }, { "zmm13", XMM13_REG }, { "zmm14", XMM14_REG }, { "zmm15", XMM15_REG }, \ { "zmm16", XMM16_REG }, { "zmm17", XMM17_REG }, { "zmm18", XMM18_REG }, { "zmm19", XMM19_REG }, \ { "zmm20", XMM20_REG }, { "zmm21", XMM21_REG }, { "zmm22", XMM22_REG }, { "zmm23", XMM23_REG }, \ { "zmm24", XMM24_REG }, { "zmm25", XMM25_REG }, { "zmm26", XMM26_REG }, { "zmm27", XMM27_REG }, \ { "zmm28", XMM28_REG }, { "zmm29", XMM29_REG }, { "zmm30", XMM30_REG }, { "zmm31", XMM31_REG } \ } /* How to renumber registers for gdb. */ #define DEBUGGER_REGNO(N) \ (TARGET_64BIT ? debugger64_register_map[(N)] : debugger_register_map[(N)]) extern unsigned int const debugger_register_map[FIRST_PSEUDO_REGISTER]; extern unsigned int const debugger64_register_map[FIRST_PSEUDO_REGISTER]; extern unsigned int const svr4_debugger_register_map[FIRST_PSEUDO_REGISTER]; /* Before the prologue, RA is at 0(%esp). */ #define INCOMING_RETURN_ADDR_RTX \ gen_rtx_MEM (Pmode, stack_pointer_rtx) /* After the prologue, RA is at -4(AP) in the current frame. */ #define RETURN_ADDR_RTX(COUNT, FRAME) \ ((COUNT) == 0 \ ? gen_rtx_MEM (Pmode, plus_constant (Pmode, arg_pointer_rtx, \ -UNITS_PER_WORD)) \ : gen_rtx_MEM (Pmode, plus_constant (Pmode, (FRAME), UNITS_PER_WORD))) /* PC is dbx register 8; let's use that column for RA. */ #define DWARF_FRAME_RETURN_COLUMN (TARGET_64BIT ? 16 : 8) /* Before the prologue, there are return address and error code for exception handler on the top of the frame. */ #define INCOMING_FRAME_SP_OFFSET \ (cfun->machine->func_type == TYPE_EXCEPTION \ ? 2 * UNITS_PER_WORD : UNITS_PER_WORD) /* The value of INCOMING_FRAME_SP_OFFSET the assembler assumes in .cfi_startproc. */ #define DEFAULT_INCOMING_FRAME_SP_OFFSET UNITS_PER_WORD /* Describe how we implement __builtin_eh_return. */ #define EH_RETURN_DATA_REGNO(N) ((N) <= DX_REG ? (N) : INVALID_REGNUM) #define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, CX_REG) /* Select a format to encode pointers in exception handling data. CODE is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is true if the symbol may be affected by dynamic relocations. ??? All x86 object file formats are capable of representing this. After all, the relocation needed is the same as for the call insn. Whether or not a particular assembler allows us to enter such, I guess we'll have to see. */ #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \ asm_preferred_eh_data_format ((CODE), (GLOBAL)) /* These are a couple of extensions to the formats accepted by asm_fprintf: %z prints out opcode suffix for word-mode instruction %r prints out word-mode name for reg_names[arg] */ #define ASM_FPRINTF_EXTENSIONS(FILE, ARGS, P) \ case 'z': \ fputc (TARGET_64BIT ? 'q' : 'l', (FILE)); \ break; \ \ case 'r': \ { \ unsigned int regno = va_arg ((ARGS), int); \ if (LEGACY_INT_REGNO_P (regno)) \ fputc (TARGET_64BIT ? 'r' : 'e', (FILE)); \ fputs (reg_names[regno], (FILE)); \ break; \ } /* This is how to output an insn to push a register on the stack. */ #define ASM_OUTPUT_REG_PUSH(FILE, REGNO) \ asm_fprintf ((FILE), "\tpush%z\t%%%r\n", (REGNO)) /* This is how to output an insn to pop a register from the stack. */ #define ASM_OUTPUT_REG_POP(FILE, REGNO) \ asm_fprintf ((FILE), "\tpop%z\t%%%r\n", (REGNO)) /* This is how to output an element of a case-vector that is absolute. */ #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ ix86_output_addr_vec_elt ((FILE), (VALUE)) /* This is how to output an element of a case-vector that is relative. */ #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ ix86_output_addr_diff_elt ((FILE), (VALUE), (REL)) /* When we see %v, we will print the 'v' prefix if TARGET_AVX is true. */ #define ASM_OUTPUT_AVX_PREFIX(STREAM, PTR) \ { \ if ((PTR)[0] == '%' && (PTR)[1] == 'v') \ (PTR) += TARGET_AVX ? 1 : 2; \ } /* A C statement or statements which output an assembler instruction opcode to the stdio stream STREAM. The macro-operand PTR is a variable of type `char *' which points to the opcode name in its "internal" form--the form that is written in the machine description. */ #define ASM_OUTPUT_OPCODE(STREAM, PTR) \ ASM_OUTPUT_AVX_PREFIX ((STREAM), (PTR)) /* A C statement to output to the stdio stream FILE an assembler command to pad the location counter to a multiple of 1<= (1 << (LOG)) - 1) \ fprintf ((FILE), "\t.p2align %d\n", (LOG)); \ else \ fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \ } \ } while (0) #endif /* Write the extra assembler code needed to declare a function properly. */ #undef ASM_OUTPUT_FUNCTION_LABEL #define ASM_OUTPUT_FUNCTION_LABEL(FILE, NAME, DECL) \ ix86_asm_output_function_label ((FILE), (NAME), (DECL)) /* A C statement (sans semicolon) to output a reference to SYMBOL_REF SYM. If not defined, assemble_name will be used to output the name of the symbol. This macro may be used to modify the way a symbol is referenced depending on information encoded by TARGET_ENCODE_SECTION_INFO. */ #ifndef ASM_OUTPUT_SYMBOL_REF #define ASM_OUTPUT_SYMBOL_REF(FILE, SYM) \ do { \ const char *name \ = assemble_name_resolve (XSTR (SYM, 0)); \ /* In -masm=att wrap identifiers that start with $ \ into parens. */ \ if (ASSEMBLER_DIALECT == ASM_ATT \ && name[0] == '$' \ && user_label_prefix[0] == '\0') \ { \ fputc ('(', (FILE)); \ assemble_name_raw ((FILE), name); \ fputc (')', (FILE)); \ } \ else \ assemble_name_raw ((FILE), name); \ } while (0) #endif /* Under some conditions we need jump tables in the text section, because the assembler cannot handle label differences between sections. */ #define JUMP_TABLES_IN_TEXT_SECTION \ (flag_pic && !(TARGET_64BIT || HAVE_AS_GOTOFF_IN_DATA)) /* Switch to init or fini section via SECTION_OP, emit a call to FUNC, and switch back. For x86 we do this only to save a few bytes that would otherwise be unused in the text section. */ #define CRT_MKSTR2(VAL) #VAL #define CRT_MKSTR(x) CRT_MKSTR2(x) #define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \ asm (SECTION_OP "\n\t" \ "call " CRT_MKSTR(__USER_LABEL_PREFIX__) #FUNC "\n" \ TEXT_SECTION_ASM_OP); /* Default threshold for putting data in large sections with x86-64 medium memory model */ #define DEFAULT_LARGE_SECTION_THRESHOLD 65536