This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/79793] Incorrect stack alignment for interrupt handler in 64-bit


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

--- Comment #11 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Uroš Bizjak from comment #9)
> Created attachment 41826 [details]
> Adjust INCOMING_FRAME_SP_OFFSET for TYPE_EXCEPTION functions
> 
> How about something like attached patch? The patch adjusts
> INCOMING_FRAME_SP_OFFSET of an exception handler to 2 * UNITS_PER_WORD.
> 
> The resulting code reads:
> 
>         .cfi_startproc
>         subq    $392, %rsp
>         .cfi_def_cfa_offset 400
>         fxsave64        -120(%rsp)
>         addq    $400, %rsp
>         .cfi_def_cfa_offset 0
>         iretq
>         .cfi_endproc
> 
> Patch is otherwise untested. Probably, function argument parsing code has to
> be adjusted as well. I'm also not sure if all .cfi directives are correct.

Our patches are very similar.  Mine passed most of interrupt tests.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]