From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DDB6E385C33A; Fri, 24 Jun 2022 19:19:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DDB6E385C33A From: "ibuclaw at gdcproject dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug d/105413] gdc extended assembler cannot constraints r8 - r15 Date: Fri, 24 Jun 2022 19:19:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: d X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ibuclaw at gdcproject dot org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ibuclaw at gdcproject dot 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: Fri, 24 Jun 2022 19:19:01 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105413 Iain Buclaw changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED --- Comment #2 from Iain Buclaw --- @register attribute has been added, meaning that you can now have the follo= wing as an alternative to your example. --- import gcc.attributes : register; @register("rax") SYSCALL rax =3D ident; // rax - syscall number @register("rdi") size_t rdi =3D arg1; // rdi - arg1 @register("rsi") size_t rsi =3D arg2; // rsi - arg2 @register("rdx") size_t rdx =3D arg3; // rdx - arg3 @register("r10") size_t r10 =3D arg4; // r10 - arg4 asm @nogc nothrow { "syscall" : "=3Dr" (rax) // inputs: : "r" (rax), "r" (rdi), "r" (rsi), "r" (rdx), "r" (r10), "m"( *cast(ubyte*)arg1) // "dummy" input instead of full memory clobb= er // clobers : "rcx", "r11"; // Clobers rax, and rcx and r11. } return rax; --- https://godbolt.org/z/PvnTsea9T=