$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r81629 - trunk/libs/context/src/asm
From: oliver.kowalke_at_[hidden]
Date: 2012-11-30 02:19:14
Author: olli
Date: 2012-11-30 02:19:10 EST (Fri, 30 Nov 2012)
New Revision: 81629
URL: http://svn.boost.org/trac/boost/changeset/81629
Log:
context: fix missing _make_fcontext label for MacOSX 64bit, use dec repr. for 16byte alignment
Text files modified: 
   trunk/libs/context/src/asm/jump_x86_64_ms_pe_masm.asm   |     4 ++--                                    
   trunk/libs/context/src/asm/make_i386_ms_pe_masm.asm     |     2 +-                                      
   trunk/libs/context/src/asm/make_i386_sysv_elf_gas.S     |    14 +++++++-------                          
   trunk/libs/context/src/asm/make_i386_sysv_macho_gas.S   |     4 ++--                                    
   trunk/libs/context/src/asm/make_ppc64_sysv_elf_gas.S    |     2 +-                                      
   trunk/libs/context/src/asm/make_x86_64_ms_pe_masm.asm   |     2 +-                                      
   trunk/libs/context/src/asm/make_x86_64_sysv_elf_gas.S   |     2 +-                                      
   trunk/libs/context/src/asm/make_x86_64_sysv_macho_gas.S |     5 +++--                                   
   8 files changed, 18 insertions(+), 17 deletions(-)
Modified: trunk/libs/context/src/asm/jump_x86_64_ms_pe_masm.asm
==============================================================================
--- trunk/libs/context/src/asm/jump_x86_64_ms_pe_masm.asm	(original)
+++ trunk/libs/context/src/asm/jump_x86_64_ms_pe_masm.asm	2012-11-30 02:19:10 EST (Fri, 30 Nov 2012)
@@ -116,7 +116,7 @@
     lea     r10,          [rcx+090h]
     ; shift address in R10 to lower 16 byte boundary
     ; == pointer to SEE register block
-    and     r10,         -0fh
+    and     r10,         -16
 
     movaps  [r10],       xmm6
     movaps  [r10+010h],  xmm7
@@ -136,7 +136,7 @@
     lea     r10,          [rdx+090h]
     ; shift address in R10 to lower 16 byte boundary
     ; == pointer to SEE register block
-    and     r10,         -0fh
+    and     r10,         -16
 
     movaps  xmm6,        [r10]
     movaps  xmm7,        [r10+010h]
Modified: trunk/libs/context/src/asm/make_i386_ms_pe_masm.asm
==============================================================================
--- trunk/libs/context/src/asm/make_i386_ms_pe_masm.asm	(original)
+++ trunk/libs/context/src/asm/make_i386_ms_pe_masm.asm	2012-11-30 02:19:10 EST (Fri, 30 Nov 2012)
@@ -53,7 +53,7 @@
 
     ; shift address in EAX to lower 16 byte boundary
     ; == pointer to fcontext_t and address of context stack
-    and    eax,       -0fh
+    and    eax,       -16
 
     mov  ecx,         [esp+04h]     ; load 1. arg of make_fcontext, pointer to context stack (base)
     mov  [eax+018h],  ecx           ; save address of context stack (base) in fcontext_t
Modified: trunk/libs/context/src/asm/make_i386_sysv_elf_gas.S
==============================================================================
--- trunk/libs/context/src/asm/make_i386_sysv_elf_gas.S	(original)
+++ trunk/libs/context/src/asm/make_i386_sysv_elf_gas.S	2012-11-30 02:19:10 EST (Fri, 30 Nov 2012)
@@ -41,7 +41,7 @@
 
     /* shift address in EAX to lower 16 byte boundary */
     /* == pointer to fcontext_t and address of context stack */
-    andl   $-0xf,          %eax
+    andl   $-16,           %eax
 
     movl   0x4(%esp),      %edx         /* load 1. arg of make_fcontext, pointer to context stack (base) */
     movl   %edx,           0x18(%eax)   /* save address of context stack (base) in fcontext_t */
@@ -56,9 +56,9 @@
     leal   -0x8(%eax),     %edx         /* reserve space for the last frame on context stack; (ESP - 0x4) % 16 == 0 */
     movl   %edx,           0x10(%eax)   /* save address in EDX as stack pointer for context function */
 
-    call   2f
-2:  popl   %ecx                        /* address of label 2 */
-    addl   $finish-2b, %ecx            /* compute abs address of label finish */
+    call   1f
+1:  popl   %ecx                        /* address of label 2 */
+    addl   $finish-1b, %ecx            /* compute abs address of label finish */
     movl   %ecx, (%edx)                /* save address of finish as return address for context functions */
                                        /* entered after context function returns */
 
@@ -66,9 +66,9 @@
 
 finish:
     /* ESP points to same address as ESP on entry of context function + 0x4 */
