From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CD9833858C3A; Tue, 21 Sep 2021 23:45:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CD9833858C3A From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/102107] protocol register (r12) corrupted before a tail call Date: Tue, 21 Sep 2021 23:45:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.2.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: segher at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2021 23:45:43 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102107 --- Comment #18 from CVS Commits --- The releases/gcc-11 branch has been updated by Segher Boessenkool : https://gcc.gnu.org/g:5210f05c6eba12561914cb0fdf7aec149b28f179 commit r11-9021-g5210f05c6eba12561914cb0fdf7aec149b28f179 Author: Segher Boessenkool Date: Thu Sep 2 16:38:24 2021 +0000 rs6000: Don't use r12 for CR save on ELFv2 (PR102107) CR is saved and/or restored on some paths where GPR12 is already live since it has a meaning in the calling convention in the ELFv2 ABI. It is not completely clear to me that we can always use r11 here, but it does seem save, there is checking code (to detect conflicts here), and it is stage 1. So here goes. 2021-09-03 Segher Boessenkool PR target/102107 * config/rs6000/rs6000-logue.c (rs6000_emit_prologue): On ELFv2= use r11 instead of r12 for CR save, in all cases. (cherry picked from commit 2484f7a4b0f52e6ed04754be336f1fa6fde47f6b)=