--- gcc/config/i386/i386.h 2018/04/24 18:10:27 1.1.1.1 +++ gcc/config/i386/i386.h 2018/04/24 18:16:44 1.1.1.2 @@ -120,9 +120,25 @@ extern int target_flags; /* This is meant to be redefined in the host dependent files */ #define SUBTARGET_SWITCHES +#define OVERRIDE_OPTIONS \ +{ \ + SUBTARGET_OVERRIDE_OPTIONS \ +} + +/* This is meant to be redefined in the host dependent files */ +#define SUBTARGET_OVERRIDE_OPTIONS /* target machine storage layout */ +/* Define for XFmode extended real floating point support. + This will automatically cause REAL_ARITHMETIC to be defined. */ +#define LONG_DOUBLE_TYPE_SIZE 96 + +/* Define if you don't want extended real, but do want to use the + software floating point emulator for REAL_ARITHMETIC and + decimal <-> binary conversion. */ +/* #define REAL_ARITHMETIC */ + /* Define this if most significant byte of a word is the lowest numbered. */ /* That is true on the 80386. */ @@ -281,7 +297,7 @@ extern int target_flags; #define HARD_REGNO_MODE_OK(REGNO, MODE) \ ((REGNO) < 2 ? 1 \ : (REGNO) < 4 ? 1 \ - : FP_REGNO_P ((REGNO)) \ + : FP_REGNO_P (REGNO) \ ? (((int) GET_MODE_CLASS (MODE) == (int) MODE_FLOAT \ || (int) GET_MODE_CLASS (MODE) == (int) MODE_COMPLEX_FLOAT) \ && GET_MODE_UNIT_SIZE (MODE) <= 12) \ @@ -605,7 +621,7 @@ extern enum reg_class regclass_map[FIRST && (TYPE_ARG_TYPES (FUNTYPE) == 0 \ || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE))) \ == void_type_node))) ? (SIZE) \ - : (aggregate_value_p (FUNTYPE)) ? GET_MODE_SIZE (Pmode) : 0) + : (aggregate_value_p (TREE_TYPE (FUNTYPE))) ? GET_MODE_SIZE (Pmode) : 0) /* Define how to find the value returned by a function. VALTYPE is the data type of the value (as a tree). @@ -1101,6 +1117,23 @@ while (0) functions. */ #define INIT_EXPANDERS clear_386_stack_locals () + +/* The `FINALIZE_PIC' macro serves as a hook to emit these special + codes once the function is being compiled into assembly code, but + not before. (It is not done before, because in the case of + compiling an inline function, it would lead to multiple PIC + prologues being included in functions which used inline functions + and were compiled to assembly language.) */ + +#define FINALIZE_PIC \ +do \ + { \ + extern int current_function_uses_pic_offset_table; \ + \ + current_function_uses_pic_offset_table |= profile_flag | profile_block_flag; \ + } \ +while (0) + /* Specify the machine mode that this machine uses for the index in the tablejump instruction. */ @@ -1365,19 +1398,38 @@ number as al, and ax. /* This is how to output an assembler line defining a `double' constant. */ -#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ - fprintf (FILE, "%s %.22e\n", ASM_DOUBLE, (VALUE)) +#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ +do { long l[2]; \ + REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \ + if (sizeof (int) == sizeof (long)) \ + fprintf (FILE, "%s 0x%x,0x%x\n", ASM_LONG, l[0], l[1]); \ + else \ + fprintf (FILE, "%s 0x%lx,0x%lx\n", ASM_LONG, l[0], l[1]); \ + } while (0) + +/* This is how to output a `long double' extended real constant. */ +#undef ASM_OUTPUT_LONG_DOUBLE +#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \ +do { long l[3]; \ + REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l); \ + if (sizeof (int) == sizeof (long)) \ + fprintf (FILE, "%s 0x%x,0x%x,0x%x\n", ASM_LONG, l[0], l[1], l[2]); \ + else \ + fprintf (FILE, "%s 0x%lx,0x%lx,0x%lx\n", ASM_LONG, l[0], l[1], l[2]); \ + } while (0) /* This is how to output an assembler line defining a `float' constant. */ -#define ASM_OUTPUT_FLOAT(FILE,VALUE) \ -do { union { float f; long l;} tem; \ - tem.f = (VALUE); \ - fprintf((FILE), "%s 0x%x\n", ASM_LONG, tem.l); \ +#define ASM_OUTPUT_FLOAT(FILE,VALUE) \ +do { long l; \ + REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ + if (sizeof (int) == sizeof (long)) \ + fprintf ((FILE), "%s 0x%x\n", ASM_LONG, l); \ + else \ + fprintf ((FILE), "%s 0x%lx\n", ASM_LONG, l); \ } while (0) - /* 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. */ @@ -1471,7 +1523,7 @@ do { union { float f; long l;} tem; \ On the 80386, we use several such letters: f -- float insn (print a CONST_DOUBLE as a float rather than in hex). - L,W,B,Q,S -- print the opcode suffix for specified size of operand. + L,W,B,Q,S,T -- print the opcode suffix for specified size of operand. R -- print the prefix for register names. z -- print the opcode suffix for the size of the current operand. * -- print a star (in certain assembler syntax) @@ -1512,6 +1564,7 @@ extern char *qi_high_reg_name[]; } \ case 4: \ case 8: \ + case 12: \ if (! FP_REG_P (X)) fputs ("e", FILE); \ case 2: \ fputs (hi_reg_name[REGNO (X)], FILE); \ @@ -1546,6 +1599,7 @@ extern char *qi_high_reg_name[]; { fputs ("st(0)", FILE); break; } \ switch (GET_MODE_SIZE (GET_MODE (X))) \ { \ + case 12: \ case 8: \ case 4: \ if (! FP_REG_P (X)) fputs ("e", FILE); \