public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Mike Stump <mikestump@comcast.net>
Cc: Yulia Koval <vaalfreja@gmail.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
		Uros Bizjak <ubizjak@gmail.com>
Subject: Re: [PATCH] x86 interrupt attribute
Date: Wed, 30 Sep 2015 01:34:00 -0000	[thread overview]
Message-ID: <CAMe9rOoig1gcjaQLqCAE4o3OehBBgkCwN2wHDatqB=QhykEp6A@mail.gmail.com> (raw)
In-Reply-To: <1D91C2C8-833D-4F6D-9C57-C22D61662A83@comcast.net>

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.

  reply	other threads:[~2015-09-30  0:02 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-29 14:21 Yulia Koval
2015-09-29 19:49 ` Mike Stump
2015-09-29 20:30   ` H.J. Lu
2015-09-29 21:49     ` H.J. Lu
2015-09-29 22:10       ` Mike Stump
2015-09-29 22:11         ` Mike Stump
2015-09-29 22:13         ` H.J. Lu
2015-09-30  0:47           ` Mike Stump
2015-09-30  1:34             ` H.J. Lu [this message]
2015-09-30  5:50               ` H.J. Lu
2015-09-30 12:41                 ` Yulia Koval
2015-09-30 13:02                   ` H.J. Lu
2015-09-30 18:48                     ` Yulia Koval
2015-09-30 19:08                   ` H.J. Lu
2015-09-30 21:31                     ` Yulia Koval
2015-09-30 21:39                       ` H.J. Lu
2015-10-01  0:24                       ` H.J. Lu
2015-10-01 12:34                         ` Yulia Koval
2015-10-01 15:59                         ` Uros Bizjak
2015-10-01 16:08                           ` H.J. Lu
2015-10-01 16:18                             ` Uros Bizjak
2015-10-02 12:51                               ` Yulia Koval
2015-10-02 15:45                                 ` Uros Bizjak
2015-10-02 17:48                                   ` Yulia Koval
2015-10-04  5:24                                     ` Yulia Koval
2015-10-04 10:29                                       ` Uros Bizjak
2015-10-04 18:15                                         ` H.J. Lu
2015-10-04 20:01                                           ` Uros Bizjak
2015-10-04 20:51                                             ` H.J. Lu
2015-10-04 21:07                                               ` Uros Bizjak
2015-10-04 23:17                                                 ` H.J. Lu
2015-10-05  9:29                                                   ` Uros Bizjak
2015-10-13 12:18                                                     ` Yulia Koval
2015-10-20 13:25                                                       ` Yulia Koval
2015-10-23 13:13                                                         ` Yulia Koval
2015-11-06 14:08                                                           ` Yulia Koval
2015-11-06 15:31                                                             ` Uros Bizjak
2015-11-06 22:19                                                               ` H.J. Lu
2015-11-07  4:50                                                                 ` Jeff Law
2015-10-05  9:00                                           ` Mike Stump
2015-09-29 22:10     ` Mike Stump
2015-09-29 23:08       ` H.J. Lu
2015-09-29 23:54         ` H.J. Lu
2015-09-30  2:45           ` Mike Stump
2015-09-30  5:21             ` H.J. Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMe9rOoig1gcjaQLqCAE4o3OehBBgkCwN2wHDatqB=QhykEp6A@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mikestump@comcast.net \
    --cc=ubizjak@gmail.com \
    --cc=vaalfreja@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).