Commit d3632d41 by Ulrich Weigand Committed by Ulrich Weigand

s390.c (s390_extra_constraint): New function.

	* config/s390/s390.c (s390_extra_constraint): New function.
	* config/s390/s390-protos.h (s390_extra_constraint): Declare it.
	* config/s390/s390.h (EXTRA_CONSTRAINT): Use it.
	* config/s390/s390.c (q_constraint): Remove.
	* config/s390/s390-protos.h (q_constraint): Likewise.
	* config/s390/s390.h (EXTRA_MEMORY_CONSTRAINT): Add 'R', 'S', 'T'.
	(EXTRA_ADDRESS_CONSTRAINT): Define.

	* config/s390/s390.c (larl_operand): Refuse out-of-range operands.
	(DISP_IN_RANGE, s390_short_displacement): New.
	(legitimate_reload_operand_p): Support long displacements.
	(s390_decompose_address): Likewise.
	(legitimize_pic_address): Likewise.
	(legitimize_address): Likewise.
	(s390_fixup_clobbered_return_reg): Likewise.
	(s390_emit_prologue, s390_emit_epilogue): Likewise.
	(s390_output_mi_thunk): Likewise.

	* config/s390/s390.md (attr "op_type"): Add "RXY", "RSY", "SIY".
	(attr "atype", attr "length"): Add defaults for new op_types.
	(all insns): Change op_type attribute where appropriate.

	("*movdi_lay", "*movsi_lay", "*extendqidi2", "*extendqisi2"): New insns.
	("*tmqi_ext", "*tmdi_mem", "*tmsi_mem", "*tmhi_mem", *tmqi_mem",
	"*tstsi", "*tstsi_cconly", "*tsthiCCT", "*tsthiCCT_cconly",
	"*tsthi", "*tsthi_cconly", "*tstqiCCT", "*tstqiCCT_cconly",
	"*tstqi", "*tstqi_cconly", "*cmpsi_ccs_sign", "*cmpsi_ccs",
	"*cmpsi_ccu", "*cmphi_ccu", "*cmpqi_ccu", "*cli",
	"movti", "*movdi_64", "*movdi_31", "*movsi", "movhi", "movqi_64",
	"movqi", "*movstrictqi", "*movstricthi", "movstrictsi",
	"*movdf_64", "*movdf_31", "*movsf",
	"*load_multiple_si", "*store_multiple_di",
	"*sethighqisi", "*sethighhisi", "*sethighqidi_31", "*extendhisi2",
	"*la_64", "*la_31", "*la_31_and", "force_la_31",
	"*addsi3_carry1_cc", *addsi3_carry1_cconly",
	"*addsi3_carry2_cc", *addsi3_carry2_cconly",
	"*addsi3_cc", "*addsi3_cconly", "*addsi3_cconly2",
	"*addsi3_sign", "*addsi3_sub", "addsi3",
	"*subsi3_borrow_cc", "*subsi3_borrow_cconly", "*subsi3_cc",
	"*subsi3_cconly", "*subsi3_sign", "*subsi3_sub", "subsi3",
	"mulsi3"
	"*andsi3_cc", "*andsi3_cconly", "andsi3",
	"*andqi3_ss", "*andqi3_ss_inv",
	"*iorsi3_cc", "*iorsi3_cconly", "iorsi3",
	"*iorqi3_ss", "*iorqi3_ss_inv",
	"*xorsi3_cc", "*xorsi3_cconly", "xorsi3",
	"*xorqi3_ss", "*xorqi3_ss_inv",
	"*tls_load_31"): Add alternatives for long-displacement instructions.

	("*cmpdf_ccs", "*cmpdf_ccs_ibm", "*cmpsf_ccs", "*cmpsf_ccs_ibm",
	"*load_multiple_di", "*store_multiple_di",
	"*sethighqidi_64", "*zero_extendhisi2_31",
	"truncdfsf2_ibm", "extendsfdf2_ieee", "extendsfdf2_ibm",
	"adddf3", "*adddf3", "*adddf3_ibm",
	"addsf3", "*addsf3", "*addsf3_ibm",
	"subdf3", "*subdf3", "*subdf3_ibm",
	"subsf3", "*subsf3", "*subsf3_ibm",
	"mulsi_6432", "divmoddisi3",
	"muldf3", "*muldf3", "*muldf3_ibm",
	"mulsf3", "*mulsf3", "*mulsf3_ibm",
	"divdf3", "*divdf3", "*divdf3_ibm",
	"divsf3", "div*sf3", "*divsf3_ibm",
	"sqrtdf2", "sqrtsf2",
	"*cjump_long", "*icjump_long", "indirect_jump", "casesi_jump",
	"*doloop_si_long", "*doloop_di_long", "bas_64", "bas_31",
	"bas_r_64", "bas_r_31", "bas_tls_31", "bas_tls_64"): Adapt memory
	and address constraints for instructions that do not accept long
	displacements.

From-SVN: r68744
parent 52609473
2003-06-30 Ulrich Weigand <uweigand@de.ibm.com>
* config/s390/s390.c (s390_extra_constraint): New function.
* config/s390/s390-protos.h (s390_extra_constraint): Declare it.
* config/s390/s390.h (EXTRA_CONSTRAINT): Use it.
* config/s390/s390.c (q_constraint): Remove.
* config/s390/s390-protos.h (q_constraint): Likewise.
* config/s390/s390.h (EXTRA_MEMORY_CONSTRAINT): Add 'R', 'S', 'T'.
(EXTRA_ADDRESS_CONSTRAINT): Define.
* config/s390/s390.c (larl_operand): Refuse out-of-range operands.
(DISP_IN_RANGE, s390_short_displacement): New.
(legitimate_reload_operand_p): Support long displacements.
(s390_decompose_address): Likewise.
(legitimize_pic_address): Likewise.
(legitimize_address): Likewise.
(s390_fixup_clobbered_return_reg): Likewise.
(s390_emit_prologue, s390_emit_epilogue): Likewise.
(s390_output_mi_thunk): Likewise.
* config/s390/s390.md (attr "op_type"): Add "RXY", "RSY", "SIY".
(attr "atype", attr "length"): Add defaults for new op_types.
(all insns): Change op_type attribute where appropriate.
("*movdi_lay", "*movsi_lay", "*extendqidi2", "*extendqisi2"): New insns.
("*tmqi_ext", "*tmdi_mem", "*tmsi_mem", "*tmhi_mem", *tmqi_mem",
"*tstsi", "*tstsi_cconly", "*tsthiCCT", "*tsthiCCT_cconly",
"*tsthi", "*tsthi_cconly", "*tstqiCCT", "*tstqiCCT_cconly",
"*tstqi", "*tstqi_cconly", "*cmpsi_ccs_sign", "*cmpsi_ccs",
"*cmpsi_ccu", "*cmphi_ccu", "*cmpqi_ccu", "*cli",
"movti", "*movdi_64", "*movdi_31", "*movsi", "movhi", "movqi_64",
"movqi", "*movstrictqi", "*movstricthi", "movstrictsi",
"*movdf_64", "*movdf_31", "*movsf",
"*load_multiple_si", "*store_multiple_di",
"*sethighqisi", "*sethighhisi", "*sethighqidi_31", "*extendhisi2",
"*la_64", "*la_31", "*la_31_and", "force_la_31",
"*addsi3_carry1_cc", *addsi3_carry1_cconly",
"*addsi3_carry2_cc", *addsi3_carry2_cconly",
"*addsi3_cc", "*addsi3_cconly", "*addsi3_cconly2",
"*addsi3_sign", "*addsi3_sub", "addsi3",
"*subsi3_borrow_cc", "*subsi3_borrow_cconly", "*subsi3_cc",
"*subsi3_cconly", "*subsi3_sign", "*subsi3_sub", "subsi3",
"mulsi3"
"*andsi3_cc", "*andsi3_cconly", "andsi3",
"*andqi3_ss", "*andqi3_ss_inv",
"*iorsi3_cc", "*iorsi3_cconly", "iorsi3",
"*iorqi3_ss", "*iorqi3_ss_inv",
"*xorsi3_cc", "*xorsi3_cconly", "xorsi3",
"*xorqi3_ss", "*xorqi3_ss_inv",
"*tls_load_31"): Add alternatives for long-displacement instructions.
("*cmpdf_ccs", "*cmpdf_ccs_ibm", "*cmpsf_ccs", "*cmpsf_ccs_ibm",
"*load_multiple_di", "*store_multiple_di",
"*sethighqidi_64", "*zero_extendhisi2_31",
"truncdfsf2_ibm", "extendsfdf2_ieee", "extendsfdf2_ibm",
"adddf3", "*adddf3", "*adddf3_ibm",
"addsf3", "*addsf3", "*addsf3_ibm",
"subdf3", "*subdf3", "*subdf3_ibm",
"subsf3", "*subsf3", "*subsf3_ibm",
"mulsi_6432", "divmoddisi3",
"muldf3", "*muldf3", "*muldf3_ibm",
"mulsf3", "*mulsf3", "*mulsf3_ibm",
"divdf3", "*divdf3", "*divdf3_ibm",
"divsf3", "div*sf3", "*divsf3_ibm",
"sqrtdf2", "sqrtsf2",
"*cjump_long", "*icjump_long", "indirect_jump", "casesi_jump",
"*doloop_si_long", "*doloop_di_long", "bas_64", "bas_31",
"bas_r_64", "bas_r_31", "bas_tls_31", "bas_tls_64"): Adapt memory
and address constraints for instructions that do not accept long
displacements.
2003-06-30 Hartmut Penner <hpenner@de.ibm.com>
Ulrich Weigand <uweigand@de.ibm.com>
......
......@@ -29,7 +29,7 @@ extern void s390_emit_epilogue PARAMS ((void));
extern void s390_function_profiler PARAMS ((FILE *, int));
#ifdef RTX_CODE
extern int q_constraint PARAMS ((rtx));
extern int s390_extra_constraint PARAMS ((rtx, int));
extern int const0_operand PARAMS ((rtx, enum machine_mode));
extern int consttable_operand PARAMS ((rtx, enum machine_mode));
extern int larl_operand PARAMS ((rtx, enum machine_mode));
......
......@@ -530,10 +530,11 @@ extern const enum reg_class regclass_map[FIRST_PSEUDO_REGISTER];
#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 1
#define EXTRA_CONSTRAINT(OP, C) \
((C) == 'Q' ? q_constraint (OP) : \
(C) == 'S' ? larl_operand (OP, GET_MODE (OP)) : 0)
#define EXTRA_MEMORY_CONSTRAINT(C,STR) ((C) == 'Q')
s390_extra_constraint ((OP), (C))
#define EXTRA_MEMORY_CONSTRAINT(C, STR) \
((C) == 'Q' || (C) == 'R' || (C) == 'S' || (C) == 'T')
#define EXTRA_ADDRESS_CONSTRAINT(C, STR) \
((C) == 'U' || (C) == 'W')
/* Stack layout and calling conventions. */
......
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