From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0E8693858C54; Tue, 6 Feb 2024 18:50:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0E8693858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707245416; bh=g7dYfCbeTu3EOh7GPhs+1b1rT0sEAu1bEid+zTEuQps=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mXCIPSUmTq6RT0FP2fCWWgd2086XBhI/AkwAg421aMcWeaxg5K9PyJYj1ao1N0OOH N3OspTyil+u4c+nMqhsRU6DagseQ5VCoDkZW/gJqeNHdxDeT85u4QjWtQy/HJI+aIO vZpmnH4/hGjJwM0IBHIRxuyE81R5YL8OQthWNpWs= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113689] [11/12/13/14 Regression] wrong code with -fprofile -mcmodel=large when needing drap register since r11-6548 Date: Tue, 06 Feb 2024 18:50:15 +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: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113689 --- Comment #10 from Jakub Jelinek --- (In reply to H.J. Lu from comment #9) > Like this? >=20 > diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc > index f02c6c02ac6..ed0b0e19985 100644 > --- a/gcc/config/i386/i386.cc > +++ b/gcc/config/i386/i386.cc > @@ -22785,10 +22785,10 @@ x86_64_select_profile_regnum (bool r11_ok > ATTRIBUTE_UNUSED) > && !REGNO_REG_SET_P (reg_live, i)))) > return i; >=20=20 > - sorry ("no register available for profiling %<-mcmodel=3Dlarge%s%>", > + sorry ("no register available for profiling %<-mcmodel=3Dlarge%s%>, use > r10", > ix86_cmodel =3D=3D CM_LARGE_PIC ? " -fPIC" : ""); >=20=20 > - return INVALID_REGNUM; > + return R10_REG; > } >=20=20 > /* Output assembler code to FILE to increment profiler label # LABELNO Just the second hunk. I think with sorry call the compilation fails, so wh= at you actually emit doesn't matter (one can see it with -pipe, sure).=