Annotation of researchv9/libc/sys/setjmp.s, revision 1.1.1.1

1.1       root        1: # C library -- setjmp, longjmp
                      2: #
                      3: #      longjmp(env, val)
                      4: #              will generate a "return(val)" from the last call to
                      5: #      setjmp(env)
                      6: #              by restoring a2 - a7, d2 - d7, pc, and sr from env
                      7: #              and doing a return
                      8:        .text
                      9:        .globl _setjmp
                     10:        .globl _longjmp
                     11: 
                     12: _setjmp:
                     13:        movl    sp@+,a1                 | save pc and restore stack
                     14:        movl    sp@,a0
                     15:        moveml  #0xfcfc,a0@             | a2 - a7, d2 - d7
                     16:        movl    a1,a0@(48)              | pc
                     17:        clrl    d0                      | return 0
                     18:        jmp     a1@
                     19: 
                     20: _longjmp:
                     21:        movl    sp@(4),a0
                     22:        movl    sp@(8),d0               | the return value
                     23:        movl    a0@(48),a1              | return pc
                     24:        moveml  a0@,#0xfcfc             | restore registers
                     25:        jmp     a1@

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.