-    call    3f
-3:  popl    %ebx                                    /* address of label 3 */
-    addl    $_GLOBAL_OFFSET_TABLE_+[.-3b], %ebx     /* compute address of GOT and store it in EBX */
+    call    2f
+2:  popl    %ebx                                    /* address of label 3 */
+    addl    $_GLOBAL_OFFSET_TABLE_+[.-2b], %ebx     /* compute address of GOT and store it in EBX */
 
     xorl    %eax,  %eax
     movl    %eax,  (%esp)               /* exit code is zero */
Modified: trunk/libs/context/src/asm/make_i386_sysv_macho_gas.S
==============================================================================
--- trunk/libs/context/src/asm/make_i386_sysv_macho_gas.S	(original)
+++ trunk/libs/context/src/asm/make_i386_sysv_macho_gas.S	2012-11-30 02:19:10 EST (Fri, 30 Nov 2012)
@@ -40,7 +40,7 @@
 
     /* shift address in EAX to lower 16 byte boundary */
     /* == pointer to fcontext_t and address of context stack */
-    andl   $-0xf,           %eax
+    andl   $-16,           %eax
 
     movl   0x4(%esp),      %edx         /* load 1. arg of make_fcontext, pointer to context stack (base) */
     movl   %edx,           0x18(%eax)   /* save address of stack pointer (base) in fcontext_t */
@@ -57,7 +57,7 @@
 
     call   1f
 1:  popl   %ecx                         /* address of label 1 */
-    addl   $finish-2b,     %ecx         /* compute abs address of label finish */
+    addl   $finish-1b,     %ecx         /* compute abs address of label finish */
     movl   %ecx, (%edx)                 /* save address of finish as return address for context function */
                                         /* entered after context function returns */
 
Modified: trunk/libs/context/src/asm/make_ppc64_sysv_elf_gas.S
==============================================================================
--- trunk/libs/context/src/asm/make_ppc64_sysv_elf_gas.S	(original)
+++ trunk/libs/context/src/asm/make_ppc64_sysv_elf_gas.S	2012-11-30 02:19:10 EST (Fri, 30 Nov 2012)
@@ -99,7 +99,7 @@
 
     # call align_stack, R3 contains address at 16 byte boundary after return
     # == pointer to fcontext_t and address of context stack
-    rlwinm  %r3, %r3, 0, 0, 27
+    rlwinm  %r3, %r3, 0, 0, 59
 
     std     %r0, 184(%r3)       # save address of context stack (base) in fcontext_t
     std     %r4, 192(%r3)       # save context stack size in fcontext_t
Modified: trunk/libs/context/src/asm/make_x86_64_ms_pe_masm.asm
==============================================================================
--- trunk/libs/context/src/asm/make_x86_64_ms_pe_masm.asm	(original)
+++ trunk/libs/context/src/asm/make_x86_64_ms_pe_masm.asm	2012-11-30 02:19:10 EST (Fri, 30 Nov 2012)
@@ -92,7 +92,7 @@
 
     ; shift address in RAX to lower 16 byte boundary
     ; == pointer to fcontext_t and address of context stack
-    and  rax,        -0fh
+    and  rax,        -16
 
     mov  [rax+048h], r8          ; save address of context function in fcontext_t
     mov  [rax+058h], rdx         ; save context stack size in fcontext_t
Modified: trunk/libs/context/src/asm/make_x86_64_sysv_elf_gas.S
==============================================================================
--- trunk/libs/context/src/asm/make_x86_64_sysv_elf_gas.S	(original)
+++ trunk/libs/context/src/asm/make_x86_64_sysv_elf_gas.S	2012-11-30 02:19:10 EST (Fri, 30 Nov 2012)
@@ -47,7 +47,7 @@
 
     /* shift address in RAX to lower 16 byte boundary */
     /* == pointer to fcontext_t and address of context stack */
-    andq   $-0xf,          %rax
+    andq   $-16,           %rax
 
     movq   %rdi,           0x40(%rax) /* save address of context stack pointer (base) in fcontext_t */
     movq   %rsi,           0x48(%rax) /* save context stack size in fcontext_t */
Modified: trunk/libs/context/src/asm/make_x86_64_sysv_macho_gas.S
==============================================================================
--- trunk/libs/context/src/asm/make_x86_64_sysv_macho_gas.S	(original)
+++ trunk/libs/context/src/asm/make_x86_64_sysv_macho_gas.S	2012-11-30 02:19:10 EST (Fri, 30 Nov 2012)
@@ -41,11 +41,12 @@
 .text
 .globl _make_fcontext
 .align 8
-    leaq   -0x58(%rdi),    %r8        /* reserve space for fcontext_t at top of context stack */
+_make_fcontext:
+    leaq   -0x58(%rdi),     %r8        /* reserve space for fcontext_t at top of context stack */
 
     /* shift address in RAX to lower 16 byte boundary */
     /* == pointer to fcontext_t and address of context stack */
-    andq   $-0xf,           %rax
+    andq   $-16,            %rax
 
     movq   %rdi,            0x40(%rax) /* save address of stack pointer (base) in fcontext_t */
     movq   %rsi,            0x48(%rax) /* save stack size in fcontext_t */