tnintemann / rpms / boost

Forked from rpms/boost 3 years ago
Clone

Blame SOURCES/boost-1.53.0-context.patch

6e52e0
--- boost_1_53_0/libs/context/src/asm/make_ppc32_sysv_elf_gas.S.orig	2013-02-11 14:03:46.631005713 -0600
6e52e0
+++ boost_1_53_0/libs/context/src/asm/make_ppc32_sysv_elf_gas.S	2013-02-11 14:06:52.704815403 -0600
6e52e0
@@ -78,7 +78,7 @@
6e52e0
 
6e52e0
     # call align_stack, R3 contains address at 16 byte boundary after return
6e52e0
     # == pointer to fcontext_t and address of context stack
6e52e0
-    rlwinm  %r3, %r3, 0, 0, 27
6e52e0
+    clrrwi  %r3, %r3, 4
6e52e0
 
6e52e0
     stw     %r0, 92(%r3)        # save address of context stack (base) in fcontext_t
6e52e0
     stw     %r4, 96(%r3)        # save context stack size in fcontext_t
6e52e0
@@ -87,12 +87,10 @@
6e52e0
     subi    %r0, %r3, 64        # reserve 64 bytes (linkage + parameter area), R4 % 16 == 0
6e52e0
     stw     %r0, 76(%r3)        # save address in R3 as stack pointer for context function
6e52e0
 
6e52e0
-    mflr    %r0                 # load LR
6e52e0
     bl      1f                  # jump to label 1
6e52e0
 1:
6e52e0
     mflr    %r4                      # load LR into R4
6e52e0
     addi    %r4, %r4, finish - 1b    # compute abs address of label finish
6e52e0
-    mtlr    %r0                      # restore LR
6e52e0
     stw     %r4, 84(%r3)             # save address of finish as return address for context function
6e52e0
                                      # entered after context function returns
6e52e0
 
6e52e0
@@ -108,4 +106,5 @@
6e52e0
 
6e52e0
     li      %r3,  0             # exit code is zero
6e52e0
     bl      _exit@plt           # exit application
6e52e0
+    .long   0                   # We should never get here, so SIGILL if we do
6e52e0
 .size make_fcontext, .-make_fcontext
6e52e0
6e52e0
--- boost_1_53_0/libs/context/src/asm/make_ppc64_sysv_elf_gas.S.orig	2013-02-11 14:03:43.726849715 -0600
6e52e0
+++ boost_1_53_0/libs/context/src/asm/make_ppc64_sysv_elf_gas.S	2013-02-11 14:22:48.202839078 -0600
6e52e0
@@ -99,21 +99,19 @@
6e52e0
 
6e52e0
     # call align_stack, R3 contains address at 16 byte boundary after return
6e52e0
     # == pointer to fcontext_t and address of context stack
6e52e0
-    rlwinm  %r3, %r3, 0, 0, 59
6e52e0
+    clrrdi  %r3, %r3, 4
6e52e0
 
6e52e0
     std     %r0, 184(%r3)       # save address of context stack (base) in fcontext_t
6e52e0
     std     %r4, 192(%r3)       # save context stack size in fcontext_t
6e52e0
     std     %r5, 176(%r3)       # save address of context function in fcontext_t
6e52e0
 
6e52e0
-    subf    %r0, %r3, 64        # 64 bytes on stack for parameter area (== 8 registers)
6e52e0
+    subi    %r0, %r3, 64        # 64 bytes on stack for parameter area (== 8 registers)
6e52e0
     std     %r0, 152(%r3)       # save the stack base
6e52e0
 
6e52e0
-    mflr    %r0                 # load LR
6e52e0
     bl      1f                  # jump to label 1
6e52e0
 1:
6e52e0
     mflr    %r4                      # load LR into R4
6e52e0
     addi    %r4, %r4, finish - 1b    # compute abs address of label finish
6e52e0
-    mtlr    %r0                      # restore LR
6e52e0
     std     %r4, 168(%r3)            # save address of finish as return address for context function
6e52e0
                                      # entered after context function returns
6e52e0
 
6e52e0
@@ -128,5 +126,7 @@
6e52e0
     stwu    %r1, -32(%r1)       # allocate stack space, SP % 16 == 0
6e52e0
 
6e52e0
     li      %r3,  0             # set return value to zero
6e52e0
-    bl      _exit@plt           # exit application
6e52e0
+    bl      _exit               # exit application
6e52e0
+    nop                         # nop is required by the linker
6e52e0
+    .long   0                   # We should never get here, so SIGILL if we do
6e52e0
 .size .make_fcontext, .-.make_fcontext