[haiku-commits] r38993 - in haiku/trunk: headers/posix/arch/arm src/system/libroot/posix/arch/arm

Author: ithamar
Date: 2010-10-18 02:50:59 +0200 (Mon, 18 Oct 2010)
New Revision: 38993
Changeset: http://dev.haiku-os.org/changeset/38993

Modified:
   haiku/trunk/headers/posix/arch/arm/arch_setjmp.h
   haiku/trunk/src/system/libroot/posix/arch/arm/sigsetjmp.S
Log:
* Fix setjmp/jmpbuf_t size so we can finally get to the KDL prompt

Modified: haiku/trunk/headers/posix/arch/arm/arch_setjmp.h
===================================================================
--- haiku/trunk/headers/posix/arch/arm/arch_setjmp.h    2010-10-17 22:12:30 UTC 
(rev 38992)
+++ haiku/trunk/headers/posix/arch/arm/arch_setjmp.h    2010-10-18 00:50:59 UTC 
(rev 38993)
@@ -5,8 +5,7 @@
 #ifndef _ARCH_SETJMP_H_
 #define _ARCH_SETJMP_H_
 
-#define _SETJMP_BUF_SZ (7+6+2+8*((96/8)/4))
+#define _SETJMP_BUF_SZ ((15+2)*4)
 typedef int __jmp_buf[_SETJMP_BUF_SZ];
-#warning ARM: fix jmpbuf size
 
 #endif /* _ARCH_SETJMP_H_ */

Modified: haiku/trunk/src/system/libroot/posix/arch/arm/sigsetjmp.S
===================================================================
--- haiku/trunk/src/system/libroot/posix/arch/arm/sigsetjmp.S   2010-10-17 
22:12:30 UTC (rev 38992)
+++ haiku/trunk/src/system/libroot/posix/arch/arm/sigsetjmp.S   2010-10-18 
00:50:59 UTC (rev 38993)
@@ -10,6 +10,7 @@
 /* int sigsetjmp(jmp_buf buffer, int saveMask) */
 FUNCTION(__sigsetjmp):
 FUNCTION(sigsetjmp):
+       stmdb   sp!, {r4, lr}
         stmia   r0, {r0-r14}
         str     lr,[r0, #60]
         mrs     r1,cpsr
@@ -18,19 +19,21 @@
         mov     r0, #0
 
        bl              __setjmp_save_sigs
+       ldmia   sp!, {r4, pc}
 FUNCTION_END(__sigsetjmp)
 FUNCTION_END(sigsetjmp)
 
 
 /* int setjmp(jmp_buf buffer) */
 FUNCTION(setjmp):
+       stmdb   sp!, {r4, lr}
         stmia   r0, {r0-r14}
         str     lr,[r0, #60]
         mrs     r1,cpsr
         str     r1,[r0,#64]
         ldr     r1,[r0,#4]
         mov     r0, #0
-       bl      __sigsetjmp
+       ldmia   sp!, {r4, pc}
 FUNCTION_END(setjmp)
 
 #pragma weak _setjmp=setjmp


Other related posts: