From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F306B3858D33; Tue, 6 Feb 2024 18:42:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F306B3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707244953; bh=63vgYtI59nJvmPjZTuNknJQsOoBURJiXzV1re4hpRpQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=dBlMp0MgYGFTSCw8Z6kOiPwmSYiQqGIwGH07cvcjfQlq3DulVB2AC4YPvMBrjDzR2 icvDRuzEg/dscS2gN60GyqaDmikYFoWwj6bxlJGjdzeQReCBLTXVxfkR2OEdy23V1q qdk9IsVbHdJKUpyS15/Ec69Tx4tmZnVOeErCbyHA= From: "hjl.tools at gmail dot com" 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:42:33 +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: hjl.tools at gmail dot com 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 #9 from H.J. Lu --- Like this? 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; - 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" : ""); - return INVALID_REGNUM; + return R10_REG; } /* Output assembler code to FILE to increment profiler label # LABELNO=