diff options
Diffstat (limited to 'newlib/libc/include/machine/setjmp.h')
-rw-r--r-- | newlib/libc/include/machine/setjmp.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/newlib/libc/include/machine/setjmp.h b/newlib/libc/include/machine/setjmp.h index 29b76cec1..e3534e18d 100644 --- a/newlib/libc/include/machine/setjmp.h +++ b/newlib/libc/include/machine/setjmp.h @@ -304,6 +304,35 @@ _BEGIN_STD_C #define _JBLEN 8 #endif +#ifdef __XTENSA__ +#if __XTENSA_WINDOWED_ABI__ + +/* The jmp_buf structure for Xtensa windowed ABI holds the following + (where "proc" is the procedure that calls setjmp): 4-12 registers + from the window of proc, the 4 words from the save area at proc's $sp + (in case a subsequent alloca in proc moves $sp), and the return + address within proc. Everything else is saved on the stack in the + normal save areas. The jmp_buf structure is: + + struct jmp_buf { + int regs[12]; + int save[4]; + void *return_address; + } + + See the setjmp code for details. */ + +/* sizeof(struct jmp_buf) */ +#define _JBLEN 17 + +#else /* __XTENSA_CALL0_ABI__ */ + +/* a0, a1, a12, a13, a14, a15 */ +#define _JBLEN 6 + +#endif /* __XTENSA_CALL0_ABI__ */ +#endif /* __XTENSA__ */ + #ifdef __mep__ /* 16 GPRs, pc, hi, lo */ #define _JBLEN 19 |