Get llama.com working on aarch64

This commit is contained in:
Justine Tunney 2023-05-09 22:41:57 -07:00
parent 4c093155a3
commit a0237a017c
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
19 changed files with 321 additions and 157 deletions

View file

@ -27,6 +27,7 @@
int sys_set_tls();
void __set_tls(struct CosmoTib *tib) {
tib = __adj_tls(tib);
#ifdef __x86_64__
// ask the operating system to change the x86 segment register
int ax, dx;
@ -58,6 +59,6 @@ void __set_tls(struct CosmoTib *tib) {
"d"((uint32_t)(val >> 32)));
}
#else
asm volatile("msr\ttpidr_el0,%0" : /* no outputs */ : "r"(tib + 1));
asm volatile("msr\ttpidr_el0,%0" : /* no outputs */ : "r"(tib));
#endif
}