From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 025BE3858D35; Fri, 5 May 2023 04:53:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 025BE3858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683262398; bh=tFMR0pq+KUvucHvFb2f1jebQd2Gpzai6o+KivkOaVas=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tfwLwR6tV8ff4r+N3lXkaE8HI/6nPLvRP/6EXpbAoxaFhzr0HstQLuaVl35B6fZjo XEgmNdYcfu/EXc2bSIJPEGhQfmYej1FZ/3VW1TspkuQJ4+flkJ4dhmglVFVFIxcA81 nkFIBInT8W+y8XRAy6H5agQbXGvl1uStHTs559bE= From: "i at maskray dot me" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105576] x86: Support a machine constraint to get raw symbol name Date: Fri, 05 May 2023 04:53:17 +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.0 X-Bugzilla-Keywords: inline-asm X-Bugzilla-Severity: normal X-Bugzilla-Who: i at maskray dot me 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: 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=3D105576 --- Comment #6 from Fangrui Song --- (In reply to Hongtao.liu from comment #4) > constraint "i" + "%p0"? >=20 > asm (".pushsection .xxx,\"aw\"; .dc.a %p0; .popsection" :: "i"(addr)); = // > supported on aarch64 and riscv > asm (".pushsection .xxx,\"aw\"; .dc.a %p0; .popsection" :: "i"(&var)); = // > supported on aarch64 It looks like %p0 + "i" doesn't work with -fpie or -fpic... void k(); void foo() { asm("call %p0" :: "i"(k)); }=