1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-15 20:58:13 +01:00

Save %eax for i386

This commit is contained in:
Konstantin Belousov 2010-04-13 13:55:23 +03:00
parent 5a7407dd94
commit 66e49bdd41

View file

@ -37,9 +37,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
.global _Ux86_getcontext .global _Ux86_getcontext
.type _Ux86_getcontext, @function .type _Ux86_getcontext, @function
_Ux86_getcontext: _Ux86_getcontext:
#if defined __linux__
mov 4(%esp),%eax /* ucontext_t* */ mov 4(%esp),%eax /* ucontext_t* */
#if defined __linux__
/* EAX is not preserved. */ /* EAX is not preserved. */
movl $0, (LINUX_UC_MCONTEXT_OFF+LINUX_SC_EAX_OFF)(%eax) movl $0, (LINUX_UC_MCONTEXT_OFF+LINUX_SC_EAX_OFF)(%eax)
@ -66,9 +66,9 @@ _Ux86_getcontext:
fnstenv (%ecx) fnstenv (%ecx)
fldenv (%ecx) fldenv (%ecx)
#elif defined __FreeBSD__ #elif defined __FreeBSD__
/* EAX is not preserved. */ pushl %eax
movl $0, FREEBSD_UC_MCONTEXT_EAX_OFF(%eax) mov 8(%esp),%eax /* ucontext_t* */
popl FREEBSD_UC_MCONTEXT_EAX_OFF(%eax)
movl %ebx, FREEBSD_UC_MCONTEXT_EBX_OFF(%eax) movl %ebx, FREEBSD_UC_MCONTEXT_EBX_OFF(%eax)
movl %ecx, FREEBSD_UC_MCONTEXT_ECX_OFF(%eax) movl %ecx, FREEBSD_UC_MCONTEXT_ECX_OFF(%eax)
movl %edx, FREEBSD_UC_MCONTEXT_EDX_OFF(%eax) movl %edx, FREEBSD_UC_MCONTEXT_EDX_OFF(%eax)