From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B627A385F02A; Thu, 25 Aug 2022 19:35:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B627A385F02A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1661456133; bh=yDm24FIgQNKsup351hRSCYaJsKjs5RmZO4Kf7l2SO1c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=AQeMqF5e2RnKnrcR+IkC6W6mr5LntdLC2ZR4PTxjDq3v3k0hdHF5kjvb+oS2bsJPD Yo6VY6q1aSiy5XNX/qv3Q0ObUssEVKxrb5nhkebu7f1pYgGH7H17XhbHgkNopPvktQ NA/43pp5zflA0tAcUwTma27Ew44KL96kQZcF2uwA= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106743] Illegal assembly code with -march=skylake Date: Thu, 25 Aug 2022 19:35: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: 12.1.0 X-Bugzilla-Keywords: inline-asm 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: bug_status resolution 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=3D106743 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #2 from Andrew Pinski --- The inline-asm is wrong. It should be: __asm__("xchgb %b0, %h0 ## %0 " : "=3DQ"(__tmp) : "0"(__tmp= )); q Any register accessible as rl. In 32-bit mode, a, b, c, and d; in 64-bit mo= de, any integer register. Q Any register accessible as rh: a, b, c, and d. Because you are accessing it as rh so you need to Q rather than q.=