Commit 5bf0ebab by Richard Henderson Committed by Richard Henderson

i386.c, i386.h: Tidy comments and whitespace.

        * config/i386/i386.c, config/i386/i386.h: Tidy comments and whitespace.
        (ix86_arch): Set type to enum processor_type.

From-SVN: r53779
parent 57d47446
2002-05-23 Richard Henderson <rth@redhat.com>
* config/i386/i386.c, config/i386/i386.h: Tidy comments and whitespace.
(ix86_arch): Set type to enum processor_type.
* config/i386/i386.md (movsi_1, movdi_1_rex64): Use
LEGITIMATE_PIC_OPERAND_P not SYMBOLIC_CONST.
2002-05-23 Jakub Jelinek <jakub@redhat.com> 2002-05-23 Jakub Jelinek <jakub@redhat.com>
* configure.in: Fix as version test for binutils 2.12.1 releases * configure.in: Fix as version test for binutils 2.12.1 releases
......
...@@ -399,15 +399,17 @@ const int x86_arch_always_fancy_math_387 = m_PENT|m_PPRO|m_ATHLON|m_PENT4; ...@@ -399,15 +399,17 @@ const int x86_arch_always_fancy_math_387 = m_PENT|m_PPRO|m_ATHLON|m_PENT4;
lower than this constant, emit fast (but longer) prologue and lower than this constant, emit fast (but longer) prologue and
epilogue code. */ epilogue code. */
#define FAST_PROLOGUE_INSN_COUNT 30 #define FAST_PROLOGUE_INSN_COUNT 30
/* Set by prologue expander and used by epilogue expander to determine /* Set by prologue expander and used by epilogue expander to determine
the style used. */ the style used. */
static int use_fast_prologue_epilogue; static int use_fast_prologue_epilogue;
#define AT_BP(MODE) (gen_rtx_MEM ((MODE), hard_frame_pointer_rtx)) #define AT_BP(MODE) (gen_rtx_MEM ((MODE), hard_frame_pointer_rtx))
static const char *const hi_reg_name[] = HI_REGISTER_NAMES; /* names for 16 bit regs */ /* Names for 8 (low), 8 (high), and 16-bit registers, respectively. */
static const char *const qi_reg_name[] = QI_REGISTER_NAMES; /* names for 8 bit regs (low) */ static const char *const qi_reg_name[] = QI_REGISTER_NAMES;
static const char *const qi_high_reg_name[] = QI_HIGH_REGISTER_NAMES; /* names for 8 bit regs (high) */ static const char *const qi_high_reg_name[] = QI_HIGH_REGISTER_NAMES;
static const char *const hi_reg_name[] = HI_REGISTER_NAMES;
/* Array of the smallest class containing reg number REGNO, indexed by /* Array of the smallest class containing reg number REGNO, indexed by
REGNO. Used by REGNO_REG_CLASS in i386.h. */ REGNO. Used by REGNO_REG_CLASS in i386.h. */
...@@ -448,11 +450,16 @@ int const dbx_register_map[FIRST_PSEUDO_REGISTER] = ...@@ -448,11 +450,16 @@ int const dbx_register_map[FIRST_PSEUDO_REGISTER] =
-1, -1, -1, -1, -1, -1, -1, -1, /* extended SSE registers */ -1, -1, -1, -1, -1, -1, -1, -1, /* extended SSE registers */
}; };
static int const x86_64_int_parameter_registers[6] = {5 /*RDI*/, 4 /*RSI*/, static int const x86_64_int_parameter_registers[6] =
1 /*RDX*/, 2 /*RCX*/, {
FIRST_REX_INT_REG /*R8 */, 5 /*RDI*/, 4 /*RSI*/, 1 /*RDX*/, 2 /*RCX*/,
FIRST_REX_INT_REG + 1 /*R9 */}; FIRST_REX_INT_REG /*R8 */, FIRST_REX_INT_REG + 1 /*R9 */
static int const x86_64_int_return_registers[4] = {0 /*RAX*/, 1 /*RDI*/, 5, 4}; };
static int const x86_64_int_return_registers[4] =
{
0 /*RAX*/, 1 /*RDI*/, 5 /*RDI*/, 4 /*RSI*/
};
/* The "default" register map used in 64bit mode. */ /* The "default" register map used in 64bit mode. */
int const dbx64_register_map[FIRST_PSEUDO_REGISTER] = int const dbx64_register_map[FIRST_PSEUDO_REGISTER] =
...@@ -598,14 +605,13 @@ enum cmodel ix86_cmodel; ...@@ -598,14 +605,13 @@ enum cmodel ix86_cmodel;
const char *ix86_asm_string; const char *ix86_asm_string;
enum asm_dialect ix86_asm_dialect = ASM_ATT; enum asm_dialect ix86_asm_dialect = ASM_ATT;
/* which cpu are we scheduling for */ /* Which unit we are generating floating point math for. */
enum processor_type ix86_cpu;
/* which unit we are generating floating point math for */
enum fpmath_unit ix86_fpmath; enum fpmath_unit ix86_fpmath;
/* which instruction set architecture to use. */ /* Which cpu are we scheduling for. */
int ix86_arch; enum processor_type ix86_cpu;
/* Which instruction set architecture to use. */
enum processor_type ix86_arch;
/* Strings to hold which cpu and instruction set architecture to use. */ /* Strings to hold which cpu and instruction set architecture to use. */
const char *ix86_cpu_string; /* for -mcpu=<xxx> */ const char *ix86_cpu_string; /* for -mcpu=<xxx> */
...@@ -4941,7 +4947,7 @@ legitimate_address_p (mode, addr, strict) ...@@ -4941,7 +4947,7 @@ legitimate_address_p (mode, addr, strict)
fprintf (stderr, "Success.\n"); fprintf (stderr, "Success.\n");
return TRUE; return TRUE;
report_error: report_error:
if (TARGET_DEBUG_ADDR) if (TARGET_DEBUG_ADDR)
{ {
fprintf (stderr, "Error: %s\n", reason); fprintf (stderr, "Error: %s\n", reason);
...@@ -4955,10 +4961,10 @@ report_error: ...@@ -4955,10 +4961,10 @@ report_error:
static HOST_WIDE_INT static HOST_WIDE_INT
ix86_GOT_alias_set () ix86_GOT_alias_set ()
{ {
static HOST_WIDE_INT set = -1; static HOST_WIDE_INT set = -1;
if (set == -1) if (set == -1)
set = new_alias_set (); set = new_alias_set ();
return set; return set;
} }
/* Return a legitimate reference for ORIG (an address) using the /* Return a legitimate reference for ORIG (an address) using the
...@@ -5409,7 +5415,7 @@ output_pic_addr_const (file, x, code) ...@@ -5409,7 +5415,7 @@ output_pic_addr_const (file, x, code)
case UNSPEC: case UNSPEC:
if (XVECLEN (x, 0) != 1) if (XVECLEN (x, 0) != 1)
abort (); abort ();
output_pic_addr_const (file, XVECEXP (x, 0, 0), code); output_pic_addr_const (file, XVECEXP (x, 0, 0), code);
switch (XINT (x, 1)) switch (XINT (x, 1))
{ {
...@@ -5637,7 +5643,7 @@ print_reg (x, code, file) ...@@ -5637,7 +5643,7 @@ print_reg (x, code, file)
|| REGNO (x) == FPSR_REG) || REGNO (x) == FPSR_REG)
abort (); abort ();
if (ASSEMBLER_DIALECT == ASM_ATT || USER_LABEL_PREFIX[0] == 0) if (ASSEMBLER_DIALECT == ASM_ATT || USER_LABEL_PREFIX[0] == 0)
putc ('%', file); putc ('%', file);
if (code == 'w' || MMX_REG_P (x)) if (code == 'w' || MMX_REG_P (x))
...@@ -6041,7 +6047,7 @@ print_operand (file, x, code) ...@@ -6041,7 +6047,7 @@ print_operand (file, x, code)
if (flag_pic && CONSTANT_ADDRESS_P (x)) if (flag_pic && CONSTANT_ADDRESS_P (x))
output_pic_addr_const (file, x, code); output_pic_addr_const (file, x, code);
/* Avoid (%rip) for call operands. */ /* Avoid (%rip) for call operands. */
else if (CONSTANT_ADDRESS_P (x) && code =='P' else if (CONSTANT_ADDRESS_P (x) && code == 'P'
&& GET_CODE (x) != CONST_INT) && GET_CODE (x) != CONST_INT)
output_addr_const (file, x); output_addr_const (file, x);
else if (this_is_asm_operands && ! address_operand (x, VOIDmode)) else if (this_is_asm_operands && ! address_operand (x, VOIDmode))
...@@ -10048,8 +10054,8 @@ memory_address_length (addr) ...@@ -10048,8 +10054,8 @@ memory_address_length (addr)
return len; return len;
} }
/* Compute default value for "length_immediate" attribute. When SHORTFORM is set /* Compute default value for "length_immediate" attribute. When SHORTFORM
expect that insn have 8bit immediate alternative. */ is set, expect that insn have 8bit immediate alternative. */
int int
ix86_attr_length_immediate_default (insn, shortform) ix86_attr_length_immediate_default (insn, shortform)
rtx insn; rtx insn;
......
...@@ -389,31 +389,6 @@ extern int x86_prefetch_sse; ...@@ -389,31 +389,6 @@ extern int x86_prefetch_sse;
#define TARGET_DEFAULT TARGET_SUBTARGET_DEFAULT #define TARGET_DEFAULT TARGET_SUBTARGET_DEFAULT
#endif #endif
/* Which processor to schedule for. The cpu attribute defines a list that
mirrors this list, so changes to i386.md must be made at the same time. */
enum processor_type
{
PROCESSOR_I386, /* 80386 */
PROCESSOR_I486, /* 80486DX, 80486SX, 80486DX[24] */
PROCESSOR_PENTIUM,
PROCESSOR_PENTIUMPRO,
PROCESSOR_K6,
PROCESSOR_ATHLON,
PROCESSOR_PENTIUM4,
PROCESSOR_max
};
enum fpmath_unit
{
FPMATH_387 = 1,
FPMATH_SSE = 2
};
extern enum processor_type ix86_cpu;
extern enum fpmath_unit ix86_fpmath;
extern int ix86_arch;
/* This macro is similar to `TARGET_SWITCHES' but defines names of /* This macro is similar to `TARGET_SWITCHES' but defines names of
command options that have values. Its definition is an command options that have values. Its definition is an
initializer with a subgrouping for each command option. initializer with a subgrouping for each command option.
...@@ -3228,57 +3203,81 @@ extern int const svr4_dbx_register_map[FIRST_PSEUDO_REGISTER]; ...@@ -3228,57 +3203,81 @@ extern int const svr4_dbx_register_map[FIRST_PSEUDO_REGISTER];
#define SPECIAL_MODE_PREDICATES \ #define SPECIAL_MODE_PREDICATES \
"ext_register_operand", "ext_register_operand",
/* CM_32 is used by 32bit ABI /* Which processor to schedule for. The cpu attribute defines a list that
CM_SMALL is small model assuming that all code and data fits in the first mirrors this list, so changes to i386.md must be made at the same time. */
31bits of address space.
CM_KERNEL is model assuming that all code and data fits in the negative enum processor_type
31bits of address space. {
CM_MEDIUM is model assuming that code fits in the first 31bits of address PROCESSOR_I386, /* 80386 */
space. Size of data is unlimited. PROCESSOR_I486, /* 80486DX, 80486SX, 80486DX[24] */
CM_LARGE is model making no assumptions about size of particular sections. PROCESSOR_PENTIUM,
PROCESSOR_PENTIUMPRO,
CM_SMALL_PIC is model for PIC libraries assuming that code+data+got/plt PROCESSOR_K6,
tables first in 31bits of address space. PROCESSOR_ATHLON,
*/ PROCESSOR_PENTIUM4,
PROCESSOR_max
};
extern enum processor_type ix86_cpu;
extern const char *ix86_cpu_string;
extern enum processor_type ix86_arch;
extern const char *ix86_arch_string;
enum fpmath_unit
{
FPMATH_387 = 1,
FPMATH_SSE = 2
};
extern enum fpmath_unit ix86_fpmath;
extern const char *ix86_fpmath_string;
enum cmodel { enum cmodel {
CM_32, CM_32, /* The traditional 32-bit ABI. */
CM_SMALL, CM_SMALL, /* Assumes all code and data fits in the low 31 bits. */
CM_KERNEL, CM_KERNEL, /* Assumes all code and data fits in the high 31 bits. */
CM_MEDIUM, CM_MEDIUM, /* Assumes code fits in the low 31 bits; data unlimited. */
CM_LARGE, CM_LARGE, /* No assumptions. */
CM_SMALL_PIC CM_SMALL_PIC /* Assumes code+data+got/plt fits in a 31 bit region. */
}; };
extern enum cmodel ix86_cmodel;
extern const char *ix86_cmodel_string;
/* Size of the RED_ZONE area. */ /* Size of the RED_ZONE area. */
#define RED_ZONE_SIZE 128 #define RED_ZONE_SIZE 128
/* Reserved area of the red zone for temporaries. */ /* Reserved area of the red zone for temporaries. */
#define RED_ZONE_RESERVE 8 #define RED_ZONE_RESERVE 8
extern const char *ix86_debug_arg_string, *ix86_debug_addr_string;
enum asm_dialect { enum asm_dialect {
ASM_ATT, ASM_ATT,
ASM_INTEL ASM_INTEL
}; };
extern const char *ix86_asm_string; extern const char *ix86_asm_string;
extern enum asm_dialect ix86_asm_dialect; extern enum asm_dialect ix86_asm_dialect;
/* Value of -mcmodel specified by user. */
extern const char *ix86_cmodel_string; extern int ix86_regparm;
extern enum cmodel ix86_cmodel; extern const char *ix86_regparm_string;
/* Variables in i386.c */ extern int ix86_preferred_stack_boundary;
extern const char *ix86_cpu_string; /* for -mcpu=<xxx> */ extern const char *ix86_preferred_stack_boundary_string;
extern const char *ix86_arch_string; /* for -march=<xxx> */
extern const char *ix86_fpmath_string; /* for -mfpmath=<xxx> */ extern int ix86_branch_cost;
extern const char *ix86_regparm_string; /* # registers to use to pass args */ extern const char *ix86_branch_cost_string;
extern const char *ix86_align_loops_string; /* power of two alignment for loops */
extern const char *ix86_align_jumps_string; /* power of two alignment for non-loop jumps */ extern const char *ix86_debug_arg_string;
extern const char *ix86_align_funcs_string; /* power of two alignment for functions */ extern const char *ix86_debug_addr_string;
extern const char *ix86_preferred_stack_boundary_string;/* power of two alignment for stack boundary */
extern const char *ix86_branch_cost_string; /* values 1-5: see jump.c */ /* Obsoleted by -f options. Remove before 3.2 ships. */
extern int ix86_regparm; /* ix86_regparm_string as a number */ extern const char *ix86_align_loops_string;
extern int ix86_preferred_stack_boundary; /* preferred stack boundary alignment in bits */ extern const char *ix86_align_jumps_string;
extern int ix86_branch_cost; /* values 1-5: see jump.c */ extern const char *ix86_align_funcs_string;
extern enum reg_class const regclass_map[FIRST_PSEUDO_REGISTER]; /* smalled class containing REGNO */
/* Smallest class containing REGNO. */
extern enum reg_class const regclass_map[FIRST_PSEUDO_REGISTER];
extern rtx ix86_compare_op0; /* operand 0 for comparisons */ extern rtx ix86_compare_op0; /* operand 0 for comparisons */
extern rtx ix86_compare_op1; /* operand 1 for comparisons */ extern rtx ix86_compare_op1; /* operand 1 for comparisons */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment