35,9 → 35,9 |
.type setjmp,@function |
setjmp: |
movl 0(%esp),%eax # save pc value into eax |
movl 4(%esp),%edx # address of the context variable to save context to |
movl 4(%esp),%edx # address of the jmp_buf structure to save context to |
|
# save registers to given structure |
# save registers to the jmp_buf structure |
CONTEXT_SAVE_ARCH_CORE %edx %eax |
|
xorl %eax,%eax # set_jmp returns 0 |
49,7 → 49,7 |
movl 4(%esp), %ecx # put address of jmp_buf into ecx |
movl 8(%esp), %eax # put return value into eax |
|
# restore registers from jmp_buf |
# restore registers from the jmp_buf structure |
CONTEXT_RESTORE_ARCH_CORE %ecx %edx |
|
movl %edx,0(%esp) # put saved pc on stack |