From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F35493858C2A; Tue, 12 Dec 2023 09:22:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F35493858C2A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1702372936; bh=b8XGZQleJgr6Otd/ggFp4WO/Dmr2D4irlwOhO+6CDec=; h=From:To:Subject:Date:From; b=sjUqfH5Zu9EskN9Tpj/GeCpY5nws+/VWtj69jHhFXpl2ixi1VlIvrpLEk/yniNhCk L7gGX3Aek6LdgNEwgKYr1n5jgAodjck4WqUTF+zoEgRpexMmXE6SCzk3VWQd0wdB06 oCnDtcgdPXscEXORCLnwIz5/w/T//5bdsn5quWxU= From: "naveen at kernel dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/112980] New: 64-bit powerpc ELFv2 does not allow nops to be generated before function global entry point Date: Tue, 12 Dec 2023 09:22:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: naveen at kernel dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D112980 Bug ID: 112980 Summary: 64-bit powerpc ELFv2 does not allow nops to be generated before function global entry point Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: naveen at kernel dot org Target Milestone: --- Bug 99888 addressed issue with -fpatchable-function-entry not generating no= ps at function local entry point with ppc64le ELFv2. However, the change also meant that there is now no way to request for nops to be generated _before_= the function global entry point. This is problematic if we only want to have two nops generated for storing a 64-bit value. With the current implementation of -fpatchable-function-entry= , we are forced to emit at least 6 nops due to ABI restrictions on the number of instructions between GEP and LEP. This is required to support Linux kernel features such as DYNAMIC_FTRACE_WITH_CALL_OPS [1]. Furthermore, it may be desirable to generate nops before the function entry point so as to minimize icache usage with functions entered through the global entry point. Please consider adding an option to allow nops to be generated before the global entry point. [1] https://lore.kernel.org/all/20230123134603.1064407-2-mark.rutland@arm.c= om/=