Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2777 → Rev 2778

/trunk/uspace/lib/libc/arch/ia32/src/setjmp.S
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
/trunk/uspace/lib/libc/arch/ia32/src/fibril.S
43,7 → 43,7
movl 0(%esp),%eax # the caller's return %eip
movl 4(%esp),%edx # address of the context variable to save context to
 
# save registers to given structure
# save registers to the context structure
CONTEXT_SAVE_ARCH_CORE %edx %eax
 
# Save TLS
63,7 → 63,7
context_restore:
movl 4(%esp),%eax # address of the context variable to restore context from
 
# restore registers from jmp_buf
# restore registers from the context structure
CONTEXT_RESTORE_ARCH_CORE %eax %edx
 
movl %edx,0(%esp) # ctx->pc -> saver's return %eip