This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/79793] Incorrect stack alignment for interrupt handler in 64-bit
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 25 Jul 2017 11:49:50 +0000
- Subject: [Bug target/79793] Incorrect stack alignment for interrupt handler in 64-bit
- Auto-submitted: auto-generated
- References: <bug-79793-4@http.gcc.gnu.org/bugzilla/>
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.