Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r79947 - trunk/libs/context/src/asm
From: oliver.kowalke_at_[hidden]
Date: 2012-08-09 11:29:16


Author: olli
Date: 2012-08-09 11:29:16 EDT (Thu, 09 Aug 2012)
New Revision: 79947
URL: http://svn.boost.org/trac/boost/changeset/79947

Log:
context: fix for MACH-O on i386

Text files modified:
   trunk/libs/context/src/asm/fcontext_i386_sysv_macho_gas.S | 22 +++++++---------------
   1 files changed, 7 insertions(+), 15 deletions(-)

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-08-09 11:29:16 EDT (Thu, 09 Aug 2012)
@@ -82,10 +82,7 @@
     pushl %eax /* save pointer to fcontext_t */
     pushl %ebx /* save EBX */
     pushl %edx /* stack pointer as arg for align_stack */
- call 1f
-1: popl %ebx /* address of label 1 */
- addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ebx /* compute address of GOT and store it in EBX */
- call align_stack_at_PLT /* align stack */
+ call _align_stack /* align stack */
     movl %eax, %edx /* begin of aligned stack */
     popl %eax /* remove arg for align_stack */
     popl %ebx /* restore EBX */
@@ -97,22 +94,17 @@
     stmxcsr 0x20(%eax) /* save MMX control and status word */
     fnstcw 0x24(%eax) /* save x87 control word */
 
- call 2f
-2: popl %ecx /* address of label 2 */
- addl $finish-2b, %ecx /* helper code executed after context function returns */
- movl %ecx, (%edx)
+ call 1f
+1: popl %ecx
+ addl $finish-1b, %ecx /* helper code executed after context function returns */
+ movl %ecx, (%edx)
 
- xorl %eax, %eax
+ xorl %eax, %eax
     ret
 
 finish:
     leal -0xc(%esp), %esp
-
- call 3f
-3: popl %ebx /* address of label 3 */
- addl $_GLOBAL_OFFSET_TABLE_+[.-3b], %ebx /* compute address of GOT and store it in EBX */
-
     xorl %eax, %eax
     pushl %eax /* exit code is zero */
- call _exit_at_PLT /* exit application */
+ call _exit /* exit application */
     hlt


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