Commit 201312c2 by Richard Henderson Committed by Richard Henderson

Makefile.in (insn-preds.o): Depend on TREE_H.

        * Makefile.in (insn-preds.o): Depend on TREE_H.
        * genpreds.c (write_insn_preds_c): Include tree.h.
        * config/alpha/alpha.c (reg_or_0_operand, reg_or_6bit_operand,
        reg_or_8bit_operand, cint8_operand, add_operand, sext_add_operand,
        const48_operand, and_operand, or_operand, mode_width_operand,
        mode_mask_operand, mul8_operand, const0_operand,
        hard_fp_register_operand, hard_int_register_operand,
        reg_or_cint_operand, some_operand, some_ni_operand, input_operand,
        samegp_function_operand, direct_call_operand, small_symbolic_operand,
        global_symbolic_operand, call_operand, symbolic_operand,
        dtp16_symbolic_operand, dtp32_symbolic_operand,
        gotdtp_symbolic_operand, tp16_symbolic_operand, tp32_symbolic_operand,
        gottp_symbolic_operand, alpha_comparison_operator,
        alpha_zero_comparison_operator, alpha_swapped_comparison_operator,
        signed_comparison_operator, alpha_fp_comparison_operator,
        divmod_operator, fix_operator, aligned_memory_operand,
        unaligned_memory_operand, reg_or_unaligned_mem_operand,
        any_memory_operand, reg_not_elim_operand, normal_memory_operand,
        reg_no_subreg_operand, addition_operation): Move to predicates.md.
        (reg_or_const_int_operand): Remove.  Replace all users with
        reg_or_cint_operand.
        (tls_symbolic_operand_1): Export.  Don't check mode or for CONST.
        (resolve_reload_operand): Split out of aligned_memory_operand.
        * config/alpha/alpha-protos.h: Update for exports.
        * config/alpha/alpha.h (PREDICATE_CODES): Remove.
        * config/alpha/alpha.md: Include predicates.md.
        * config/alpha/predicates.md: New file.

