[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Error compiling musl (_Complex not supported): Waitin
From: |
Brian Mayer |
Subject: |
Re: [Tinycc-devel] Error compiling musl (_Complex not supported): Waiting for a release |
Date: |
Sun, 24 Nov 2024 17:51:59 -0300 |
Hello again.
> Very long ago I did similar tries. As a workaround, I rewrote the
> syscall wrapper in musl[1].
>
> For the reason, I think there's something wrong in x86-64 asm constraint
> computation, since r10 is always in a register. satisfying the
> constraint.
>
> Cheers,
> Yao Zi
Thanks for the help, but It didn't work, I got the same error message.
But I wasn't able to apply your change in exactly the same way,
because I didn't find the file src/internal/x86_64/syscall.S, so I
changed the file arch/x86_64/syscall_arch.h to add your assembly. So
the function becomes:
static __inline long __syscall6(long n, long a1, long a2, long a3,
long a4, long a5, long a6)
{
unsigned long ret;
__asm__ __volatile__ (
"movq %%rdi, %%rax\n"
"movq %%rsi, %%rdi\n"
"movq %%rdx, %%rsi\n"
"movq %%rcx, %%rdx\n"
"movq %%r8, %%r10\n"
"movq %%r9, %%r8\n"
"movq 8(%%rsp), %%r9\n"
"syscall\n"
: "=a"(ret)
: "r"(n), "r"(a1), "r"(a2),
"r"(a3), "r"(a4), "r"(a5), "r"(a6)
: "rcx", "r11", "memory" // clobbers: rcx, r11
); // <- line 69
return ret;
}
I got the same error but now in line 69. Is this function correct?
Thanks.