On 02/05/2016 12:50 PM, Jakub Jelinek wrote: > On Fri, Feb 05, 2016 at 12:43:38PM +0100, Andreas Krebbel wrote: >> Dominik just made me aware of this stupid copy and paste bug which made me >> ending up with the very >> same loops twice :( >> I've committed the attached patch to fix this: >> >> diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c >> index 1667c11..2cf7096 100644 >> --- a/gcc/config/s390/s390.c >> +++ b/gcc/config/s390/s390.c >> @@ -9326,10 +9326,6 @@ s390_register_info_set_ranges () >> for (j = 15; j > i && cfun_gpr_save_slot (j) != SAVE_SLOT_STACK; j--); >> cfun_frame_layout.first_restore_gpr = (i == 16) ? -1 : i; >> cfun_frame_layout.last_restore_gpr = (i == 16) ? -1 : j; >> - >> - /* Now the range of GPRs which need saving. */ >> - for (i = 0; i < 16 && cfun_gpr_save_slot (i) != SAVE_SLOT_STACK; i++); >> - for (j = 15; j > i && cfun_gpr_save_slot (j) != SAVE_SLOT_STACK; j--); >> cfun_frame_layout.first_save_gpr = (i == 16) ? -1 : i; >> cfun_frame_layout.last_save_gpr = (i == 16) ? -1 : j; >> } > > Thus > cfun_frame_layout.first_save_gpr = cfun_frame_layout.first_restore_gpr; > cfun_frame_layout.last_save_gpr = cfun_frame_layout.last_restore_gpr; erm, right
> ? Are those supposed to be equivalent just here, or everywhere? They will differ if vararg is being used. -Andreas-