Commit 76cbf5bf by Richard Sandiford Committed by Richard Sandiford

mips-protos.h (m16_usym8_4, [...]): Delete.

	* config/mips/mips-protos.h (m16_usym8_4, m16_usym5_4): Delete.
	* config/mips/mips.h (mips_entry, mips_string_length): Delete.
	(CONSTANT_POOL_BEFORE_FUNCTION, ASM_OUTPUT_POOL_EPILOGUE): Undefine.
	* config/mips/mips.c (struct mips16_constant): Renamed from struct
	constant.  Propogate change throughout file.
	(struct machine_function): Remove insns_len.
	(mips_string_length, mips16_strings, string_constants): Delete.
	(mips_classify_symbol): Return SYMBOL_CONSTANT_POOL for LABEL_REFs
	when generating mips16 code.  Remove special mips16 treatment of
	string constants.
	(mips_symbolic_constant_p): Allow mips16 constant pool accesses
	to have the form LABEL+CONSTANT.
	(mips_symbolic_address_p): Fix comment.
	(m16_usym8_4, m16_usym5_4): Delete.
	(mips_output_function_epilogue): Remove mips16 string handling.
	(mips_output_mi_thunk): Call mips16_lay_out_constants.
	(mips_select_section, mips_encode_section_info): Remove mips16
	string handling.
	(struct mips16_constant_pool): New.
	(add_constant): Take a mips16_constant_pool structure.  Keep pool
	sorted into order of ascending mode size.  Keep track of the highest
	possible start address, taking padding and the masking of the base PC
	value into account.
	(dump_constants_1): New function, split out from dump_constants.
	Handle vector constants.  Use gen_consttable_{int,float} rather than
	separate functions for each mode.
	(dump_constants): Simplify.  Use GET_MODE_ALIGNMENT.  Use gen_align
	rather than separate functions for each alignment.
	(mips_find_symbol): Delete.
	(mips16_insn_length): New function, split out from
	mips16_lay_out_constants.
	(mips16_rewrite_pool_refs): New function.
	(mips16_lay_out_constants): Rework. Remove string handling.
	Always create an inline constant pool.
	* config/mips/mips.md (UNSPEC_CONSTTABLE_INT, UNSPEC_CONSTTABLE_FLOAT)
	(UNSPEC_ALIGN): New constants.
	(UNSPEC_CONSTTABLE_[QHSD]I, UNSPEC_CONSTTABLE_[SD]F): Delete.
	(UNSPEC_ALIGN_[248]): Delete.
	(consttable_int, consttable_float, align): New patterns.
	(consttable_[qhsd]i, consttable_[sd]f, align_[248]): Delete.

