path: root/src/signal/arm/sigsetjmp.s
diff options
authorRich Felker <>2012-07-02 22:49:25 -0400
committerRich Felker <>2012-07-02 22:49:25 -0400
commite6129e6d836e5f4725d9b14ba7457b32e24adc61 (patch)
treed63d9d8c594139e14cbea7ffbfeeb7e836d0ca5b /src/signal/arm/sigsetjmp.s
parent8e26a591d059382cd28b96e457ede2fe07c550c7 (diff)
fix sigsetjmp on arm (needs asm)
no idea why gcc refuses to compile the C code to use a tail call, but it's best to use asm anyway so we don't have to rely on the quality of the compiler's optimizations for correct code.
Diffstat (limited to 'src/signal/arm/sigsetjmp.s')
1 files changed, 13 insertions, 0 deletions
diff --git a/src/signal/arm/sigsetjmp.s b/src/signal/arm/sigsetjmp.s
new file mode 100644
index 00000000..acb0301e
--- /dev/null
+++ b/src/signal/arm/sigsetjmp.s
@@ -0,0 +1,13 @@ sigsetjmp
+.type sigsetjmp,%function
+ str a2,[a1,#256]
+ tst a2,a2
+ beq setjmp
+ push {a1,lr}
+ add a3,a1,#260
+ mov a2,#0
+ mov a1,#2
+ bl sigprocmask
+ pop {a1,lr}
+ b setjmp