public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Segher Boessenkool <segher@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-9022] rs6000: Fix ELFv2 r12 use in epilogue Date: Tue, 21 Sep 2021 23:45:47 +0000 (GMT) [thread overview] Message-ID: <20210921234547.D9B75385841C@sourceware.org> (raw) https://gcc.gnu.org/g:da0a5628d47ee59320dac9787f3232b0911fbc14 commit r11-9022-gda0a5628d47ee59320dac9787f3232b0911fbc14 Author: Segher Boessenkool <segher@kernel.crashing.org> Date: Wed Sep 8 13:10:30 2021 +0000 rs6000: Fix ELFv2 r12 use in epilogue We cannot use r12 here, it is already in use as the GEP (for sibling calls). 2021-09-08 Segher Boessenkool <segher@kernel.crashing.org> PR target/102107 * config/rs6000/rs6000-logue.c (rs6000_emit_epilogue): For ELFv2 use r11 instead of r12 for restoring CR. (cherry picked from commit 86e6268cff328e27ee6f90e2afc35b6f437a25cd) Diff: --- gcc/config/rs6000/rs6000-logue.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/config/rs6000/rs6000-logue.c b/gcc/config/rs6000/rs6000-logue.c index e363d56ecec..9965a8aa691 100644 --- a/gcc/config/rs6000/rs6000-logue.c +++ b/gcc/config/rs6000/rs6000-logue.c @@ -4815,6 +4815,10 @@ rs6000_emit_epilogue (enum epilogue_type epilogue_type) else if (REGNO (frame_reg_rtx) == 12) cr_save_regno = 11; + /* For ELFv2 r12 is already in use as the GEP. */ + if (DEFAULT_ABI == ABI_ELFv2) + cr_save_regno = 11; + cr_save_reg = load_cr_save (cr_save_regno, frame_reg_rtx, info->cr_save_offset + frame_off, exit_func);
reply other threads:[~2021-09-21 23:45 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210921234547.D9B75385841C@sourceware.org \ --to=segher@gcc.gnu.org \ --cc=gcc-cvs@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: linkBe 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).