public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ibuclaw at gdcproject dot org" <gcc-bugzilla@gcc.gnu.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 [thread overview] Message-ID: <bug-105413-4-skacIqk0J9@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-105413-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105413 Iain Buclaw <ibuclaw at gdcproject dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED --- Comment #2 from Iain Buclaw <ibuclaw at gdcproject dot org> --- @register attribute has been added, meaning that you can now have the following as an alternative to your example. --- import gcc.attributes : register; @register("rax") SYSCALL rax = ident; // rax - syscall number @register("rdi") size_t rdi = arg1; // rdi - arg1 @register("rsi") size_t rsi = arg2; // rsi - arg2 @register("rdx") size_t rdx = arg3; // rdx - arg3 @register("r10") size_t r10 = arg4; // r10 - arg4 asm @nogc nothrow { "syscall" : "=r" (rax) // inputs: : "r" (rax), "r" (rdi), "r" (rsi), "r" (rdx), "r" (r10), "m"( *cast(ubyte*)arg1) // "dummy" input instead of full memory clobber // clobers : "rcx", "r11"; // Clobers rax, and rcx and r11. } return rax; --- https://godbolt.org/z/PvnTsea9T
next prev parent reply other threads:[~2022-06-24 19:19 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-04-27 23:13 [Bug d/105413] New: " witold.baryluk+gcc at gmail dot com 2022-06-24 18:55 ` [Bug d/105413] " cvs-commit at gcc dot gnu.org 2022-06-24 19:19 ` ibuclaw at gdcproject dot org [this message] 2022-10-08 20:08 ` witold.baryluk+gcc at gmail dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-105413-4-skacIqk0J9@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).