]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/i386/setjmp.h
xnu-792.10.96.tar.gz
[apple/xnu.git] / bsd / i386 / setjmp.h
index 4d7ba1573386e02a41b05f9172ca2dd9a219cf21..a9d64e0547289b164733c5ea8e3101bc75335650 100644 (file)
 #include <sys/cdefs.h>
 #include <machine/signal.h>
 
+
+#if defined(__x86_64__)
+/*
+ * _JBLEN is number of ints required to save the following:
+ * rflags, rip, rbp, rsp, rbx, r12, r13, r14, r15... these are 8 bytes each
+ * mxcsr, fp control word, sigmask... these are 4 bytes each
+ * add 16 ints for future expansion needs...
+ */
+#define _JBLEN ((9 * 2) + 3 + 16)
+typedef int jmp_buf[_JBLEN];
+typedef int sigjmp_buf[_JBLEN + 1];
+
+#else
+
 /*
  * _JBLEN is number of ints required to save the following:
  * eax, ebx, ecx, edx, edi, esi, ebp, esp, ss, eflags, eip,
@@ -48,6 +62,7 @@ typedef int jmp_buf[_JBLEN];
 typedef int sigjmp_buf[_JBLEN + 1];
 #endif
 
+#endif
 
 __BEGIN_DECLS
 extern int setjmp(jmp_buf env);