OSDN Git Service

PR target/40457
authorbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 Aug 2010 10:06:47 +0000 (10:06 +0000)
committerbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 Aug 2010 10:06:47 +0000 (10:06 +0000)
commit320ea44d7985e0adc9ccd8a41a3d38f37e20e51c
tree9950f9dbf01dcd739509a644ed4b34132dc79cee
parentcde1623ab7ef5dc67f55b3dd46204cb3f8dfee68
PR target/40457
* config/arm/arm.h (arm_regs_in_sequence): Declare.
* config/arm/arm-protos.h (emit_ldm_seq, emit_stm_seq,
load_multiple_sequence, store_multiple_sequence): Delete
declarations.
(arm_gen_load_multiple, arm_gen_store_multiple): Adjust
declarations.
* config/arm/ldmstm.md: New file.
* config/arm/arm.c (arm_regs_in_sequence): New array.
(load_multiple_sequence): Now static.  New args SAVED_ORDER,
CHECK_REGS.  All callers changed.
If SAVED_ORDER is nonnull, copy the computed order into it.
If CHECK_REGS is false, don't sort REGS.  Handle Thumb mode.
(store_multiple_sequence): Now static.  New args NOPS_TOTAL,
SAVED_ORDER, REG_RTXS and CHECK_REGS.  All callers changed.
If SAVED_ORDER is nonnull, copy the computed order into it.
If CHECK_REGS is false, don't sort REGS.  Set up REG_RTXS just
like REGS.  Handle Thumb mode.
(arm_gen_load_multiple_1): New function, broken out of
arm_gen_load_multiple.
(arm_gen_store_multiple_1): New function, broken out of
arm_gen_store_multiple.
(arm_gen_multiple_op): New function, with code from
arm_gen_load_multiple and arm_gen_store_multiple moved here.
(arm_gen_load_multiple, arm_gen_store_multiple): Now just
wrappers around arm_gen_multiple_op.  Remove argument UP, all callers
changed.
(gen_ldm_seq, gen_stm_seq, gen_const_stm_seq): New functions.
* config/arm/predicates.md (commutative_binary_operator): New.
(load_multiple_operation, store_multiple_operation): Handle more
variants of these patterns with different starting offsets.  Handle
Thumb-1.
* config/arm/arm.md: Include "ldmstm.md".
(ldmsi_postinc4, ldmsi_postinc4_thumb1, ldmsi_postinc3, ldmsi_postinc2,
ldmsi4, ldmsi3, ldmsi2, stmsi_postinc4, stmsi_postinc4_thumb1,
stmsi_postinc3, stmsi_postinc2, stmsi4, stmsi3, stmsi2 and related
peepholes): Delete.
* config/arm/ldmstm.md: New file.
* config/arm/arm-ldmstm.ml: New file.

testsuite/
PR target/40457
* gcc.target/arm/pr40457-1.c: New test.
* gcc.target/arm/pr40457-2.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162815 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/arm/arm-ldmstm.ml [new file with mode: 0644]
gcc/config/arm/arm-protos.h
gcc/config/arm/arm.c
gcc/config/arm/arm.h
gcc/config/arm/arm.md
gcc/config/arm/ldmstm.md [new file with mode: 0644]
gcc/config/arm/predicates.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/pr40457-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/pr40457-2.c [new file with mode: 0644]