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 via email to