diff options
author | comex | 2015-02-24 20:48:40 -0500 |
---|---|---|
committer | comex | 2015-02-24 20:48:40 -0500 |
commit | edb62049bc2b28a6d6d1dd5f56c1f8d777f3b0ca (patch) | |
tree | b717142cb2e601ccb7b9f22884e97b9b5be17c6d /lib | |
parent | fix "panic" in substrate-compat.c (diff) | |
download | substitute-edb62049bc2b28a6d6d1dd5f56c1f8d777f3b0ca.tar.gz |
fix armv7 syscall registers :o
Diffstat (limited to 'lib')
-rw-r--r-- | lib/darwin/manual-syscall.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/darwin/manual-syscall.h b/lib/darwin/manual-syscall.h index f16ec54..9966981 100644 --- a/lib/darwin/manual-syscall.h +++ b/lib/darwin/manual-syscall.h @@ -35,11 +35,16 @@ #ifdef __thumb__ #undef GEN_SYSCALL_PRE #define GEN_SYSCALL_PRE(name) \ - ".thumb_func _manual_" #name "\n" + ".thumb_func _manual_" #name "\n" \ + ".align 2\n" #endif #define GEN_SYSCALL_INNER() \ + "mov r12, sp\n" \ + "push {r4-r6}\n" \ + "ldm r12, {r4-r6}\n" \ "mov r12, #num\n" \ "svc #0x80\n" \ + "pop {r4-r6}\n" \ "bx lr\n" #elif defined(__arm64__) #define GEN_SYSCALL_INNER() \ |