From-SVN: r80814
parent f178c2d6
2004-04-18 Richard Sandiford <rsandifo@redhat.com>
* config/mips/mips-protos.h (m16_usym8_4, m16_usym5_4): Delete.
* config/mips/mips.h (mips_entry, mips_string_length): Delete.
(CONSTANT_POOL_BEFORE_FUNCTION, ASM_OUTPUT_POOL_EPILOGUE): Undefine.
* config/mips/mips.c (struct mips16_constant): Renamed from struct
constant. Propogate change throughout file.
(struct machine_function): Remove insns_len.
(mips_string_length, mips16_strings, string_constants): Delete.
(mips_classify_symbol): Return SYMBOL_CONSTANT_POOL for LABEL_REFs
when generating mips16 code. Remove special mips16 treatment of
string constants.
(mips_symbolic_constant_p): Allow mips16 constant pool accesses
to have the form LABEL+CONSTANT.
(mips_symbolic_address_p): Fix comment.
(m16_usym8_4, m16_usym5_4): Delete.
(mips_output_function_epilogue): Remove mips16 string handling.
(mips_output_mi_thunk): Call mips16_lay_out_constants.
(mips_select_section, mips_encode_section_info): Remove mips16
string handling.
(struct mips16_constant_pool): New.
(add_constant): Take a mips16_constant_pool structure. Keep pool
sorted into order of ascending mode size. Keep track of the highest
possible start address, taking padding and the masking of the base PC
value into account.
(dump_constants_1): New function, split out from dump_constants.
Handle vector constants. Use gen_consttable_{int,float} rather than
separate functions for each mode.
(dump_constants): Simplify. Use GET_MODE_ALIGNMENT. Use gen_align
rather than separate functions for each alignment.
(mips_find_symbol): Delete.
(mips16_insn_length): New function, split out from
mips16_lay_out_constants.
(mips16_rewrite_pool_refs): New function.
(mips16_lay_out_constants): Rework. Remove string handling.
Always create an inline constant pool.
* config/mips/mips.md (UNSPEC_CONSTTABLE_INT, UNSPEC_CONSTTABLE_FLOAT)
(UNSPEC_ALIGN): New constants.
(UNSPEC_CONSTTABLE_[QHSD]I, UNSPEC_CONSTTABLE_[SD]F): Delete.
(UNSPEC_ALIGN_[248]): Delete.
(consttable_int, consttable_float, align): New patterns.
(consttable_[qhsd]i, consttable_[sd]f, align_[248]): Delete.
2004-04-17 Aldy Hernandez <aldyh@redhat.com>
* config/rs6000/altivec.h (vec_any_numeric): Correct typo in
......
......@@ -114,8 +114,6 @@ extern int m16_uimm8_4 (rtx, enum machine_mode);
extern int m16_nuimm8_4 (rtx, enum machine_mode);
extern int m16_simm8_8 (rtx, enum machine_mode);
extern int m16_nsimm8_8 (rtx, enum machine_mode);
extern int m16_usym8_4 (rtx, enum machine_mode);
extern int m16_usym5_4 (rtx, enum machine_mode);
extern struct rtx_def *embedded_pic_fnaddr_reg (void);
extern struct rtx_def *embedded_pic_offset (rtx);
......
......@@ -117,13 +117,11 @@ extern enum processor_type mips_tune; /* which cpu to schedule for */
extern int mips_isa; /* architectural level */
extern int mips_abi; /* which ABI to use */
extern int mips16_hard_float; /* mips16 without -msoft-float */
extern int mips_entry; /* generate entry/exit for mips16 */
extern const char *mips_arch_string; /* for -march=<xxx> */
extern const char *mips_tune_string; /* for -mtune=<xxx> */
extern const char *mips_isa_string; /* for -mips{1,2,3,4} */
extern const char *mips_abi_string; /* for -mabi={32,n32,64} */
extern const char *mips_cache_flush_func;/* for -mflush-func= and -mno-flush-func */
extern int mips_string_length; /* length of strings for mips16 */
extern const struct mips_cpu_info mips_cpu_info_table[];
extern const struct mips_cpu_info *mips_arch_info;
extern const struct mips_cpu_info *mips_tune_info;
......@@ -2575,14 +2573,6 @@ typedef struct mips_args {
else \
asm_fprintf ((FILE), "%U%s", (NAME))
/* The mips16 wants the constant pool to be after the function,
because the PC relative load instructions use unsigned offsets. */
#define CONSTANT_POOL_BEFORE_FUNCTION (! TARGET_MIPS16)
#define ASM_OUTPUT_POOL_EPILOGUE(FILE, FNNAME, FNDECL, SIZE) \
mips_string_length = 0;
/* Specify the machine mode that this machine uses
for the index in the tablejump instruction.
??? Using HImode in mips16 mode can cause overflow. */
......
......@@ -35,15 +35,9 @@
(UNSPEC_CPRESTORE 5)
(UNSPEC_EH_RECEIVER 6)
(UNSPEC_EH_RETURN 7)
(UNSPEC_CONSTTABLE_QI 8)
(UNSPEC_CONSTTABLE_HI 9)
(UNSPEC_CONSTTABLE_SI 10)
(UNSPEC_CONSTTABLE_DI 11)
(UNSPEC_CONSTTABLE_SF 12)
(UNSPEC_CONSTTABLE_DF 13)
(UNSPEC_ALIGN_2 14)
(UNSPEC_ALIGN_4 15)
(UNSPEC_ALIGN_8 16)
(UNSPEC_CONSTTABLE_INT 8)
(UNSPEC_CONSTTABLE_FLOAT 9)
(UNSPEC_ALIGN 14)
(UNSPEC_HIGH 17)
(UNSPEC_LWL 18)
(UNSPEC_LWR 19)
......@@ -9147,74 +9141,21 @@ ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\\n\\t%*j\\t%2%/"
;; ....................
;;
(define_insn "consttable_qi"
[(unspec_volatile [(match_operand:QI 0 "consttable_operand" "=g")]
UNSPEC_CONSTTABLE_QI)]
(define_insn "consttable_int"
[(unspec_volatile [(match_operand 0 "consttable_operand" "")
(match_operand 1 "const_int_operand" "")]
UNSPEC_CONSTTABLE_INT)]
"TARGET_MIPS16"
{
assemble_integer (operands[0], 1, BITS_PER_UNIT, 1);
assemble_integer (operands[0], INTVAL (operands[1]),
BITS_PER_UNIT * INTVAL (operands[1]), 1);
return "";
}
[(set_attr "type" "unknown")
(set_attr "mode" "QI")
(set_attr "length" "8")])
(define_insn "consttable_hi"
[(unspec_volatile [(match_operand:HI 0 "consttable_operand" "=g")]
UNSPEC_CONSTTABLE_HI)]
"TARGET_MIPS16"
{
assemble_integer (operands[0], 2, BITS_PER_UNIT * 2, 1);
return "";
}
[(set_attr "type" "unknown")
(set_attr "mode" "HI")
(set_attr "length" "8")])
(define_insn "consttable_si"
[(unspec_volatile [(match_operand:SI 0 "consttable_operand" "=g")]
UNSPEC_CONSTTABLE_SI)]
"TARGET_MIPS16"
{
assemble_integer (operands[0], 4, BITS_PER_UNIT * 4, 1);
return "";
}
[(set_attr "type" "unknown")
(set_attr "mode" "SI")
(set_attr "length" "8")])
(define_insn "consttable_di"
[(unspec_volatile [(match_operand:DI 0 "consttable_operand" "=g")]
UNSPEC_CONSTTABLE_DI)]
"TARGET_MIPS16"
{
assemble_integer (operands[0], 8, BITS_PER_UNIT * 8, 1);
return "";
}
[(set_attr "type" "unknown")
(set_attr "mode" "DI")
(set_attr "length" "16")])
(define_insn "consttable_sf"
[(unspec_volatile [(match_operand:SF 0 "consttable_operand" "=g")]
UNSPEC_CONSTTABLE_SF)]
"TARGET_MIPS16"
{
REAL_VALUE_TYPE d;
[(set (attr "length") (symbol_ref "INTVAL (operands[1])"))])
if (GET_CODE (operands[0]) != CONST_DOUBLE)
abort ();
REAL_VALUE_FROM_CONST_DOUBLE (d, operands[0]);
assemble_real (d, SFmode, GET_MODE_ALIGNMENT (SFmode));
return "";
}
[(set_attr "type" "unknown")
(set_attr "mode" "SF")
(set_attr "length" "8")])
(define_insn "consttable_df"
[(unspec_volatile [(match_operand:DF 0 "consttable_operand" "=g")]
UNSPEC_CONSTTABLE_DF)]
(define_insn "consttable_float"
[(unspec_volatile [(match_operand 0 "consttable_operand" "")]
UNSPEC_CONSTTABLE_FLOAT)]
"TARGET_MIPS16"
{
REAL_VALUE_TYPE d;
......@@ -9222,36 +9163,18 @@ ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\\n\\t%*j\\t%2%/"
if (GET_CODE (operands[0]) != CONST_DOUBLE)
abort ();
REAL_VALUE_FROM_CONST_DOUBLE (d, operands[0]);
assemble_real (d, DFmode, GET_MODE_ALIGNMENT (DFmode));
assemble_real (d, GET_MODE (operands[0]),
GET_MODE_BITSIZE (GET_MODE (operands[0])));
return "";
}
[(set_attr "type" "unknown")
(set_attr "mode" "DF")
(set_attr "length" "16")])
[(set (attr "length")
(symbol_ref "GET_MODE_SIZE (GET_MODE (operands[0]))"))])
(define_insn "align_2"
[(unspec_volatile [(const_int 0)] UNSPEC_ALIGN_2)]
"TARGET_MIPS16"
".align 1"
[(set_attr "type" "unknown")
(set_attr "mode" "HI")
(set_attr "length" "8")])
(define_insn "align_4"
[(unspec_volatile [(const_int 0)] UNSPEC_ALIGN_4)]
"TARGET_MIPS16"
".align 2"
[(set_attr "type" "unknown")
(set_attr "mode" "SI")
(set_attr "length" "8")])
(define_insn "align_8"
[(unspec_volatile [(const_int 0)] UNSPEC_ALIGN_8)]
"TARGET_MIPS16"
".align 3"
[(set_attr "type" "unknown")
(set_attr "mode" "DI")
(set_attr "length" "12")])
(define_insn "align"
[(unspec_volatile [(match_operand 0 "const_int_operand" "")] UNSPEC_ALIGN)]
""
".align\t%0"
[(set (attr "length") (symbol_ref "(1 << INTVAL (operands[0])) - 1"))])
;;
;; ....................
......
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