Commit eec9405e by Trevor Smigiel Committed by Trevor Smigiel

Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>

	* config/spu/spu-protos.h (aligned_mem_p, spu_valid_mov): Remove.
	(spu_split_load, spu_split_store): Change return type to int.
	(spu_split_convert): Declare.
	* config/spu/predicates.md (spu_mem_operand): Remove.
	(spu_mov_operand): Update.
	(spu_dest_operand, shiftrt_operator, extend_operator): Define.
	* config/spu/spu.c (regno_aligned_for_load): Remove.
	(reg_aligned_for_addr, spu_expand_load): Define.
	(spu_expand_extv): Reimplement and handle MEM.
	(spu_expand_insv): Handle MEM.
	(spu_sched_reorder): Handle insn's with length 0.
	(spu_legitimate_address_p): Reimplement.
	(store_with_one_insn_p): Return TRUE for any mode with size
	larger than 16 bytes.
	(address_needs_split): Define.
	(spu_expand_mov): Call spu_split_load and spu_split_store for MEM
	operands.
	(spu_convert_move): Define.
	(spu_split_load): Use spu_expand_load and change all MEM's to
	TImode.
	(spu_split_store): Change all MEM's to TImode.
	(spu_init_expanders): Preallocate registers that correspond to
	LAST_VIRTUAL_REG+1 and LAST_VIRTUAL_REG+2 and set them with
	mark_reg_pointer.
	(spu_split_convert): Define.
	* config/spu/spu.md (QHSI, QHSDI): New mode iterators.
	(_move<mode>, _movdi, _movti): Update predicate and condition.
	(load, store): Change to define_split.
	(extendqiti2, extendhiti2, extendsiti2, extendditi2): Simplify to
	extend<mode>ti2.
	(zero_extendqiti2, zero_extendhiti2, <v>lshr<mode>3_imm): Define.
	(lshr<mode>3, lshr<mode>3_imm, lshr<mode>3_re): Simplify to one
	define_insn_and_split of lshr<mode>3.
	(shrqbybi_<mode>, shrqby_<mode>): Simplify to define_expand.
	(<v>ashr<mode>3_imm): Define.
	(extv, extzv, insv): Allow MEM operands.
	(trunc_shr_ti<mode>, trunc_shr_tidi, shl_ext_<mode>ti,
	shl_ext_diti, sext_trunc_lshr_tiqisi, zext_trunc_lshr_tiqisi,
	sext_trunc_lshr_tihisi, zext_trunc_lshr_tihisi): Define for combine.
	(_spu_convert2): Change to define_insn_and_split and remove the
	corresponding define_peephole2.
	(stack_protect_set, stack_protect_test, stack_protect_test_si):
	Change predicates to memory_operand.

