Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78140 - trunk/libs/context/src/asm
From: oliver.kowalke_at_[hidden]
Date: 2012-04-22 13:13:06


Author: olli
Date: 2012-04-22 13:13:05 EDT (Sun, 22 Apr 2012)
New Revision: 78140
URL: http://svn.boost.org/trac/boost/changeset/78140

Log:
context: fix using correct context stack to pass argument

Text files modified:
   trunk/libs/context/src/asm/fcontext_i386_ms_pe_masm.asm | 2 +-
   trunk/libs/context/src/asm/fcontext_i386_sysv_elf_gas.S | 2 +-
   trunk/libs/context/src/asm/fcontext_i386_sysv_macho_gas.S | 2 +-
   3 files changed, 3 insertions(+), 3 deletions(-)

Modified: trunk/libs/context/src/asm/fcontext_i386_ms_pe_masm.asm
==============================================================================
--- trunk/libs/context/src/asm/fcontext_i386_ms_pe_masm.asm (original)
+++ trunk/libs/context/src/asm/fcontext_i386_ms_pe_masm.asm 2012-04-22 13:13:05 EDT (Sun, 22 Apr 2012)
@@ -106,9 +106,9 @@
 ; fldcw [ecx+030h] ; restore x87 control word
 
     mov eax, [esp+0ch] ; use third arg as return value after jump
- mov [esp+04h], eax ; use third arg as first arg in context function
 
     mov esp, [ecx+010h] ; restore ESP
+ mov [esp+04h], eax ; use third arg as first arg in context function
     mov ecx, [ecx+014h] ; fetch the address to return to
 
     jmp ecx ; indirect jump to context

Modified: trunk/libs/context/src/asm/fcontext_i386_sysv_elf_gas.S
==============================================================================
--- trunk/libs/context/src/asm/fcontext_i386_sysv_elf_gas.S (original)
+++ trunk/libs/context/src/asm/fcontext_i386_sysv_elf_gas.S 2012-04-22 13:13:05 EDT (Sun, 22 Apr 2012)
@@ -68,9 +68,9 @@
 /* fldcw 0x28(%ecx) */ /* restore x87 control word */
 
     movl 0xc(%esp), %eax /* use third arg as return value after jump */
- movl %eax, 0x4(%esp) /* use third arg as first arg in context function */
 
     movl 0x10(%ecx), %esp /* restore ESP */
+ movl %eax, 0x4(%esp) /* use third arg as first arg in context function */
     movl 0x14(%ecx), %ecx /* fetch the address to return to */
 
     jmp *%ecx /* indirect jump to context */

Modified: trunk/libs/context/src/asm/fcontext_i386_sysv_macho_gas.S
==============================================================================
--- trunk/libs/context/src/asm/fcontext_i386_sysv_macho_gas.S (original)
+++ trunk/libs/context/src/asm/fcontext_i386_sysv_macho_gas.S 2012-04-22 13:13:05 EDT (Sun, 22 Apr 2012)
@@ -67,9 +67,9 @@
 /* fldcw 0x28(%ecx) */ /* restore x87 control word */
 
     movl 0xc(%esp), %eax /* use third arg as return value after jump */
- movl %eax, 0x4(%esp) /* use third arg as first arg in context function */
 
     movl 0x10(%ecx), %esp /* restore ESP */
+ movl %eax, 0x4(%esp) /* use third arg as first arg in context function */
     movl 0x14(%ecx), %ecx /* fetch the address to return to */
 
     jmp *%ecx /* indirect jump to context */


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk