aarch64: Treat p12-p15 as call-preserved in SVE PCS functions
Due to a stupid mistake that I can't really explain, I'd got the treatment of p12-p15 mixed up when adding support for the SVE PCS. The registers are supposed to be call-preserved rather than call-clobbered. The fix is simple, but it has quite a big effect on the PCS tests (as it should!). 2020-03-18 Richard Sandiford <richard.sandiford@arm.com> gcc/ * config/aarch64/aarch64.c (aarch64_sve_abi): Treat p12-p15 as call-preserved for SVE PCS functions. (aarch64_layout_frame): Cope with up to 12 predicate save slots. Optimize the case in which there are no following vector save slots. gcc/testsuite/ * gcc.target/aarch64/sve/acle/general/cpy_1.c: Leave gaps for in the check-function-bodies patterns for p15 to be saved. * gcc.target/aarch64/sve/pcs/args_1.c (callee_pred): Expect two predicates to be saved. * gcc.target/aarch64/sve/pcs/saves_1_be_nowrap.c (test_1): Expect p12-p15 to be saved and restored. (test_2): Remove p12-p15 from the clobber list. * gcc.target/aarch64/sve/pcs/saves_1_be_wrap.c (test_1): Expect p12-p15 to be saved and restored. (test_2): Remove p12-p15 from the clobber list. * gcc.target/aarch64/sve/pcs/saves_1_le_nowrap.c (test_1): Expect p12-p15 to be saved and restored. (test_2): Remove p12-p15 from the clobber list. * gcc.target/aarch64/sve/pcs/saves_1_le_wrap.c (test_1): Expect p12-p15 to be saved and restored. (test_2): Remove p12-p15 from the clobber list. * gcc.target/aarch64/sve/pcs/saves_2_be_nowrap.c: Expect p12-p15 to be saved and restored. * gcc.target/aarch64/sve/pcs/saves_2_be_wrap.c: Likewise. * gcc.target/aarch64/sve/pcs/saves_2_le_nowrap.c: Likewise. * gcc.target/aarch64/sve/pcs/saves_2_le_wrap.c: Likewise. * gcc.target/aarch64/sve/pcs/saves_4_be.c: Likewise. * gcc.target/aarch64/sve/pcs/saves_4_le.c: Likewise. * gcc.target/aarch64/sve/pcs/saves_5_be.c: Likewise. * gcc.target/aarch64/sve/pcs/saves_5_le.c: Likewise. * gcc.target/aarch64/sve/pcs/stack_clash_1.c (test_1): Likewise. (test_2): Remove p12-p15 from the clobber list. * gcc.target/aarch64/sve/pcs/stack_clash_1_128.c (test_1): Expect p12-p15 to be saved and restored. (test_2): Remove p12-p15 from the clobber list. * gcc.target/aarch64/sve/pcs/stack_clash_1_256.c (test_1): Expect p12-p15 to be saved and restored. (test_2): Remove p12-p15 from the clobber list. (test_4): Expect only 16 bytes of stack to be allocated for the predicate save slot. * gcc.target/aarch64/sve/pcs/stack_clash_1_512.c (test_1): Expect p12-p15 to be saved and restored. (test_2): Remove p12-p15 from the clobber list. (test_4): Expect only 16 bytes of stack to be allocated for the predicate save slot. * gcc.target/aarch64/sve/pcs/stack_clash_1_1024.c (test_1): Expect p12-p15 to be saved and restored. (test_2): Remove p12-p15 from the clobber list. (test_4): Expect only 16 bytes of stack to be allocated for the predicate save slot. * gcc.target/aarch64/sve/pcs/stack_clash_1_2048.c (test_1): Expect p12-p15 to be saved and restored. (test_2): Remove p12-p15 from the clobber list. (test_4): Expect only 32 bytes of stack to be allocated for the predicate save slot. * gcc.target/aarch64/sve/pcs/stack_clash_2_256.c: Use z16 rather than p4 to create a vector-sized save slot. * gcc.target/aarch64/sve/pcs/stack_clash_2_512.c: Likewise. * gcc.target/aarch64/sve/pcs/stack_clash_2_1024.c: Likewise. * gcc.target/aarch64/sve/pcs/stack_clash_2_2048.c: Likewise.
Showing
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment