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