a C standard library for fx Casio calculators
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
591 B

#ifndef __BITS_SETJMP_H__
# define __BITS_SETJMP_H__
#include <stddef.h>
#include <stdint.h>
** Custom(?) jmp_buf struct
** @note: save only r8 ~ r15 and SR / PC registers
** The SR register is saved first because the longjump can be involved with
** different register bank. So to avoid this, it's more simple to restore the
** saved SR first then restore all register (see <src/setjmp/longjmp.S>)
** TODO: save process signal mask ?
struct __jmp_buf
uint32_t sr;
uint32_t reg[8];
uint32_t gbr;
uint32_t macl;
uint32_t mach;
uint32_t pr;
#endif /*__BITS_SETJMP_H__*/