From-SVN: r147814
parent 6cfd7dcf
2009-05-22 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
* config/spu/spu-protos.h (aligned_mem_p, spu_valid_mov): Remove.
(spu_split_load, spu_split_store): Change return type to int.
(spu_split_convert): Declare.
* config/spu/predicates.md (spu_mem_operand): Remove.
(spu_mov_operand): Update.
(spu_dest_operand, shiftrt_operator, extend_operator): Define.
* config/spu/spu.c (regno_aligned_for_load): Remove.
(reg_aligned_for_addr, spu_expand_load): Define.
(spu_expand_extv): Reimplement and handle MEM.
(spu_expand_insv): Handle MEM.
(spu_sched_reorder): Handle insn's with length 0.
(spu_legitimate_address_p): Reimplement.
(store_with_one_insn_p): Return TRUE for any mode with size
larger than 16 bytes.
(address_needs_split): Define.
(spu_expand_mov): Call spu_split_load and spu_split_store for MEM
operands.
(spu_convert_move): Define.
(spu_split_load): Use spu_expand_load and change all MEM's to
TImode.
(spu_split_store): Change all MEM's to TImode.
(spu_init_expanders): Preallocate registers that correspond to
LAST_VIRTUAL_REG+1 and LAST_VIRTUAL_REG+2 and set them with
mark_reg_pointer.
(spu_split_convert): Define.
* config/spu/spu.md (QHSI, QHSDI): New mode iterators.
(_move<mode>, _movdi, _movti): Update predicate and condition.
(load, store): Change to define_split.
(extendqiti2, extendhiti2, extendsiti2, extendditi2): Simplify to
extend<mode>ti2.
(zero_extendqiti2, zero_extendhiti2, <v>lshr<mode>3_imm): Define.
(lshr<mode>3, lshr<mode>3_imm, lshr<mode>3_re): Simplify to one
define_insn_and_split of lshr<mode>3.
(shrqbybi_<mode>, shrqby_<mode>): Simplify to define_expand.
(<v>ashr<mode>3_imm): Define.
(extv, extzv, insv): Allow MEM operands.
(trunc_shr_ti<mode>, trunc_shr_tidi, shl_ext_<mode>ti,
shl_ext_diti, sext_trunc_lshr_tiqisi, zext_trunc_lshr_tiqisi,
sext_trunc_lshr_tihisi, zext_trunc_lshr_tihisi): Define for combine.
(_spu_convert2): Change to define_insn_and_split and remove the
corresponding define_peephole2.
(stack_protect_set, stack_protect_test, stack_protect_test_si):
Change predicates to memory_operand.
2009-05-22 Mark Mitchell <mark@codesourcery.com> 2009-05-22 Mark Mitchell <mark@codesourcery.com>
* config/arm/thumb2.md: Add 16-bit multiply instructions. * config/arm/thumb2.md: Add 16-bit multiply instructions.
......
...@@ -39,14 +39,14 @@ ...@@ -39,14 +39,14 @@
(ior (not (match_code "subreg")) (ior (not (match_code "subreg"))
(match_test "valid_subreg (op)")))) (match_test "valid_subreg (op)"))))
(define_predicate "spu_mem_operand"
(and (match_operand 0 "memory_operand")
(match_test "reload_in_progress || reload_completed || aligned_mem_p (op)")))
(define_predicate "spu_mov_operand" (define_predicate "spu_mov_operand"
(ior (match_operand 0 "spu_mem_operand") (ior (match_operand 0 "memory_operand")
(match_operand 0 "spu_nonmem_operand"))) (match_operand 0 "spu_nonmem_operand")))
(define_predicate "spu_dest_operand"
(ior (match_operand 0 "memory_operand")
(match_operand 0 "spu_reg_operand")))
(define_predicate "call_operand" (define_predicate "call_operand"
(and (match_code "mem") (and (match_code "mem")
(match_test "(!TARGET_LARGE_MEM && satisfies_constraint_S (op)) (match_test "(!TARGET_LARGE_MEM && satisfies_constraint_S (op))
...@@ -114,3 +114,9 @@ ...@@ -114,3 +114,9 @@
(and (match_operand 0 "immediate_operand") (and (match_operand 0 "immediate_operand")
(match_test "exp2_immediate_p (op, mode, 0, 127)")))) (match_test "exp2_immediate_p (op, mode, 0, 127)"))))
(define_predicate "shiftrt_operator"
(match_code "lshiftrt,ashiftrt"))
(define_predicate "extend_operator"
(match_code "sign_extend,zero_extend"))
...@@ -62,11 +62,9 @@ extern void spu_setup_incoming_varargs (int *cum, enum machine_mode mode, ...@@ -62,11 +62,9 @@ extern void spu_setup_incoming_varargs (int *cum, enum machine_mode mode,
tree type, int *pretend_size, tree type, int *pretend_size,
int no_rtl); int no_rtl);
extern void spu_conditional_register_usage (void); extern void spu_conditional_register_usage (void);
extern int aligned_mem_p (rtx mem);
extern int spu_expand_mov (rtx * ops, enum machine_mode mode); extern int spu_expand_mov (rtx * ops, enum machine_mode mode);
extern void spu_split_load (rtx * ops); extern int spu_split_load (rtx * ops);
extern void spu_split_store (rtx * ops); extern int spu_split_store (rtx * ops);
extern int spu_valid_move (rtx * ops);
extern int fsmbi_const_p (rtx x); extern int fsmbi_const_p (rtx x);
extern int cpat_const_p (rtx x, enum machine_mode mode); extern int cpat_const_p (rtx x, enum machine_mode mode);
extern rtx gen_cpat_const (rtx * ops); extern rtx gen_cpat_const (rtx * ops);
...@@ -87,6 +85,7 @@ extern void spu_initialize_trampoline (rtx tramp, rtx fnaddr, rtx cxt); ...@@ -87,6 +85,7 @@ extern void spu_initialize_trampoline (rtx tramp, rtx fnaddr, rtx cxt);
extern void spu_expand_sign_extend (rtx ops[]); extern void spu_expand_sign_extend (rtx ops[]);
extern void spu_expand_vector_init (rtx target, rtx vals); extern void spu_expand_vector_init (rtx target, rtx vals);
extern void spu_init_expanders (void); extern void spu_init_expanders (void);
extern void spu_split_convert (rtx *);
/* spu-c.c */ /* spu-c.c */
extern tree spu_resolve_overloaded_builtin (tree fndecl, void *fnargs); extern tree spu_resolve_overloaded_builtin (tree fndecl, void *fnargs);
......
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