From-SVN: r85953
parent 73389fa4
2004-08-13 Richard Henderson <rth@redhat.com>
* Makefile.in (insn-preds.o): Depend on TREE_H.
* genpreds.c (write_insn_preds_c): Include tree.h.
* config/alpha/alpha.c (reg_or_0_operand, reg_or_6bit_operand,
reg_or_8bit_operand, cint8_operand, add_operand, sext_add_operand,
const48_operand, and_operand, or_operand, mode_width_operand,
mode_mask_operand, mul8_operand, const0_operand,
hard_fp_register_operand, hard_int_register_operand,
reg_or_cint_operand, some_operand, some_ni_operand, input_operand,
samegp_function_operand, direct_call_operand, small_symbolic_operand,
global_symbolic_operand, call_operand, symbolic_operand,
dtp16_symbolic_operand, dtp32_symbolic_operand,
gotdtp_symbolic_operand, tp16_symbolic_operand, tp32_symbolic_operand,
gottp_symbolic_operand, alpha_comparison_operator,
alpha_zero_comparison_operator, alpha_swapped_comparison_operator,
signed_comparison_operator, alpha_fp_comparison_operator,
divmod_operator, fix_operator, aligned_memory_operand,
unaligned_memory_operand, reg_or_unaligned_mem_operand,
any_memory_operand, reg_not_elim_operand, normal_memory_operand,
reg_no_subreg_operand, addition_operation): Move to predicates.md.
(reg_or_const_int_operand): Remove. Replace all users with
reg_or_cint_operand.
(tls_symbolic_operand_1): Export. Don't check mode or for CONST.
(resolve_reload_operand): Split out of aligned_memory_operand.
* config/alpha/alpha-protos.h: Update for exports.
* config/alpha/alpha.h (PREDICATE_CODES): Remove.
* config/alpha/alpha.md: Include predicates.md.
* config/alpha/predicates.md: New file.
2004-08-13 Richard Sandiford <rsandifo@redhat.com>
* genattrtab.c (insn_ent): Replace insn_code, insn_index and lineno
......
......@@ -2350,8 +2350,8 @@ s-preds: $(md_file) genpreds$(build_exeext)
$(STAMP) s-preds
insn-preds.o : insn-preds.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) insn-config.h $(RECOG_H) real.h output.h $(FLAGS_H) function.h \
hard-reg-set.h $(RESOURCE_H) $(TM_P_H) toplev.h reload.h
$(RTL_H) $(TREE_H) insn-config.h $(RECOG_H) real.h output.h $(FLAGS_H) \
function.h hard-reg-set.h $(RESOURCE_H) $(TM_P_H) toplev.h reload.h
GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h \
$(CPP_ID_DATA_H) $(host_xm_file_list) \
......
......@@ -121,3 +121,7 @@ extern char * unicosmk_data_section (void);
extern void unicosmk_output_common (FILE *, const char *, int, int);
extern int unicosmk_initial_elimination_offset (int, int);
#endif
extern int some_small_symbolic_operand (rtx, enum machine_mode);
extern int tls_symbolic_operand_1 (rtx, int, int);
extern rtx resolve_reload_operand (rtx);
......@@ -1615,63 +1615,6 @@ do { \
#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \
print_operand_address((FILE), (ADDR))
/* Define the codes that are matched by predicates in alpha.c. */
#define PREDICATE_CODES \
{"reg_or_0_operand", {SUBREG, REG, CONST_INT, CONST_DOUBLE, \
CONST_VECTOR}}, \
{"reg_or_6bit_operand", {SUBREG, REG, CONST_INT}}, \
{"reg_or_8bit_operand", {SUBREG, REG, CONST_INT}}, \
{"reg_or_const_int_operand", {SUBREG, REG, CONST_INT}}, \
{"cint8_operand", {CONST_INT}}, \
{"reg_or_cint_operand", {SUBREG, REG, CONST_INT}}, \
{"add_operand", {SUBREG, REG, CONST_INT}}, \
{"sext_add_operand", {SUBREG, REG, CONST_INT}}, \
{"const48_operand", {CONST_INT}}, \
{"and_operand", {SUBREG, REG, CONST_INT}}, \
{"or_operand", {SUBREG, REG, CONST_INT}}, \
{"mode_mask_operand", {CONST_INT}}, \
{"mul8_operand", {CONST_INT}}, \
{"mode_width_operand", {CONST_INT}}, \
{"alpha_comparison_operator", {EQ, LE, LT, LEU, LTU}}, \
{"alpha_zero_comparison_operator", {EQ, NE, LE, LT, LEU, LTU}}, \
{"alpha_swapped_comparison_operator", {EQ, GE, GT, GEU, GTU}}, \
{"signed_comparison_operator", {EQ, NE, LE, LT, GE, GT}}, \
{"alpha_fp_comparison_operator", {EQ, LE, LT, UNORDERED}}, \
{"divmod_operator", {DIV, MOD, UDIV, UMOD}}, \
{"fix_operator", {FIX, UNSIGNED_FIX}}, \
{"const0_operand", {CONST_INT, CONST_DOUBLE, CONST_VECTOR}}, \
{"samegp_function_operand", {SYMBOL_REF}}, \
{"direct_call_operand", {SYMBOL_REF}}, \
{"local_symbolic_operand", {SYMBOL_REF, CONST, LABEL_REF}}, \
{"small_symbolic_operand", {SYMBOL_REF, CONST}}, \
{"global_symbolic_operand", {SYMBOL_REF, CONST}}, \
{"dtp16_symbolic_operand", {CONST}}, \
{"dtp32_symbolic_operand", {CONST}}, \
{"gotdtp_symbolic_operand", {CONST}}, \
{"tp16_symbolic_operand", {CONST}}, \
{"tp32_symbolic_operand", {CONST}}, \
{"gottp_symbolic_operand", {CONST}}, \
{"call_operand", {REG, SYMBOL_REF}}, \
{"input_operand", {SUBREG, REG, MEM, CONST_INT, CONST_DOUBLE, \
CONST_VECTOR, SYMBOL_REF, CONST, LABEL_REF, HIGH}},\
{"some_operand", {SUBREG, REG, MEM, CONST_INT, CONST_DOUBLE, \
CONST_VECTOR, SYMBOL_REF, CONST, LABEL_REF, HIGH}}, \
{"some_ni_operand", {SUBREG, REG, MEM}}, \
{"aligned_memory_operand", {MEM}}, \
{"unaligned_memory_operand", {MEM}}, \
{"reg_or_unaligned_mem_operand", {SUBREG, REG, MEM}}, \
{"any_memory_operand", {MEM}}, \
{"normal_memory_operand", {MEM}}, \
{"hard_fp_register_operand", {SUBREG, REG}}, \
{"hard_int_register_operand", {SUBREG, REG}}, \
{"reg_not_elim_operand", {SUBREG, REG}}, \
{"reg_no_subreg_operand", {REG}}, \
{"addition_operation", {PLUS}}, \
{"symbolic_operand", {SYMBOL_REF, LABEL_REF, CONST}}, \
{"some_small_symbolic_operand", {SET, PARALLEL, PREFETCH, UNSPEC, \
UNSPEC_VOLATILE}},
/* Implement `va_start' for varargs and stdarg. */
#define EXPAND_BUILTIN_VA_START(valist, nextarg) \
alpha_va_start (valist, nextarg)
......
......@@ -169,6 +169,12 @@
(include "ev5.md")
(include "ev6.md")
;; Include predicate definitions
(include "predicates.md")
;; First define the arithmetic insns. Note that the 32-bit forms also
;; sign-extend.
......@@ -7378,9 +7384,9 @@
(define_expand "builtin_zap"
[(set (match_operand:DI 0 "register_operand" "")
(and:DI (unspec:DI
[(match_operand:DI 2 "reg_or_const_int_operand" "")]
[(match_operand:DI 2 "reg_or_cint_operand" "")]
UNSPEC_ZAP)
(match_operand:DI 1 "reg_or_const_int_operand" "")))]
(match_operand:DI 1 "reg_or_cint_operand" "")))]
""
{
if (GET_CODE (operands[2]) == CONST_INT)
......@@ -7410,9 +7416,9 @@
(define_insn "*builtin_zap_1"
[(set (match_operand:DI 0 "register_operand" "=r,r,r,r")
(and:DI (unspec:DI
[(match_operand:QI 2 "reg_or_const_int_operand" "n,n,r,r")]
[(match_operand:QI 2 "reg_or_cint_operand" "n,n,r,r")]
UNSPEC_ZAP)
(match_operand:DI 1 "reg_or_const_int_operand" "n,r,J,r")))]
(match_operand:DI 1 "reg_or_cint_operand" "n,r,J,r")))]
""
"@
#
......@@ -7471,9 +7477,9 @@
(define_expand "builtin_zapnot"
[(set (match_operand:DI 0 "register_operand" "")
(and:DI (unspec:DI
[(not:QI (match_operand:DI 2 "reg_or_const_int_operand" ""))]
[(not:QI (match_operand:DI 2 "reg_or_cint_operand" ""))]
UNSPEC_ZAP)
(match_operand:DI 1 "reg_or_const_int_operand" "")))]
(match_operand:DI 1 "reg_or_cint_operand" "")))]
""
{
if (GET_CODE (operands[2]) == CONST_INT)
......
......@@ -417,6 +417,7 @@ write_insn_preds_c (void)
#include \"coretypes.h\"\n\
#include \"tm.h\"\n\
#include \"rtl.h\"\n\
#include \"tree.h\"\n\
#include \"tm_p.h\"\n\
#include \"function.h\"\n\
#include \"insn-config.h\"\n\
......
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