X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/3f7af3d89b0bf98436f4e200dbd91b0de6038c0a..3b2a1fe8d3d02703ddca1b0ead469074d4e47820:/sys.subproj/ppc.subproj/_setjmp.h diff --git a/sys.subproj/ppc.subproj/_setjmp.h b/sys.subproj/ppc.subproj/_setjmp.h index e97255c..8a78817 100644 --- a/sys.subproj/ppc.subproj/_setjmp.h +++ b/sys.subproj/ppc.subproj/_setjmp.h @@ -28,6 +28,14 @@ * */ +/* NOTE: jmp_bufs are only 4-byte aligned. This means we + * need to pad before the VR and FPR save areas, so that they + * can be naturally aligned in the buffer. In case a jmp_buf + * is bcopy'd to a different alignment between the setjmp + * and longjmp, we need to save the jmp_buf address in the + * jmp_buf at setjmp time, so we can realign before reloading. + */ + #define JMP_r1 0x00 #define JMP_r2 0x04 #define JMP_r13 0x08 @@ -55,3 +63,13 @@ #define JMP_xer 0x60 #define JMP_sig 0x64 #define JMP_SIGFLAG 0x68 +#define JMP_flags 0x6c +#define JMP_vrsave 0x70 +#define JMP_addr_at_setjmp 0x74 +/* 12 bytes padding here */ +#define JMP_vr_base_addr 0x84 +/* save room for 12 VRs (v20-v31), or 0xC0 bytes */ +#define JMP_fp_base_addr 0x144 +/* save room for 18 FPRs (f14-f31), or 0x90 bytes */ +#define JMP_buf_end 0x1d4 +