Files
amiga-libnix2/libnix/sources/nix/setjmp/longjmp.c
T
jshepher f8848586fd Added large baserel and resident startup code.
Added implementations of truncate, readlink, putenv, setenv.
2004-09-09 23:29:14 +00:00

17 lines
396 B
C
Executable File

asm(
" .text;"
" .even;"
" .globl _longjmp;"
"_longjmp:;"
" addql #4,sp | returns to another address;"
" movel sp@+,a0 | get address of jmp_buf;"
" movel sp@+,d0 | get returncode;"
" jne l0 | != 0 -> ok;"
" moveql #1,d0;"
"l0: movel a0@(48:W),sp | restore sp;"
" movel a0@+,sp@ | set returnaddress;"
" moveml a0@,d2-d7/a2-a6 | restore all registers except scratch and sp;"
" rts;"
);