From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BD2643858C5F; Thu, 18 May 2023 15:04:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BD2643858C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684422259; bh=EWOhjp8W/VDp2zQwRmJUpxt6nER+BVVvGOVtzY+hXUk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=n0dQfrlwpaA9Efu1dBgO7KwIX/VYMsvOoNsYegVeX7AtmID5uZul/jCoGBb2mssj8 eVPC+oK7zYLNQNZr0OSZOeyoePPA1vRg/No9tDBKvZmNgir4bzHpFmUQPS584/pxGT 07//DydIFHkZRi9frpGII+k1J5yA4V1nAuaalRco= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/109903] Register misallocation in hand-crafted asm insn, no diagnostics produced Date: Thu, 18 May 2023 15:04:19 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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=3D109903 --- Comment #2 from Andrew Pinski --- That is the inline-asm should be written as: asm ("mrs %[_1], pmccntr_eli0\n" "\tldr x1, [%[_2]]\n" : [_1] "=3D&r" (v) : [_2] "r" (a) : "memory"); Note since a is memory address you are writing to you should also add the memory clobber to the inline-asm.=