[PATCH] x86 interrupt attribute
H.J. Lu
hjl.tools@gmail.com
Wed Sep 30 01:34:00 GMT 2015
On Tue, Sep 29, 2015 at 4:53 PM, Mike Stump <mikestump@comcast.net> wrote:
> On Sep 29, 2015, at 3:10 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Tue, Sep 29, 2015 at 2:23 PM, Mike Stump <mikestump@comcast.net> wrote:
>>> On Sep 29, 2015, at 1:59 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>>> commit f3a6675a8d69d810d2cad0c090a762094a0a8622
>>>> Author: H.J. Lu <hjl.tools@gmail.com>
>>>> Date: Tue Sep 29 13:47:18 2015 -0700
>>>>
>>>> Define EPILOGUE_USES in i386 so that all preserved registers are used
>>>> by the epilogue of interrupt handler. Don't explicitly mark BP and SP
>>>> registers as used since they are always used in epilogue.
>>>>
>>>> Please take a look.
>>>
>>> Oh, too bad you didn’t copy it here. The easiest thing to blow is the addition of reload_completed && on the condition
>
>
>> static bool
>> ix86_save_reg (unsigned int regno, bool maybe_eh_return)
>> {
>> /* In interrupt handler, we don't preserve MMX and x87 registers
>> which aren't supported when saving and restoring registers. No
>> need to preserve callee-saved registers unless they are modified.
>> We also preserve all caller-saved registers if a function call
>> is made in interrupt handler since the called function may change
>> them. Don't explicitly save BP and SP registers since they are
>> always preserved. */
>> if (cfun->machine->is_interrupt)
>> return ((df_regs_ever_live_p (regno)
>> || (call_used_regs[regno] && cfun->machine->make_calls))
>> && !fixed_regs[regno]
>> && !STACK_REGNO_P (regno)
>> && !MMX_REGNO_P (regno)
>> && regno != BP_REG
>> && regno != SP_REG
>> && (regno <= ST7_REG || regno >= XMM0_REG));
>>
>> Is this sufficient?
>
> I see no string "reload_completed &&”. Either, you need it here, or, you need it in the caller.
Do you have a testcase to show its impact?
Thanks.
--
H.J.
More information about the Gcc-patches
mailing list