public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/114846] powerpc: epilogue in _Unwind_RaiseException corrupts return value due to __builtin_eh_return
Date: Mon, 24 Jun 2024 01:46:35 +0000	[thread overview]
Message-ID: <bug-114846-4-JrhJIdVs14@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114846-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #15 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Kewen Lin <linkw@gcc.gnu.org>:

https://gcc.gnu.org/g:0fd6ae9b20913ab84d596448e14411eedbd324f9

commit r12-10579-g0fd6ae9b20913ab84d596448e14411eedbd324f9
Author: Kewen Lin <linkw@linux.ibm.com>
Date:   Tue May 28 21:13:40 2024 -0500

    rs6000: Don't clobber return value when eh_return called [PR114846]

    As the associated test case in PR114846 shows, currently
    with eh_return involved some register restoring for EH
    RETURN DATA in epilogue can clobber the one which holding
    the return value.  Referring to the existing handlings in
    some other targets, this patch makes eh_return expander
    call one new define_insn_and_split eh_return_internal which
    directly calls rs6000_emit_epilogue with epilogue_type
    EPILOGUE_TYPE_EH_RETURN instead of the previous treating
    normal return with crtl->calls_eh_return specially.

            PR target/114846

    gcc/ChangeLog:

            * config/rs6000/rs6000-logue.cc (rs6000_emit_epilogue): As
            EPILOGUE_TYPE_EH_RETURN would be passed as epilogue_type directly
            now, adjust the relevant handlings on it.
            * config/rs6000/rs6000.md (eh_return expander): Append by calling
            gen_eh_return_internal and emit_barrier.
            (eh_return_internal): New define_insn_and_split, call function
            rs6000_emit_epilogue with epilogue type EPILOGUE_TYPE_EH_RETURN.

    gcc/testsuite/ChangeLog:

            * gcc.target/powerpc/pr114846.c: New test.

    (cherry picked from commit e5fc5d42d25c86ae48178db04ce64d340a834614)

  parent reply	other threads:[~2024-06-24  1:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-25  7:34 [Bug target/114846] New: " pinskia at gcc dot gnu.org
2024-04-25  9:23 ` [Bug target/114846] " linkw at gcc dot gnu.org
2024-04-25  9:25 ` linkw at gcc dot gnu.org
2024-04-25 21:37 ` pinskia at gcc dot gnu.org
2024-04-29  5:20 ` linkw at gcc dot gnu.org
2024-04-29  9:04 ` linkw at gcc dot gnu.org
2024-05-14  8:49 ` linkw at gcc dot gnu.org
2024-05-29  2:15 ` cvs-commit at gcc dot gnu.org
2024-05-29  2:33 ` linkw at gcc dot gnu.org
2024-05-29 12:30 ` bergner at gcc dot gnu.org
2024-05-29 12:50 ` linkw at gcc dot gnu.org
2024-06-21 19:53 ` bergner at gcc dot gnu.org
2024-06-23 19:42 ` segher at gcc dot gnu.org
2024-06-24  1:43 ` cvs-commit at gcc dot gnu.org
2024-06-24  1:45 ` cvs-commit at gcc dot gnu.org
2024-06-24  1:46 ` cvs-commit at gcc dot gnu.org [this message]
2024-06-24  1:49 ` cvs-commit at gcc dot gnu.org
2024-06-24  3:46 ` linkw at gcc dot gnu.org
2024-06-24  3:50 ` linkw at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-114846-4-JrhJIdVs14@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).