Support thread local storage

This commit is contained in:
Justine Tunney 2022-05-16 13:20:08 -07:00
parent 91ee2b19d4
commit 55de4ca6b5
197 changed files with 1483 additions and 874 deletions

View file

@ -126,7 +126,9 @@ systemfive_error:
.endfn systemfive_error,globl,hidden
#endif
systemfive_errno:
mov %eax,errno(%rip) # normalize to c library convention
xchg %eax,%ecx
.errno
mov %ecx,(%rax) # normalize to c library convention
push $-1 # negative one is only error result
pop %rax # the push pop is to save code size
ret