Re: [PATCH 1/2] x86: Add no_callee_saved_registers function attribute

2024-01-22 Thread H.J. Lu
On Sun, Jan 21, 2024 at 8:03 PM Hongtao Liu wrote: > > On Sat, Jan 20, 2024 at 10:30 PM H.J. Lu wrote: > > > > When an interrupt handler is implemented by an assembly stub which does: > > > > 1. Save all registers. > > 2. Call a C function. > > 3. Restore all registers. > > 4. Return from interru

Re: [PATCH 1/2] x86: Add no_callee_saved_registers function attribute

2024-01-21 Thread Hongtao Liu
On Sat, Jan 20, 2024 at 10:30 PM H.J. Lu wrote: > > When an interrupt handler is implemented by an assembly stub which does: > > 1. Save all registers. > 2. Call a C function. > 3. Restore all registers. > 4. Return from interrupt. > > it is completely unnecessary to save and restore any registers

[PATCH 1/2] x86: Add no_callee_saved_registers function attribute

2024-01-20 Thread H.J. Lu
When an interrupt handler is implemented by an assembly stub which does: 1. Save all registers. 2. Call a C function. 3. Restore all registers. 4. Return from interrupt. it is completely unnecessary to save and restore any registers in the C function called by the assembly stub, even if they woul