mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-05 02:38:31 +00:00
Make progress towards aarch64 build
This commit is contained in:
parent
08ff26c817
commit
ca2860947f
15428 changed files with 25694 additions and 23138 deletions
|
@ -25,6 +25,7 @@
|
|||
__msabi extern typeof(GetCurrentThreadId) *const __imp_GetCurrentThreadId;
|
||||
|
||||
privileged int sys_gettid(void) {
|
||||
#ifdef __x86_64__
|
||||
int tid;
|
||||
int64_t wut;
|
||||
if (IsWindows()) {
|
||||
|
@ -61,4 +62,13 @@ privileged int sys_gettid(void) {
|
|||
tid = __pid;
|
||||
}
|
||||
return tid;
|
||||
#elif defined(__aarch64__)
|
||||
register long res_x0 asm("x0");
|
||||
asm volatile("mov\tx8,%1\n"
|
||||
"svc\t0"
|
||||
: "=r"(res_x0)
|
||||
: "i"(178)
|
||||
: "x8", "memory");
|
||||
return res_x0;
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue