Minor tweak to function.c:keep_stack_depressed
Eric Christopher
echristo@redhat.com
Wed Dec 5 12:46:00 GMT 2001
> This is used only by Ada and only on some targets.
>
> Wed Dec 5 06:26:27 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
>
> * function.c (keep_stack_depressed): Refine check for register
> clobbered over call.
>
If you want to check that a function has been clobbered over a call you
should, I believe, only check TEST_HARD_REG_BIT
(regs_invalidated_by_call, no) and not check !fixed_regs[regno] as well.
This will give you false positives. See propagate_one_insn for a similar
check.
-eric
> *** function.c 2001/12/04 09:29:52 1.330 --- function.c 2001/12/05
> 11:27:52
> *************** keep_stack_depressed (seq) *** 7275,7279 ****
> for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
> if (HARD_REGNO_MODE_OK (regno, Pmode)
> ! && !fixed_regs[regno] && call_used_regs[regno]
> && !FUNCTION_VALUE_REGNO_P (regno))
> break;
> --- 7275,7280 ----
> for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
> if (HARD_REGNO_MODE_OK (regno, Pmode)
> ! && !fixed_regs[regno]
> ! && TEST_HARD_REG_BIT (regs_invalidated_by_call, regno)
> && !FUNCTION_VALUE_REGNO_P (regno))
> break;
--
Fridays are not "pants optional"
More information about the Gcc-patches
mailing list