Commit e69d1422 by J"orn Rennecke Committed by Joern Rennecke

sh-protos.h (sh_expand_unop_v2sf): Move inside #ifdef RTX_CODE guard.

	* sh-protos.h (sh_expand_unop_v2sf): Move inside #ifdef RTX_CODE guard.
	(sh_expand_binop_v2sf): Likewise.
	* sh.c (machine_dependent_reorg): Add move for UNSPEC_MOVA.
	(int_gpr_dest, trunc_hi_operand): New functions.
	* sh.h (PREDICATE_CODES): Add any_register_operand, int_gpr_dest and
	trunc_hi_operand.
	(SPECIAL_MODE_PREDICATES, any_register_operand): Define.
	* sh.md (cmpeqdi_t+1): Remove comments that genrecog warns about.
	(adddi3_compact+1, subdi3_compact+1, ashlsi3_n+1, ashlhi3+1): Likewise.
	(ashrsi2_16+1, ashrsi2_31+1, lshrsi3_n+1, ashrdi3+[12]): Likewise.
	(and_shl_scratch+[12], zero_extendhidi2+1): Likewise.
	(zero_extendhisi2_media+1, extendhidi2+1, extendqidi2+1): Likewise.
	(extendhisi2_media+1, extendqisi2_media+1): Likewise.
	(movsi_media_nofpu+[12], movhi_media+1, movdi_media_nofpu+1): Likewise.
	(movdi_const_16bit+[12], movdf_i4+[123], reload_outdf+[2-5]): Likewise.
	(movsf_ie+1): Likewise.
	(loaddi_trunc): Use int_gpr_dest predicate.
	(use_sfunc_addr, indirect_jump_scratch, sibcall_compact): Add mode(s).
	(mova, mova_const, GOTaddr2picreg, ptrel, casesi_worker_0): Likewise.
	(casesi_worker_0+[12], casesi_worker): Likewise.
	(shcompact_preserve_incoming_args): Likewise.
	(mov_nop): Use any_register_operand predicate.
	(mperm_w0): Use trunc_hi_operand predicate.

From-SVN: r55564
parent 47a4976f
Thu Jul 18 19:39:18 2002 J"orn Rennecke <joern.rennecke@superh.com>
* sh-protos.h (sh_expand_unop_v2sf): Move inside #ifdef RTX_CODE guard.
(sh_expand_binop_v2sf): Likewise.
* sh.c (machine_dependent_reorg): Add move for UNSPEC_MOVA.
(int_gpr_dest, trunc_hi_operand): New functions.
* sh.h (PREDICATE_CODES): Add any_register_operand, int_gpr_dest and
trunc_hi_operand.
(SPECIAL_MODE_PREDICATES, any_register_operand): Define.
* sh.md (cmpeqdi_t+1): Remove comments that genrecog warns about.
(adddi3_compact+1, subdi3_compact+1, ashlsi3_n+1, ashlhi3+1): Likewise.
(ashrsi2_16+1, ashrsi2_31+1, lshrsi3_n+1, ashrdi3+[12]): Likewise.
(and_shl_scratch+[12], zero_extendhidi2+1): Likewise.
(zero_extendhisi2_media+1, extendhidi2+1, extendqidi2+1): Likewise.
(extendhisi2_media+1, extendqisi2_media+1): Likewise.
(movsi_media_nofpu+[12], movhi_media+1, movdi_media_nofpu+1): Likewise.
(movdi_const_16bit+[12], movdf_i4+[123], reload_outdf+[2-5]): Likewise.
(movsf_ie+1): Likewise.
(loaddi_trunc): Use int_gpr_dest predicate.
(use_sfunc_addr, indirect_jump_scratch, sibcall_compact): Add mode(s).
(mova, mova_const, GOTaddr2picreg, ptrel, casesi_worker_0): Likewise.
(casesi_worker_0+[12], casesi_worker): Likewise.
(shcompact_preserve_incoming_args): Likewise.
(mov_nop): Use any_register_operand predicate.
(mperm_w0): Use trunc_hi_operand predicate.
2002-07-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
* pa-linux.h (DWARF2_UNWIND_INFO): Delete define.
......
......@@ -100,6 +100,8 @@ extern void expand_df_binop PARAMS ((rtx (*)(rtx, rtx, rtx, rtx), rtx *));
extern void expand_fp_branch PARAMS ((rtx (*)(void), rtx (*)(void)));
extern int sh_insn_length_adjustment PARAMS ((rtx));
extern int sh_can_redirect_branch PARAMS ((rtx, rtx));
extern void sh_expand_unop_v2sf (enum rtx_code, rtx, rtx);
extern void sh_expand_binop_v2sf (enum rtx_code, rtx, rtx, rtx);
#ifdef TREE_CODE
extern void sh_va_start PARAMS ((tree, rtx));
extern rtx sh_va_arg PARAMS ((tree, tree));
......@@ -117,8 +119,6 @@ extern void output_file_start PARAMS ((FILE *));
extern int sh_media_register_for_return PARAMS ((void));
extern void sh_expand_prologue PARAMS ((void));
extern void sh_expand_epilogue PARAMS ((void));
extern void sh_expand_unop_v2sf (enum rtx_code, rtx, rtx);
extern void sh_expand_binop_v2sf (enum rtx_code, rtx, rtx, rtx);
extern int sh_need_epilogue PARAMS ((void));
extern int initial_elimination_offset PARAMS ((int, int));
extern int fldi_ok PARAMS ((void));
......
......@@ -3828,7 +3828,7 @@ machine_dependent_reorg (first)
{
lab = add_constant (XVECEXP (src, 0, 0), mode, 0);
newsrc = gen_rtx_LABEL_REF (VOIDmode, lab);
newsrc = gen_rtx_UNSPEC (VOIDmode,
newsrc = gen_rtx_UNSPEC (SImode,
gen_rtvec (1, newsrc),
UNSPEC_MOVA);
}
......@@ -5870,6 +5870,21 @@ arith_reg_dest (op, mode)
}
int
int_gpr_dest (op, mode)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{
enum machine_mode op_mode = GET_MODE (op);
if (GET_MODE_CLASS (op_mode) != MODE_INT
|| GET_MODE_SIZE (op_mode) >= UNITS_PER_WORD)
return 0;
if (! reload_completed)
return 0;
return true_regnum (op) <= LAST_GENERAL_REG;
}
int
fp_arith_reg_operand (op, mode)
rtx op;
enum machine_mode mode;
......@@ -6259,6 +6274,19 @@ extend_reg_operand (op, mode)
}
int
trunc_hi_operand (op, mode)
rtx op;
enum machine_mode mode;
{
enum machine_mode op_mode = GET_MODE (op);
if (op_mode != SImode && op_mode != DImode
&& op_mode != V4HImode && op_mode != V2SImode)
return 0;
return extend_reg_operand (op, mode);
}
int
extend_reg_or_0_operand (op, mode)
rtx op;
enum machine_mode mode;
......
......@@ -3211,6 +3211,7 @@ extern int rtx_equal_function_value_matters;
/* Define the codes that are matched by predicates in sh.c. */
#define PREDICATE_CODES \
{"and_operand", {SUBREG, REG, CONST_INT}}, \
{"any_register_operand", {SUBREG, REG}}, \
{"arith_operand", {SUBREG, REG, CONST_INT}}, \
{"arith_reg_dest", {SUBREG, REG}}, \
{"arith_reg_operand", {SUBREG, REG}}, \
......@@ -3227,6 +3228,7 @@ extern int rtx_equal_function_value_matters;
{"general_movsrc_operand", {SUBREG, REG, CONST_INT, CONST_DOUBLE, MEM}}, \
{"general_movdst_operand", {SUBREG, REG, MEM}}, \
{"greater_comparison_operator", {GT,GE,GTU,GEU}}, \
{"int_gpr_dest", {SUBREG, REG}}, \
{"inqhi_operand", {TRUNCATE}}, \
{"less_comparison_operator", {LT,LE,LTU,LEU}}, \
{"logical_operand", {SUBREG, REG, CONST_INT}}, \
......@@ -3235,6 +3237,7 @@ extern int rtx_equal_function_value_matters;
{"shmedia_6bit_operand", {SUBREG, REG, CONST_INT}}, \
{"target_reg_operand", {SUBREG, REG}}, \
{"target_operand", {SUBREG, REG, LABEL_REF, SYMBOL_REF, CONST, UNSPEC}},\
{"trunc_hi_operand", {SUBREG, REG, TRUNCATE}}, \
{"register_operand", {SUBREG, REG}}, \
{"sh_const_vec", {CONST_VECTOR}}, \
{"sh_1el_vec", {CONST_VECTOR, PARALLEL}}, \
......@@ -3242,6 +3245,14 @@ extern int rtx_equal_function_value_matters;
{"symbol_ref_operand", {SYMBOL_REF}}, \
{"unary_float_operator", {ABS, NEG, SQRT}}, \
#define SPECIAL_MODE_PREDICATES \
"any_register_operand", \
"int_gpr_dest", \
"trunc_hi_operand", \
/* This line intentionally left blank. */
#define any_register_operand register_operand
/* Define this macro if it is advisable to hold scalars in registers
in a wider mode than that declared by the program. In such cases,
the value is constrained to be within the bounds of the declared
......
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