6 ! This code was based on the equivalent code in NetBSD
9 #include <machine/asm.h>
10 #include <machine/trap.h>
13 ! The jmp_buf contains the following entries:
19 st %sp,[%o0+0] ! Callers stack pointer
20 st %o7,[%o0+4] ! Return pc
21 st %fp,[%o0+8] ! Frame pointer
26 sub %sp, 64, %sp ! set up a local stack frame
28 t ST_FLUSHWIN ! flush register windows out to memory
30 ! We restore the saved stack pointer to %fp, then issue
31 ! a restore instruction which will reload the register
32 ! window from the stack.
34 ld [%o0+4], %o7 /* restore return pc */
35 ld [%o0+0], %fp /* and stack pointer */
37 retl ! success, return %g6