home *** CD-ROM | disk | FTP | other *** search
- asm(".text ;" /* doing this in c is very hard */
- ".even ;"
- ".globl _longjmp ;"
- "_longjmp: ;"
- " movel sp@(4),a0 ;" /* get address of jmp_buf */
- " movel sp@(8),d0 ;" /* get returncode */
- " moveml a0@(4),#0xfcfc;" /* restore all registers (including sp) except scratch */
- " movel a0@,sp@ ;" /* restore returnaddress */
- " rts ;");
-