On Tue, Feb 27, 2024 at 03:57:52PM +0100, Jakub Jelinek wrote:
> On Tue, Feb 27, 2024 at 01:09:09PM +0100, Jakub Jelinek wrote:
> > So, IMHO either revert the changes altogether, or guard on -mcmodel=kernel
> > (but talk to kernel people on linux-toolchains if that is what they actually
> > want).
> 
> Here is a patch which guards this by non-default option, so kernel and other
> users can choose if they want this or not.  On top of the PR114116 patch.
> 
> Only lightly tested so far.

Successfully bootstrapped/regtested on x86_64-linux and i686-linux now.
Ok for trunk (if the PR114116 patch is approved too)?

> 2024-02-27  Jakub Jelinek  <ja...@redhat.com>
> 
>       PR target/38534
>       * config/i386/i386.opt (mnoreturn-no-callee-saved-registers): New
>       option.
>       * config/i386/i386-options.cc (ix86_set_func_type): Don't use
>       TYPE_NO_CALLEE_SAVED_REGISTERS_EXCEPT_BP unless
>       ix86_noreturn_no_callee_saved_registers is enabled.
>       * doc/invoke.texi (-mnoreturn-no-callee-saved-registers): Document.
> 
>       * gcc.target/i386/pr38534-1.c: Add -mnoreturn-no-callee-saved-registers
>       to dg-options.
>       * gcc.target/i386/pr38534-2.c: Likewise.
>       * gcc.target/i386/pr38534-3.c: Likewise.
>       * gcc.target/i386/pr38534-4.c: Likewise.
>       * gcc.target/i386/pr38534-5.c: Likewise.
>       * gcc.target/i386/pr38534-6.c: Likewise.
>       * gcc.target/i386/pr114097-1.c: Likewise.
>       * gcc.target/i386/stack-check-17.c: Likewise.

        Jakub

Reply via email to