mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 07:18:30 +00:00
Improve aarch64 native support some more
This change introduces partial support for automating remote testing of aarch64 binaries on Raspberry Pi and Apple Silicon.
This commit is contained in:
parent
fc34ba2596
commit
4aa1d09b9e
20 changed files with 185 additions and 82 deletions
|
@ -26,22 +26,20 @@ CheckStackIsAligned:
|
|||
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
|
||||
// allocate sixteen bytes
|
||||
push %rax
|
||||
push %rax
|
||||
|
||||
// put a value in it
|
||||
xorps %xmm0,%xmm0
|
||||
movaps %xmm0,-16(%rbp)
|
||||
|
||||
leave
|
||||
test $15,%rsp
|
||||
jz 1f
|
||||
int3 // misaligned stack trap
|
||||
1: pop %rbp
|
||||
ret
|
||||
|
||||
#elif defined(__aarch64__)
|
||||
|
||||
// TODO: support me
|
||||
mov x0,#1
|
||||
stp x29,x30,[sp,#-16]!
|
||||
mov x29,sp
|
||||
and x0,x29,#15
|
||||
cbz x0,1f
|
||||
brk #666 // misaligned stack trap
|
||||
1: ldp x29,x30,[sp],#16
|
||||
ret
|
||||
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue