Commit 8fe75e43 by Richard Henderson Committed by Richard Henderson

i386.c (internal_label_prefix): Export.

	* config/i386/i386.c (internal_label_prefix): Export.
	(internal_label_prefix_len, struct ix86_address,
	ix86_decompose_address, maybe_get_pool_constant,
	ix86_fp_compare_code_to_integer, ix86_fp_comparison_codes,
	memory_address_length): Export.
	(any_fp_register_operand, fp_register_operand,
	register_and_not_any_fp_reg_operand, register_and_not_fp_reg_operand,
	x86_64_general_operand, x86_64_szext_general_operand,
	x86_64_nonmemory_operand, x86_64_movabs_operand,
	x86_64_szext_nonmemory_operand, x86_64_immediate_operand,
	x86_64_zext_immediate_operand, const_int_1_31_operand,
	symbolic_operand, pic_symbolic_operand, local_symbolic_operand,
	tls_symbolic_operand, global_dynamic_symbolic_operand,
	local_dynamic_symbolic_operand, initial_exec_symbolic_operand,
	local_exec_symbolic_operand, call_insn_operand, sibcall_insn_operand,
	constant_call_address_operand, const0_operand, const1_operand,
	const248_operand, const_0_to_3_operand, const_0_to_7_operand,
	const_0_to_15_operand, const_0_to_255_operand, incdec_operand,
	shiftdi_operand, reg_no_sp_operand, mmx_reg_operand,
	general_no_elim_operand, nonmemory_no_elim_operand,
	index_register_operand, q_regs_operand, flags_reg_operand,
	non_q_regs_operand, zero_extended_scalar_load_operand,
	vector_move_operand, no_seg_address_operand, sse_comparison_operator,
	ix86_comparison_operator, ix86_carry_flag_operator,
	fcmov_comparison_operator, promotable_binary_operator,
	cmp_fp_expander_operand, ext_register_operand, binary_fp_operator,
	mult_operator, div_operator, arith_or_logical_operator,
	memory_displacement_operand, cmpsi_operand, long_memory_operand,
	aligned_operand): Move to predicates.md as define_predicates.
	(tls_symbolic_operand_1): Remove.
	(x86_64_sign_extended_value): Merge into x86_64_immediate_operand.
	(x86_64_zero_extended_value): Merge into x86_64_zext_immediate_operand.
	(legitimize_address): Merge tls_symbolic_operand contents.
	(ix86_expand_move): Likewise.
	* config/i386/i386-protos.h: Update for exports.
	* config/i386/i386.h (EXTRA_CONSTRAINT): Update for renames.
	(PREDICATE_CODES, SPECIAL_MODE_PREDICATES): Remove.
	* config/i386/i386.md: Include predicates.md.
	* config/i386/predicates.md: New file.

From-SVN: r85930
parent 1a6213c3
2004-08-12 Richard Henderson <rth@redhat.com>
* config/i386/i386.c (internal_label_prefix): Export.
(internal_label_prefix_len, struct ix86_address,
ix86_decompose_address, maybe_get_pool_constant,
ix86_fp_compare_code_to_integer, ix86_fp_comparison_codes,
memory_address_length): Export.
(any_fp_register_operand, fp_register_operand,
register_and_not_any_fp_reg_operand, register_and_not_fp_reg_operand,
x86_64_general_operand, x86_64_szext_general_operand,
x86_64_nonmemory_operand, x86_64_movabs_operand,
x86_64_szext_nonmemory_operand, x86_64_immediate_operand,
x86_64_zext_immediate_operand, const_int_1_31_operand,
symbolic_operand, pic_symbolic_operand, local_symbolic_operand,
tls_symbolic_operand, global_dynamic_symbolic_operand,
local_dynamic_symbolic_operand, initial_exec_symbolic_operand,
local_exec_symbolic_operand, call_insn_operand, sibcall_insn_operand,
constant_call_address_operand, const0_operand, const1_operand,
const248_operand, const_0_to_3_operand, const_0_to_7_operand,
const_0_to_15_operand, const_0_to_255_operand, incdec_operand,
shiftdi_operand, reg_no_sp_operand, mmx_reg_operand,
general_no_elim_operand, nonmemory_no_elim_operand,
index_register_operand, q_regs_operand, flags_reg_operand,
non_q_regs_operand, zero_extended_scalar_load_operand,
vector_move_operand, no_seg_address_operand, sse_comparison_operator,
ix86_comparison_operator, ix86_carry_flag_operator,
fcmov_comparison_operator, promotable_binary_operator,
cmp_fp_expander_operand, ext_register_operand, binary_fp_operator,
mult_operator, div_operator, arith_or_logical_operator,
memory_displacement_operand, cmpsi_operand, long_memory_operand,
aligned_operand): Move to predicates.md as define_predicates.
(tls_symbolic_operand_1): Remove.
(x86_64_sign_extended_value): Merge into x86_64_immediate_operand.
(x86_64_zero_extended_value): Merge into x86_64_zext_immediate_operand.
(legitimize_address): Merge tls_symbolic_operand contents.
(ix86_expand_move): Likewise.
* config/i386/i386-protos.h: Update for exports.
* config/i386/i386.h (EXTRA_CONSTRAINT): Update for renames.
(PREDICATE_CODES, SPECIAL_MODE_PREDICATES): Remove.
* config/i386/i386.md: Include predicates.md.
* config/i386/predicates.md: New file.
2004-08-13 Mark Mitchell <mark@codesourcery.com>
PR c++/16924
......
......@@ -156,8 +156,6 @@ extern int ix86_attr_length_address_default (rtx);
extern enum machine_mode ix86_fp_compare_mode (enum rtx_code);
extern int x86_64_sign_extended_value (rtx);
extern int x86_64_zero_extended_value (rtx);
extern rtx ix86_libcall_value (enum machine_mode);
extern bool ix86_function_value_regno_p (int);
extern bool ix86_function_arg_regno_p (int);
......@@ -227,3 +225,24 @@ extern void i386_pe_encode_section_info (tree, rtx, int);
extern const char *i386_pe_strip_name_encoding (const char *);
extern const char *i386_pe_strip_name_encoding_full (const char *);
extern void i386_pe_output_labelref (FILE *, const char *);
extern rtx maybe_get_pool_constant (rtx);
extern char internal_label_prefix[16];
extern int internal_label_prefix_len;
enum ix86_address_seg { SEG_DEFAULT, SEG_FS, SEG_GS };
struct ix86_address
{
rtx base, index, disp;
HOST_WIDE_INT scale;
enum ix86_address_seg seg;
};
extern int ix86_decompose_address (rtx, struct ix86_address *);
extern int memory_address_length (rtx addr);
#ifdef RTX_CODE
extern void ix86_fp_comparison_codes (enum rtx_code code, enum rtx_code *,
enum rtx_code *, enum rtx_code *);
extern enum rtx_code ix86_fp_compare_code_to_integer (enum rtx_code);
#endif
......@@ -1502,10 +1502,10 @@ enum reg_class
the constraint letter C. If C is not defined as an extra
constraint, the value returned should be 0 regardless of VALUE. */
#define EXTRA_CONSTRAINT(VALUE, D) \
((D) == 'e' ? x86_64_sign_extended_value (VALUE) \
: (D) == 'Z' ? x86_64_zero_extended_value (VALUE) \
: (D) == 'C' ? standard_sse_constant_p (VALUE) \
#define EXTRA_CONSTRAINT(VALUE, D) \
((D) == 'e' ? x86_64_immediate_operand (VALUE, VOIDmode) \
: (D) == 'Z' ? x86_64_zext_immediate_operand (VALUE, VOIDmode) \
: (D) == 'C' ? standard_sse_constant_p (VALUE) \
: 0)
/* Place additional restrictions on the register class to use when it
......@@ -2830,94 +2830,6 @@ do { \
#define RET return ""
#define AT_SP(MODE) (gen_rtx_MEM ((MODE), stack_pointer_rtx))
/* Define the codes that are matched by predicates in i386.c. */
#define PREDICATE_CODES \
{"x86_64_immediate_operand", {CONST_INT, SUBREG, REG, \
SYMBOL_REF, LABEL_REF, CONST}}, \
{"x86_64_nonmemory_operand", {CONST_INT, SUBREG, REG, \
SYMBOL_REF, LABEL_REF, CONST}}, \
{"x86_64_movabs_operand", {CONST_INT, SUBREG, REG, \
SYMBOL_REF, LABEL_REF, CONST}}, \
{"x86_64_szext_nonmemory_operand", {CONST_INT, SUBREG, REG, \
SYMBOL_REF, LABEL_REF, CONST}}, \
{"x86_64_general_operand", {CONST_INT, SUBREG, REG, MEM, \
SYMBOL_REF, LABEL_REF, CONST}}, \
{"x86_64_szext_general_operand", {CONST_INT, SUBREG, REG, MEM, \
SYMBOL_REF, LABEL_REF, CONST}}, \
{"x86_64_zext_immediate_operand", {CONST_INT, CONST_DOUBLE, CONST, \
SYMBOL_REF, LABEL_REF}}, \
{"shiftdi_operand", {SUBREG, REG, MEM}}, \
{"const_int_1_31_operand", {CONST_INT}}, \
{"symbolic_operand", {SYMBOL_REF, LABEL_REF, CONST}}, \
{"aligned_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF, \
LABEL_REF, SUBREG, REG, MEM}}, \
{"pic_symbolic_operand", {CONST}}, \
{"call_insn_operand", {REG, SUBREG, MEM, SYMBOL_REF}}, \
{"sibcall_insn_operand", {REG, SUBREG, SYMBOL_REF}}, \
{"constant_call_address_operand", {SYMBOL_REF, CONST}}, \
{"const0_operand", {CONST_INT, CONST_DOUBLE}}, \
{"const1_operand", {CONST_INT}}, \
{"const248_operand", {CONST_INT}}, \
{"const_0_to_3_operand", {CONST_INT}}, \
{"const_0_to_7_operand", {CONST_INT}}, \
{"const_0_to_15_operand", {CONST_INT}}, \
{"const_0_to_255_operand", {CONST_INT}}, \
{"incdec_operand", {CONST_INT}}, \
{"mmx_reg_operand", {REG}}, \
{"reg_no_sp_operand", {SUBREG, REG}}, \
{"general_no_elim_operand", {CONST_INT, CONST_DOUBLE, CONST, \
SYMBOL_REF, LABEL_REF, SUBREG, REG, MEM}}, \
{"nonmemory_no_elim_operand", {CONST_INT, REG, SUBREG}}, \
{"index_register_operand", {SUBREG, REG}}, \
{"flags_reg_operand", {REG}}, \
{"q_regs_operand", {SUBREG, REG}}, \
{"non_q_regs_operand", {SUBREG, REG}}, \
{"fcmov_comparison_operator", {EQ, NE, LTU, GTU, LEU, GEU, UNORDERED, \
ORDERED, LT, UNLT, GT, UNGT, LE, UNLE, \
GE, UNGE, LTGT, UNEQ}}, \
{"sse_comparison_operator", {EQ, LT, LE, UNORDERED, NE, UNGE, UNGT, \
ORDERED, UNEQ, UNLT, UNLE, LTGT, GE, GT \
}}, \
{"ix86_comparison_operator", {EQ, NE, LE, LT, GE, GT, LEU, LTU, GEU, \
GTU, UNORDERED, ORDERED, UNLE, UNLT, \
UNGE, UNGT, LTGT, UNEQ }}, \
{"ix86_carry_flag_operator", {LTU, LT, UNLT, GT, UNGT, LE, UNLE, \
GE, UNGE, LTGT, UNEQ}}, \
{"cmp_fp_expander_operand", {CONST_DOUBLE, SUBREG, REG, MEM}}, \
{"ext_register_operand", {SUBREG, REG}}, \
{"binary_fp_operator", {PLUS, MINUS, MULT, DIV}}, \
{"mult_operator", {MULT}}, \
{"div_operator", {DIV}}, \
{"arith_or_logical_operator", {PLUS, MULT, AND, IOR, XOR, SMIN, SMAX, \
UMIN, UMAX, COMPARE, MINUS, DIV, MOD, \
UDIV, UMOD, ASHIFT, ROTATE, ASHIFTRT, \
LSHIFTRT, ROTATERT}}, \
{"promotable_binary_operator", {PLUS, MULT, AND, IOR, XOR, ASHIFT}}, \
{"memory_displacement_operand", {MEM}}, \
{"cmpsi_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF, \
LABEL_REF, SUBREG, REG, MEM, AND}}, \
{"long_memory_operand", {MEM}}, \
{"tls_symbolic_operand", {SYMBOL_REF}}, \
{"global_dynamic_symbolic_operand", {SYMBOL_REF}}, \
{"local_dynamic_symbolic_operand", {SYMBOL_REF}}, \
{"initial_exec_symbolic_operand", {SYMBOL_REF}}, \
{"local_exec_symbolic_operand", {SYMBOL_REF}}, \
{"any_fp_register_operand", {REG}}, \
{"register_and_not_any_fp_reg_operand", {REG}}, \
{"fp_register_operand", {REG}}, \
{"register_and_not_fp_reg_operand", {REG}}, \
{"zero_extended_scalar_load_operand", {MEM}}, \
{"vector_move_operand", {CONST_VECTOR, SUBREG, REG, MEM}}, \
{"no_seg_address_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF, \
LABEL_REF, SUBREG, REG, MEM, PLUS, MULT}},
/* A list of predicates that do special things with modes, and so
should not elicit warnings for VOIDmode match_operand. */
#define SPECIAL_MODE_PREDICATES \
"ext_register_operand",
/* 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. */
......
;; GCC machine description for IA-32 and x86-64.
;; Copyright (C) 1988, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
;; 2001, 2002, 2003, 2004
......@@ -426,10 +425,18 @@
[(set_attr "length" "128")
(set_attr "type" "multi")])
;; Scheduling descriptions
(include "pentium.md")
(include "ppro.md")
(include "k6.md")
(include "athlon.md")
;; Operand and operator predicates
(include "predicates.md")
;; Compare instructions.
......
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