public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/113312] New: Update __attribute__((interrupt)) for Intel FRED
Date: Wed, 10 Jan 2024 16:28:27 +0000	[thread overview]
Message-ID: <bug-113312-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113312

            Bug ID: 113312
           Summary: Update __attribute__((interrupt)) for Intel FRED
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: crazylht at gmail dot com, hpa at zytor dot com
  Target Milestone: ---
            Target: x86-64

__attribute__((interrupt)) should be updated for Intel Flexible Return and
Event
Delivery (FRED):

1. FRED was never intended to be used without an assembly stub, as the
distinction
between ERETU and ERETS comes from the entry point chosen, and the FRED entry
points
are designed to be large enough to have an initial assembly stub to save and
restore
whatever registers the user wishes.
2. Event info layout on incoming stack is the same for all events.  Event type
is
encoded in the event info.

The FRED attribute:

1. Don't preserve ANY registers. Assembly stubs are responsible to save and
restore any registers if needed.
2. Use the normal RET to go to the assembly stub which will restore registers
and return with ERETU or ERETS as appropriate.
3. Assuming the assembly stubs save registers on incoming stack, the assembly
stub must set up RDI pointing to the event info on incoming stack.

             reply	other threads:[~2024-01-10 16:28 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-10 16:28 hjl.tools at gmail dot com [this message]
2024-01-11  1:39 ` [Bug target/113312] " hpa at zytor dot com
2024-01-11  1:48 ` hjl.tools at gmail dot com
2024-01-11  2:10 ` hpa at zytor dot com
2024-01-11  2:10 ` hpa at zytor dot com
2024-01-11  2:19 ` hjl.tools at gmail dot com
2024-01-11  2:35 ` hpa at zytor dot com
2024-01-11  4:09 ` hjl.tools at gmail dot com
2024-01-11  4:10 ` hjl.tools at gmail dot com
2024-01-11  4:11 ` hjl.tools at gmail dot com
2024-01-11  5:29 ` hpa at zytor dot com
2024-01-11  5:38 ` liuhongt at gcc dot gnu.org
2024-01-11 15:47 ` fw at gcc dot gnu.org
2024-01-11 15:55 ` hpa at zytor dot com
2024-01-12  1:00 ` hjl.tools at gmail dot com
2024-01-12  1:25 ` hpa at zytor dot com
2024-01-12  4:31 ` hjl.tools at gmail dot com
2024-01-13  5:03 ` hjl.tools at gmail dot com
2024-01-13 18:25 ` hjl.tools at gmail dot com
2024-01-13 20:02 ` hpa at zytor dot com
2024-01-13 20:22 ` hjl.tools at gmail dot com
2024-01-13 20:51 ` hpa at zytor dot com
2024-01-18  6:42 ` [Bug target/113312] Add __attribute__((no_callee_saved_registers)) " xin at zytor dot com
2024-01-18 13:01 ` hjl.tools at gmail dot com
2024-01-19  6:23 ` xin at zytor dot com
2024-01-19  6:25 ` xin at zytor dot com
2024-01-19 13:40 ` hjl.tools at gmail dot com
2024-01-27 12:19 ` cvs-commit at gcc dot gnu.org

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=bug-113312-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).