1 ! This file is called sigsetjmp.s because that is what V8 uses.
2 ! We do not define sigsetjmp() or setlongjmp() yet.
3 ! Solaris has setjmp/longjmp in setjmp.o. Move this stuff there.
5 #include <sys/syscallasm.h>
12 GLOBAL (ASM_SYMBOL (setjmp))
23 GLOBAL (ASM_SYMBOL (longjmp))
27 flushw ! flush register windows
41 GLOBAL (ASM_SYMBOL (setjmp))
45 or %g0,%g0,%o0 ! %o0 = 0
46 or %g0,0x6d,%g1 ! %g1 = 0x6d (syscall number)
48 stw %o0,[%i0+4] ! save result at [%i0+4] (sigmask?)
49 add %fp,-8,%o1 ! %o1 -> tmp 8 byte buffer
50 or %g0,%g0,%o0 ! %o0 = 0
51 or %g0,0x70,%g1 ! %g1 = 0x70 (syscall number)
53 lduw [%fp-4],%g1 ! %g1 = onsstack?
54 stw %fp,[%i0+8] ! save %fp at [%i0+8]
55 stw %g1,[%i0+0] ! save ? at [%i0+8]
56 add %i7,8,%g1 ! %g1 = return address
57 stw %g1,[%i0+12] ! save return address at [%i0+12]
58 add %g1,4,%g1 ! %g1 = nPC
59 stw %g1,[%i0+16] ! save nPC at [%i0+16]
66 GLOBAL (ASM_SYMBOL (longjmp))
69 orcc %g0,%o1,%g0 ! return val == 0 ?
71 or %g0,1,%o1 ! make it 1 (executed if branch taken)
73 or %g0,0x8b,%g1 ! set syscall 0x8b
74 stw %o1,[%o0+28] ! save return val for restoration
77 #endif /* ! __svr4__ */