From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3763F3857020; Wed, 4 Nov 2020 17:56:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3763F3857020 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug inline-asm/97708] Inline asm does not use the local register asm specified with register ... asm() as input Date: Wed, 04 Nov 2020 17:56:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: inline-asm X-Bugzilla-Version: unknown X-Bugzilla-Keywords: documentation X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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: resolution bug_status 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2020 17:56:17 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97708 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|REOPENED |RESOLVED --- Comment #22 from Jakub Jelinek --- (In reply to Segher Boessenkool from comment #21) > register float foo asm ("xmm0") =3D 0.99f; >=20 > asm volatile("movl %0, %%r8d\n\t" > "vmcall\n\t" > :: "g" (foo)); >=20 > The user said operands[0] should go in xmm0, but that hard reg is not > valid for its constraint. No, the user didn't say that. The user said put foo into something that matches the "g" constraint. The compiler did. As documented, the register in which the var lives will (and can) be only satisfied if the constraint allows that register.=