diff --git a/arch/x86_64.c b/arch/x86_64.c index 70f2589..1212137 100644 --- a/arch/x86_64.c +++ b/arch/x86_64.c @@ -55,7 +55,7 @@ uint32_t fork() { int32_t openat(int32_t fd, const char* filename, uint32_t flags, uint32_t mode) { int32_t file; asm volatile ( - "mov %%r10, %5\n" + "mov %5, %%r10\n" "syscall\n" : "=a"(file) : "a"(SYS_OPENAT), "D"(fd), "S"(filename), "d"(flags), "r"((uint64_t)mode) // RDI, RSI, RDX are used in x86-64 for write args