mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 23:08:31 +00:00
Introduce FreeBSD ARM64 support
It's 100% passing test fleet. Solid as a rock.
This commit is contained in:
parent
43fe5956ad
commit
83107f78ed
455 changed files with 778 additions and 551 deletions
|
@ -83,6 +83,7 @@ static errno_t pthread_setname_impl(struct PosixThread *pt, const char *name) {
|
|||
}
|
||||
return 0;
|
||||
|
||||
#ifdef __x86_64__
|
||||
} else if (IsFreebsd() || IsNetbsd() || IsOpenbsd()) {
|
||||
int ax;
|
||||
if (IsFreebsd()) {
|
||||
|
@ -97,6 +98,16 @@ static errno_t pthread_setname_impl(struct PosixThread *pt, const char *name) {
|
|||
: /* no inputs */
|
||||
: "rcx", "rdx", "r8", "r9", "r10", "r11", "memory");
|
||||
return ax;
|
||||
#endif
|
||||
|
||||
#ifdef __aarch64__
|
||||
} else if (IsFreebsd()) {
|
||||
register int x0 asm("x0") = tid;
|
||||
register long x1 asm("x1") = (long)name;
|
||||
register int x8 asm("x8") = 464; // thr_set_name
|
||||
asm volatile("svc\t0" : "+r"(x0) : "r"(x1), "r"(x8) : "memory");
|
||||
return x0;
|
||||
#endif
|
||||
|
||||
} else {
|
||||
return ENOSYS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue