diff -NurpP --minimal dietlibc-0.28-orig/libcompat/syscall.S dietlibc-0.28-syscall/libcompat/syscall.S --- dietlibc-0.28-orig/libcompat/syscall.S 2004-03-28 02:13:43.000000000 -0600 +++ dietlibc-0.28-syscall/libcompat/syscall.S 2005-04-09 13:38:50.000000000 -0500 @@ -77,5 +77,27 @@ syscall: cmp.eq p6,p0=-1,r10 (p6) br __error_unified_syscall br.ret.sptk.few rp +#elif (defined(__x86_64__)) + mov %rdi, %rax + mov %rsi, %rdi + mov %rdx, %rsi + mov %rcx, %rdx + mov %r8, %r10 + mov %r9, %r8 + mov 0x8(%rsp), %r9 + syscall + cmp $0xfffffffffffff001,%rax + jb .Lret +#ifdef __DYN_LIB + mov %rax, %rdx + // call __errno_location + // mov %rdx, (%rax) +#else + mov %rax, errno +#endif + xor %rax, %rax + dec %rax +.Lret: + retq #endif .size syscall, . - syscall