26 #ifndef DOXYGEN_SHOULD_SKIP_THIS 32 stc ccr,r1h ; remember flags\n\ 33 mov.w #12,r2 ; move r0 'behind' jump buffer\n\ 34 add r2,r0 ; for storing with pre-decrement\n\ 36 pop r2 ; get return address\n\ 37 mov.w r2,@-r0 ; store return address\n\ 38 mov.w r1,@-r0 ; store flags\n\ 39 mov.w r7,@-r0 ; store registers r4-r7\n\ 43 sub.w r0,r0 ; return value: 0\n\ 44 jmp @r2 ; jump to caller\n\ 46 #endif // DOXYGEN_SHOULD_SKIP_THIS 50 #ifndef DOXYGEN_SHOULD_SKIP_THIS 56 mov.w @r0+,r4 ; restore registers r4-r7\n\ 60 mov.w @r0+,r2 ; get flags\n\ 61 mov.w @r0+,r0 ; get return address\n\ 62 push r0 ; set up for rts\n\ 63 mov.w r1,r0 ; return specified value\n\ 64 ldc r2h,ccr ; restore flags\n\ 65 rts ; return to caller\n\ 67 #endif // DOXYGEN_SHOULD_SKIP_THIS int setjmp(jmp_buf env)
Save execution context for non-local goto.
void longjmp(jmp_buf env, int val)
Non-local jump to saved machine context.
Non-local goto as specified in ANSI C.
__asm__("\n\
.text\n\
.globl _atomic_inc\n\
_atomic_inc:\n\
stc ccr, r1h ; save flags\n\
orc #0x80, ccr ; disable all but NMI\n\
mov.b @r0, r1l\n\
inc r1l\n\
mov.b r1l, @r0\n\
ldc r1h, ccr ; restore flags\n\
rts\n\
")
int jmp_buf[6]
Information stored for non-local jumps.