Rebase to 1.58.0

This commit is contained in:
Jonathan Wakely 2015-07-14 16:32:29 +01:00
parent 71b2be77a7
commit 49492cb891
16 changed files with 45 additions and 1411 deletions

View File

@ -1,14 +0,0 @@
diff -up ./boost/pool/pool.hpp~ ./boost/pool/pool.hpp
--- ./boost/pool/pool.hpp~ 2013-08-21 17:49:56.023296922 +0200
+++ ./boost/pool/pool.hpp 2013-08-22 11:38:01.133912638 +0200
@@ -361,9 +361,7 @@ class pool: protected simple_segregated_
{ //! Calculated maximum number of memory chunks that can be allocated in a single call by this Pool.
size_type partition_size = alloc_size();
size_type POD_size = math::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
- size_type max_chunks = (std::numeric_limits<size_type>::max() - POD_size) / alloc_size();
-
- return max_chunks;
+ return (std::numeric_limits<size_type>::max() - POD_size) / alloc_size();
}
static void * & nextof(void * const ptr)

View File

@ -1,20 +0,0 @@
diff -up ./move/core.hpp~ ./move/core.hpp
--- boost/move/core.hpp~ 2015-02-09 17:33:35.000000000 +0100
+++ boost/move/core.hpp 2015-02-13 13:54:52.012130813 +0100
@@ -43,6 +43,7 @@
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
#include <boost/move/detail/meta_utils.hpp>
+ #include <boost/type_traits/is_class.hpp>
//Move emulation rv breaks standard aliasing rules so add workarounds for some compilers
#if defined(__GNUC__) && (__GNUC__ >= 4) && \
@@ -65,7 +66,7 @@
template <class T>
class rv
: public ::boost::move_detail::if_c
- < ::boost::move_detail::is_class_or_union<T>::value
+ < ::boost::is_class<T>::value
, T
, ::boost::move_detail::nat
>::type

View File

@ -1,33 +0,0 @@
diff -up boost_1_57_0/libs/pool/test/Jamfile.v2\~ boost_1_57_0/libs/pool/test/Jamfile.v2
--- boost_1_57_0/libs/pool/test/Jamfile.v2~ 2014-07-10 06:36:10.000000000 +0200
+++ boost_1_57_0/libs/pool/test/Jamfile.v2 2015-01-20 13:59:10.818700586 +0100
@@ -28,17 +28,17 @@ explicit valgrind_config_check ;
local use-valgrind = [ check-target-builds valgrind_config_check "valgrind" : <testing.launcher>"valgrind --error-exitcode=1" : <build>no ] ;
test-suite pool :
- [ run test_simple_seg_storage.cpp ]
- [ run test_pool_alloc.cpp ]
- [ run pool_msvc_compiler_bug_test.cpp ]
- [ run test_msvc_mem_leak_detect.cpp ]
- [ run test_bug_3349.cpp ]
- [ run test_bug_4960.cpp ]
- [ run test_bug_1252.cpp ]
- [ run test_bug_2696.cpp ]
- [ run test_bug_5526.cpp ]
+ [ run test_simple_seg_storage.cpp : : : <library>/boost/system//boost_system ]
+ [ run test_pool_alloc.cpp : : : <library>/boost/system//boost_system ]
+ [ run pool_msvc_compiler_bug_test.cpp : : : <library>/boost/system//boost_system ]
+ [ run test_msvc_mem_leak_detect.cpp : : : <library>/boost/system//boost_system ]
+ [ run test_bug_3349.cpp : : : <library>/boost/system//boost_system ]
+ [ run test_bug_4960.cpp : : : <library>/boost/system//boost_system ]
+ [ run test_bug_1252.cpp : : : <library>/boost/system//boost_system ]
+ [ run test_bug_2696.cpp : : : <library>/boost/system//boost_system ]
+ [ run test_bug_5526.cpp : : : <library>/boost/system//boost_system ]
[ run test_threading.cpp : : : <threading>multi <library>/boost/thread//boost_thread <toolset>gcc:<cxxflags>-Wno-attributes <toolset>gcc:<cxxflags>-Wno-missing-field-initializers ]
- [ run ../example/time_pool_alloc.cpp ]
+ [ run ../example/time_pool_alloc.cpp : : : <library>/boost/system//boost_system ]
[ compile test_poisoned_macros.cpp ]
#
Diff finished. Tue Jan 20 13:59:16 2015

View File

@ -1,24 +0,0 @@
From fd0d8042e2bb2fb5a4d88bcfc700c1cb9d7aa1bb Mon Sep 17 00:00:00 2001
From: Frank Mori Hess <fmh6jj@gmail.com>
Date: Thu, 6 Nov 2014 23:32:20 -0500
Subject: [PATCH] Fix for missing include from Evangelos Foutras.
---
include/boost/signals2/trackable.hpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/boost/signals2/trackable.hpp b/include/boost/signals2/trackable.hpp
index dba001d..64e8489 100644
--- a/include/boost/signals2/trackable.hpp
+++ b/include/boost/signals2/trackable.hpp
@@ -18,6 +18,7 @@
#include <boost/assert.hpp>
#include <boost/shared_ptr.hpp>
+#include <boost/weak_ptr.hpp>
namespace boost {
namespace signals2 {
--
2.1.0

View File

@ -0,0 +1,31 @@
diff -up boost_1_58_0/libs/pool/test/Jamfile.v2\~ boost_1_58_0/libs/pool/test/Jamfile.v2
--- boost_1_57_0/libs/pool/test/Jamfile.v2~ 2015-07-17 11:36:16.362519826 +0100
+++ boost_1_57_0/libs/pool/test/Jamfile.v2 2015-07-17 11:37:38.858847388 +0100
@@ -28,17 +28,17 @@
local Werr = <toolset>gcc:<warnings-as-errors>on <toolset>msvc:<warnings-as-errors>on ;
test-suite pool :
- [ run test_simple_seg_storage.cpp : : : $(Werr) <toolset>msvc:<cxxflags>-wd4267 ]
- [ run test_pool_alloc.cpp : : : $(Werr) ]
- [ run pool_msvc_compiler_bug_test.cpp : : : $(Werr) <toolset>msvc:<cxxflags>-wd4512 ]
- [ run test_msvc_mem_leak_detect.cpp : : : $(Werr) ]
- [ run test_bug_3349.cpp : : : $(Werr) ]
- [ run test_bug_4960.cpp : : : $(Werr) ]
- [ run test_bug_1252.cpp : : : $(Werr) ]
- [ run test_bug_2696.cpp : : : $(Werr) ]
- [ run test_bug_5526.cpp : : : $(Werr) ]
+ [ run test_simple_seg_storage.cpp : : : $(Werr) <toolset>msvc:<cxxflags>-wd4267 <library>/boost/system//boost_system ]
+ [ run test_pool_alloc.cpp : : : $(Werr) <library>/boost/system//boost_system ]
+ [ run pool_msvc_compiler_bug_test.cpp : : : $(Werr) <toolset>msvc:<cxxflags>-wd4512 <library>/boost/system//boost_system ]
+ [ run test_msvc_mem_leak_detect.cpp : : : $(Werr) <library>/boost/system//boost_system ]
+ [ run test_bug_3349.cpp : : : $(Werr) <library>/boost/system//boost_system ]
+ [ run test_bug_4960.cpp : : : $(Werr) <library>/boost/system//boost_system ]
+ [ run test_bug_1252.cpp : : : $(Werr) <library>/boost/system//boost_system ]
+ [ run test_bug_2696.cpp : : : $(Werr) <library>/boost/system//boost_system ]
+ [ run test_bug_5526.cpp : : : $(Werr) <library>/boost/system//boost_system ]
[ run test_threading.cpp : : : <threading>multi <library>/boost/thread//boost_thread ]
- [ run ../example/time_pool_alloc.cpp : : : $(Werr) ]
+ [ run ../example/time_pool_alloc.cpp : : : $(Werr) <library>/boost/system//boost_system ]
[ compile test_poisoned_macros.cpp : $(Werr) ]
#

View File

@ -7,18 +7,16 @@ Index: boost/pool/pool.hpp
+// std::numeric_limits
+#include <boost/limits.hpp>
// boost::math::static_lcm
#include <boost/math/common_factor_ct.hpp>
@@ -358,4 +360,13 @@
// boost::integer::static_lcm
#include <boost/integer/common_factor_ct.hpp>
@@ -358,4 +360,11 @@
}
+ size_type max_chunks() const
+ { //! Calculated maximum number of memory chunks that can be allocated in a single call by this Pool.
+ size_type partition_size = alloc_size();
+ size_type POD_size = math::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
+ size_type max_chunks = (std::numeric_limits<size_type>::max() - POD_size) / alloc_size();
+
+ return max_chunks;
+ size_type POD_size = integer::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
+ return (std::numeric_limits<size_type>::max() - POD_size) / alloc_size();
+ }
+
static void * & nextof(void * const ptr)

View File

@ -1,281 +0,0 @@
From cbcd605a24352521d769cff7008d92f15f08bfe6 Mon Sep 17 00:00:00 2001
From: Oliver Kowalke <oliver.kowalke@gmx.de>
Date: Wed, 12 Nov 2014 19:46:42 +0100
Subject: [PATCH 01/54] add support fro ARM64/MACH-O
---
build/Jamfile.v2 | 31 +++++++++
src/asm/jump_arm64_aapcs_macho_gas.S | 124 +++++++++++++++++++++++++++++++++++
src/asm/make_arm64_aapcs_macho_gas.S | 87 ++++++++++++++++++++++++
3 files changed, 242 insertions(+)
create mode 100644 src/asm/jump_arm64_aapcs_macho_gas.S
create mode 100644 src/asm/make_arm64_aapcs_macho_gas.S
diff --git a/libs/context/build/Jamfile.v2 b/libs/context/build/Jamfile.v2
index 7cc8a07..32d5222 100644
--- a/libs/context/build/Jamfile.v2
+++ b/libs/context/build/Jamfile.v2
@@ -209,6 +209,37 @@ alias asm_context_sources
<toolset>msvc
;
+# ARM64
+# ARM64/AAPCS/MACH-O
+alias asm_context_sources
+ : [ make asm/make_arm64_aapcs_macho_gas.o : asm/make_arm64_aapcs_macho_gas.S : @gas64 ]
+ [ make asm/jump_arm64_aapcs_macho_gas.o : asm/jump_arm64_aapcs_macho_gas.S : @gas64 ]
+ : <abi>aapcs
+ <address-model>64
+ <architecture>arm
+ <binary-format>mach-o
+ ;
+
+alias asm_context_sources
+ : asm/make_arm64_aapcs_macho_gas.S
+ asm/jump_arm64_aapcs_macho_gas.S
+ : <abi>aapcs
+ <address-model>64
+ <architecture>arm
+ <binary-format>mach-o
+ <toolset>clang
+ ;
+
+alias asm_context_sources
+ : asm/make_arm64_aapcs_macho_gas.S
+ asm/jump_arm64_aapcs_macho_gas.S
+ : <abi>aapcs
+ <address-model>64
+ <architecture>arm
+ <binary-format>mach-o
+ <toolset>darwin
+ ;
+
# MIPS
# MIPS/O32/ELF
alias asm_context_sources
diff --git a/libs/context/src/asm/jump_arm64_aapcs_macho_gas.S b/libs/context/src/asm/jump_arm64_aapcs_macho_gas.S
new file mode 100644
index 0000000..6ad5b38
--- /dev/null
+++ b/libs/context/src/asm/jump_arm64_aapcs_macho_gas.S
@@ -0,0 +1,124 @@
+/*
+ Copyright Oliver Kowalke 2014.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+*/
+
+/*******************************************************
+ * *
+ * ------------------------------------------------- *
+ * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | *
+ * ------------------------------------------------- *
+ * | 0x0 | 0x4 | 0x8 | 0xc | 0x10| 0x14| 0x18| 0x1c| *
+ * ------------------------------------------------- *
+ * | s16 | s17 | s18 | s19 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | *
+ * ------------------------------------------------- *
+ * | 0x20| 0x24| 0x28| 0x2c| 0x30| 0x34| 0x38| 0x3c| *
+ * ------------------------------------------------- *
+ * | s20 | s21 | s22 | s23 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | *
+ * ------------------------------------------------- *
+ * | 0x40| 0x44| 0x48| 0x4c| 0x50| 0x54| 0x58| 0x5c| *
+ * ------------------------------------------------- *
+ * | s24 | s25 | s26 | s27 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | *
+ * ------------------------------------------------- *
+ * | 0x60| 0x64| 0x68| 0x6c| 0x70| 0x74| 0x78| 0x7c| *
+ * ------------------------------------------------- *
+ * | s28 | s29 | s30 | s31 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | *
+ * ------------------------------------------------- *
+ * | 0x80| 0x84| 0x88| 0x8c| 0x90| 0x94| 0x98| 0x9c| *
+ * ------------------------------------------------- *
+ * | sjlj | v1 | v2 | v3 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | *
+ * ------------------------------------------------- *
+ * | 0xa0| 0xa4| 0xa8| 0xac| 0xb0| 0xb4| 0xb8| 0xbc| *
+ * ------------------------------------------------- *
+ * | v4 | v5 | v6 | v7 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 48 | 49 | 50 | 51 | 52 | 53 | | *
+ * ------------------------------------------------- *
+ * | 0xc0| 0xc4| 0xc8| 0xcc| 0xd0| 0xd4| | *
+ * ------------------------------------------------- *
+ * | v8 | lr | pc | | *
+ * ------------------------------------------------- *
+ * *
+ *******************************************************/
+
+.text
+.globl _jump_fcontext
+.align 2
+_jump_fcontext:
+ @ save LR as PC
+ push {lr}
+ @ save V1-V8,LR
+ push {v1-v8,lr}
+
+ @ locate TLS to save/restore SjLj handler
+ mrc p15, 0, v2, c13, c0, #3
+ bic v2, v2, #3
+
+ @ load TLS[__PTK_LIBC_DYLD_Unwind_SjLj_Key]
+ ldr v1, [v2, #72]
+ @ save SjLj handler
+ push {v1}
+
+ @ prepare stack for FPU
+ sub sp, sp, #128
+
+#if (defined(__VFP_FP__) && !defined(__SOFTFP__))
+ @ test if fpu env should be preserved
+ cmp a4, #0
+ beq 1f
+
+ @ save S16-S31
+ vstmia sp, {d8-d15}
+
+1:
+#endif
+
+ @ store RSP (pointing to context-data) in A1
+ str sp, [a1]
+
+ @ restore RSP (pointing to context-data) from A2
+ mov sp, a2
+
+#if (defined(__VFP_FP__) && !defined(__SOFTFP__))
+ @ test if fpu env should be preserved
+ cmp a4, #0
+ beq 2f
+
+ @ restore S16-S31
+ vldmia sp, {d8-d15}
+
+2:
+#endif
+
+ @ prepare stack for FPU
+ add sp, sp, #128
+
+ @ restore SjLj handler
+ pop {v1}
+ @ store SjLj handler in TLS
+ str v1, [v2, #72]
+
+ @ use third arg as return value after jump
+ @ and as first arg in context function
+ mov a1, a3
+
+ @ restore v1-V8,LR,PC
+ pop {v1-v8,lr,pc}
diff --git a/libs/context/src/asm/make_arm64_aapcs_macho_gas.S b/libs/context/src/asm/make_arm64_aapcs_macho_gas.S
new file mode 100644
index 0000000..67d2f89
--- /dev/null
+++ b/libs/context/src/asm/make_arm64_aapcs_macho_gas.S
@@ -0,0 +1,87 @@
+/*
+ Copyright Oliver Kowalke 2014.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+*/
+
+/*******************************************************
+ * *
+ * ------------------------------------------------- *
+ * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | *
+ * ------------------------------------------------- *
+ * | 0x0 | 0x4 | 0x8 | 0xc | 0x10| 0x14| 0x18| 0x1c| *
+ * ------------------------------------------------- *
+ * | s16 | s17 | s18 | s19 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | *
+ * ------------------------------------------------- *
+ * | 0x20| 0x24| 0x28| 0x2c| 0x30| 0x34| 0x38| 0x3c| *
+ * ------------------------------------------------- *
+ * | s20 | s21 | s22 | s23 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | *
+ * ------------------------------------------------- *
+ * | 0x40| 0x44| 0x48| 0x4c| 0x50| 0x54| 0x58| 0x5c| *
+ * ------------------------------------------------- *
+ * | s24 | s25 | s26 | s27 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | *
+ * ------------------------------------------------- *
+ * | 0x60| 0x64| 0x68| 0x6c| 0x70| 0x74| 0x78| 0x7c| *
+ * ------------------------------------------------- *
+ * | s28 | s29 | s30 | s31 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | *
+ * ------------------------------------------------- *
+ * | 0x80| 0x84| 0x88| 0x8c| 0x90| 0x94| 0x98| 0x9c| *
+ * ------------------------------------------------- *
+ * | sjlj | v1 | v2 | v3 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | *
+ * ------------------------------------------------- *
+ * | 0xa0| 0xa4| 0xa8| 0xac| 0xb0| 0xb4| 0xb8| 0xbc| *
+ * ------------------------------------------------- *
+ * | v4 | v5 | v6 | v7 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 48 | 49 | 50 | 51 | 52 | 53 | | *
+ * ------------------------------------------------- *
+ * | 0xc0| 0xc4| 0xc8| 0xcc| 0xd0| 0xd4| | *
+ * ------------------------------------------------- *
+ * | v8 | lr | pc | | *
+ * ------------------------------------------------- *
+ * *
+ *******************************************************/
+
+.text
+.globl _make_fcontext
+.align 2
+_make_fcontext:
+ @ shift address in A1 to lower 16 byte boundary
+ bic a1, a1, #15
+
+ @ reserve space for context-data on context-stack
+ sub a1, a1, #216
+
+ @ third arg of make_fcontext() == address of context-function
+ str a3, [a1,#208]
+
+ @ compute abs address of label finish
+ adr a2, finish
+ @ save address of finish as return-address for context-function
+ @ will be entered after context-function returns
+ str a2, [a1,#200]
+
+ bx lr @ return pointer to context-data
+
+finish:
+ @ exit code is zero
+ mov a1, #0
+ @ exit application
+ bl __exit
--
2.3.5

View File

@ -1,86 +0,0 @@
From c5292fea24c003c3279e0f0770a93cae829e75e3 Mon Sep 17 00:00:00 2001
From: Oliver Kowalke <oliver.kowalke@gmx.de>
Date: Fri, 21 Nov 2014 20:21:22 +0100
Subject: [PATCH 02/54] make ARM64 unsupported
---
build/Jamfile.v2 | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/libs/context/build/Jamfile.v2 b/libs/context/build/Jamfile.v2
index 32d5222..112e979 100644
--- a/libs/context/build/Jamfile.v2
+++ b/libs/context/build/Jamfile.v2
@@ -14,9 +14,22 @@ import os ;
import toolset ;
import architecture ;
+feature.feature segmented-stacks : on : optional propagated composite ;
+feature.compose <segmented-stacks>on : <define>BOOST_USE_SEGMENTED_STACKS ;
+
project boost/context
: requirements
+ <library>/boost/system//boost_system
+ <library>/boost/thread//boost_thread
<os>SOLARIS:<define>_XOPEN_SOURCE=600
+ <toolset>gcc-4.7,<segmented-stacks>on:<cxxflags>-fsplit-stack
+ <toolset>gcc-4.7,<segmented-stacks>on:<linkflags>"-static-libgcc"
+ <toolset>gcc-4.8,<segmented-stacks>on:<cxxflags>-fsplit-stack
+ <toolset>gcc-4.8,<segmented-stacks>on:<linkflags>"-static-libgcc"
+ <toolset>gcc-4.9,<segmented-stacks>on:<cxxflags>-fsplit-stack
+ <toolset>gcc-4.9,<segmented-stacks>on:<linkflags>"-static-libgcc"
+ <toolset>clang-3.4,<segmented-stacks>on:<cxxflags>-fsplit-stack
+ <toolset>clang-3.4,<segmented-stacks>on:<linkflags>"-static-libgcc"
<link>shared:<define>BOOST_CONTEXT_DYN_LINK=1
<define>BOOST_CONTEXT_SOURCE
: usage-requirements
@@ -214,6 +227,7 @@ alias asm_context_sources
alias asm_context_sources
: [ make asm/make_arm64_aapcs_macho_gas.o : asm/make_arm64_aapcs_macho_gas.S : @gas64 ]
[ make asm/jump_arm64_aapcs_macho_gas.o : asm/jump_arm64_aapcs_macho_gas.S : @gas64 ]
+ untested.cpp
: <abi>aapcs
<address-model>64
<architecture>arm
@@ -223,6 +237,7 @@ alias asm_context_sources
alias asm_context_sources
: asm/make_arm64_aapcs_macho_gas.S
asm/jump_arm64_aapcs_macho_gas.S
+ untested.cpp
: <abi>aapcs
<address-model>64
<architecture>arm
@@ -233,6 +248,7 @@ alias asm_context_sources
alias asm_context_sources
: asm/make_arm64_aapcs_macho_gas.S
asm/jump_arm64_aapcs_macho_gas.S
+ untested.cpp
: <abi>aapcs
<address-model>64
<architecture>arm
@@ -799,8 +815,22 @@ alias select_asm_context_sources
[ architecture.address-model ]
;
+
+alias stack_traits_sources
+ : windows/stack_traits.cpp
+ : <target-os>windows
+ ;
+
+alias stack_traits_sources
+ : posix/stack_traits.cpp
+ ;
+
+explicit stack_traits_sources ;
+
+
lib boost_context
: select_asm_context_sources
+ stack_traits_sources
;
boost-install boost_context ;
--
2.3.5

View File

@ -1,329 +0,0 @@
From efcdb6aae82d2ade5b81183e961e9ef282eaca31 Mon Sep 17 00:00:00 2001
From: Evgeny Shapovalov <johncapful@yandex-team.ru>
Date: Tue, 30 Dec 2014 17:14:49 +0300
Subject: [PATCH 15/54] jump and make stubs for arm64 (aarch64) for iOS ABI
---
src/asm/jump_arm64_aapcs_macho_gas.S | 126 +++++++++++++++++------------------
src/asm/make_arm64_aapcs_macho_gas.S | 72 ++++++++++----------
2 files changed, 95 insertions(+), 103 deletions(-)
diff --git a/libs/context/src/asm/jump_arm64_aapcs_macho_gas.S b/libs/context/src/asm/jump_arm64_aapcs_macho_gas.S
index 6ad5b38..29df555 100644
--- a/libs/context/src/asm/jump_arm64_aapcs_macho_gas.S
+++ b/libs/context/src/asm/jump_arm64_aapcs_macho_gas.S
@@ -1,10 +1,3 @@
-/*
- Copyright Oliver Kowalke 2014.
- Distributed under the Boost Software License, Version 1.0.
- (See accompanying file LICENSE_1_0.txt or copy at
- http://www.boost.org/LICENSE_1_0.txt)
-*/
-
/*******************************************************
* *
* ------------------------------------------------- *
@@ -12,113 +5,116 @@
* ------------------------------------------------- *
* | 0x0 | 0x4 | 0x8 | 0xc | 0x10| 0x14| 0x18| 0x1c| *
* ------------------------------------------------- *
- * | s16 | s17 | s18 | s19 | *
+ * | d8 | d9 | d10 | d11 | *
* ------------------------------------------------- *
* ------------------------------------------------- *
* | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | *
* ------------------------------------------------- *
* | 0x20| 0x24| 0x28| 0x2c| 0x30| 0x34| 0x38| 0x3c| *
* ------------------------------------------------- *
- * | s20 | s21 | s22 | s23 | *
+ * | d12 | d13 | d14 | d15 | *
* ------------------------------------------------- *
* ------------------------------------------------- *
* | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | *
* ------------------------------------------------- *
* | 0x40| 0x44| 0x48| 0x4c| 0x50| 0x54| 0x58| 0x5c| *
* ------------------------------------------------- *
- * | s24 | s25 | s26 | s27 | *
+ * | x19 | x20 | x21 | x22 | *
* ------------------------------------------------- *
* ------------------------------------------------- *
* | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | *
* ------------------------------------------------- *
* | 0x60| 0x64| 0x68| 0x6c| 0x70| 0x74| 0x78| 0x7c| *
* ------------------------------------------------- *
- * | s28 | s29 | s30 | s31 | *
+ * | x23 | x24 | x25 | x26 | *
* ------------------------------------------------- *
* ------------------------------------------------- *
* | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | *
* ------------------------------------------------- *
* | 0x80| 0x84| 0x88| 0x8c| 0x90| 0x94| 0x98| 0x9c| *
* ------------------------------------------------- *
- * | sjlj | v1 | v2 | v3 | *
- * ------------------------------------------------- *
- * ------------------------------------------------- *
- * | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | *
+ * | x27 | x28 | FP | LR | *
* ------------------------------------------------- *
- * | 0xa0| 0xa4| 0xa8| 0xac| 0xb0| 0xb4| 0xb8| 0xbc| *
* ------------------------------------------------- *
- * | v4 | v5 | v6 | v7 | *
+ * | 40 | 41 | 42 | 43 | | | *
* ------------------------------------------------- *
+ * | 0xa0| 0xa4| 0xa8| 0xac| | | *
* ------------------------------------------------- *
- * | 48 | 49 | 50 | 51 | 52 | 53 | | *
- * ------------------------------------------------- *
- * | 0xc0| 0xc4| 0xc8| 0xcc| 0xd0| 0xd4| | *
- * ------------------------------------------------- *
- * | v8 | lr | pc | | *
+ * | PC | align | | | *
* ------------------------------------------------- *
* *
*******************************************************/
.text
.globl _jump_fcontext
-.align 2
+.balign 16
_jump_fcontext:
- @ save LR as PC
- push {lr}
- @ save V1-V8,LR
- push {v1-v8,lr}
-
- @ locate TLS to save/restore SjLj handler
- mrc p15, 0, v2, c13, c0, #3
- bic v2, v2, #3
-
- @ load TLS[__PTK_LIBC_DYLD_Unwind_SjLj_Key]
- ldr v1, [v2, #72]
- @ save SjLj handler
- push {v1}
-
- @ prepare stack for FPU
- sub sp, sp, #128
+ ; prepare stack for GP + FPU
+ sub sp, sp, #0xb0
#if (defined(__VFP_FP__) && !defined(__SOFTFP__))
- @ test if fpu env should be preserved
- cmp a4, #0
- beq 1f
+ ; test if fpu env should be preserved
+ cmp w3, #0
+ b.eq 1f
- @ save S16-S31
- vstmia sp, {d8-d15}
+ ; save d8 - d15
+ stp d8, d9, [x0, #0x00]
+ stp d10, d11, [x0, #0x10]
+ stp d12, d13, [x0, #0x20]
+ stp d14, d15, [x0, #0x30]
1:
#endif
- @ store RSP (pointing to context-data) in A1
- str sp, [a1]
+ ; save x19-x30
+ stp x19, x20, [sp, #0x40]
+ stp x21, x22, [sp, #0x50]
+ stp x23, x24, [sp, #0x60]
+ stp x25, x26, [sp, #0x70]
+ stp x27, x28, [sp, #0x80]
+ stp fp, lr, [sp, #0x90]
+
+ ; save LR as PC
+ str lr, [sp, #0xa0]
- @ restore RSP (pointing to context-data) from A2
- mov sp, a2
+ ; store RSP (pointing to context-data) in first argument (x0).
+ ; STR cannot have sp as a target register
+ mov x4, sp
+ str x4, [x0]
+
+ ; restore RSP (pointing to context-data) from A2 (x1)
+ mov sp, x1
#if (defined(__VFP_FP__) && !defined(__SOFTFP__))
- @ test if fpu env should be preserved
- cmp a4, #0
- beq 2f
+ ; test if fpu env should be preserved
+ cmp w3, #0
+ b.eq 2f
- @ restore S16-S31
- vldmia sp, {d8-d15}
+ ; load d8 - d15
+ ldp d8, d9, [x0, #0x00]
+ ldp d10, d11, [x0, #0x10]
+ ldp d12, d13, [x0, #0x20]
+ ldp d14, d15, [x0, #0x30]
2:
#endif
- @ prepare stack for FPU
- add sp, sp, #128
+ ; load x19-x30
+ ldp x19, x20, [sp, #0x40]
+ ldp x21, x22, [sp, #0x50]
+ ldp x23, x24, [sp, #0x60]
+ ldp x25, x26, [sp, #0x70]
+ ldp x27, x28, [sp, #0x80]
+ ldp fp, lr, [sp, #0x90]
+
+ ; use third arg as return value after jump
+ ; and as first arg in context function
+ mov x0, x2
+
+ ; load pc
+ ldr x4, [sp, #0xa0]
- @ restore SjLj handler
- pop {v1}
- @ store SjLj handler in TLS
- str v1, [v2, #72]
+ ; restore stack from GP + FPU
+ add sp, sp, #0xb0
- @ use third arg as return value after jump
- @ and as first arg in context function
- mov a1, a3
-
- @ restore v1-V8,LR,PC
- pop {v1-v8,lr,pc}
+ ret x4
diff --git a/libs/context/src/asm/make_arm64_aapcs_macho_gas.S b/libs/context/src/asm/make_arm64_aapcs_macho_gas.S
index 67d2f89..6b55a08 100644
--- a/libs/context/src/asm/make_arm64_aapcs_macho_gas.S
+++ b/libs/context/src/asm/make_arm64_aapcs_macho_gas.S
@@ -1,10 +1,3 @@
-/*
- Copyright Oliver Kowalke 2014.
- Distributed under the Boost Software License, Version 1.0.
- (See accompanying file LICENSE_1_0.txt or copy at
- http://www.boost.org/LICENSE_1_0.txt)
-*/
-
/*******************************************************
* *
* ------------------------------------------------- *
@@ -12,76 +5,79 @@
* ------------------------------------------------- *
* | 0x0 | 0x4 | 0x8 | 0xc | 0x10| 0x14| 0x18| 0x1c| *
* ------------------------------------------------- *
- * | s16 | s17 | s18 | s19 | *
+ * | d8 | d9 | d10 | d11 | *
* ------------------------------------------------- *
* ------------------------------------------------- *
* | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | *
* ------------------------------------------------- *
* | 0x20| 0x24| 0x28| 0x2c| 0x30| 0x34| 0x38| 0x3c| *
* ------------------------------------------------- *
- * | s20 | s21 | s22 | s23 | *
+ * | d12 | d13 | d14 | d15 | *
* ------------------------------------------------- *
* ------------------------------------------------- *
* | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | *
* ------------------------------------------------- *
* | 0x40| 0x44| 0x48| 0x4c| 0x50| 0x54| 0x58| 0x5c| *
* ------------------------------------------------- *
- * | s24 | s25 | s26 | s27 | *
+ * | x19 | x20 | x21 | x22 | *
* ------------------------------------------------- *
* ------------------------------------------------- *
* | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | *
* ------------------------------------------------- *
* | 0x60| 0x64| 0x68| 0x6c| 0x70| 0x74| 0x78| 0x7c| *
* ------------------------------------------------- *
- * | s28 | s29 | s30 | s31 | *
+ * | x23 | x24 | x25 | x26 | *
* ------------------------------------------------- *
* ------------------------------------------------- *
* | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | *
* ------------------------------------------------- *
* | 0x80| 0x84| 0x88| 0x8c| 0x90| 0x94| 0x98| 0x9c| *
* ------------------------------------------------- *
- * | sjlj | v1 | v2 | v3 | *
- * ------------------------------------------------- *
- * ------------------------------------------------- *
- * | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | *
+ * | x27 | x28 | FP | LR | *
* ------------------------------------------------- *
- * | 0xa0| 0xa4| 0xa8| 0xac| 0xb0| 0xb4| 0xb8| 0xbc| *
* ------------------------------------------------- *
- * | v4 | v5 | v6 | v7 | *
+ * | 40 | 41 | 42 | 43 | | | *
* ------------------------------------------------- *
+ * | 0xa0| 0xa4| 0xa8| 0xac| | | *
* ------------------------------------------------- *
- * | 48 | 49 | 50 | 51 | 52 | 53 | | *
- * ------------------------------------------------- *
- * | 0xc0| 0xc4| 0xc8| 0xcc| 0xd0| 0xd4| | *
- * ------------------------------------------------- *
- * | v8 | lr | pc | | *
+ * | PC | align | | | *
* ------------------------------------------------- *
* *
*******************************************************/
+
.text
.globl _make_fcontext
-.align 2
+.balign 16
+
_make_fcontext:
- @ shift address in A1 to lower 16 byte boundary
- bic a1, a1, #15
+ ; shift address in x0 (allocated stack) to lower 16 byte boundary
+ and x0, x0, ~0xF
+
+ ; reserve space for context-data on context-stack
+ sub x0, x0, #0xb0
+
+ ; third arg of make_fcontext() == address of context-function
+ ; store address as a PC to jump in
+ str x2, [x0, #0xa0]
- @ reserve space for context-data on context-stack
- sub a1, a1, #216
+ ; compute abs address of label finish
+ ; 0x0c = 3 instructions * size (4) before label 'finish'
- @ third arg of make_fcontext() == address of context-function
- str a3, [a1,#208]
+ ; TODO: Numeric offset since llvm still does not support labels in ADR. Fix:
+ ; http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140407/212336.html
+ adr x1, 0x0c
- @ compute abs address of label finish
- adr a2, finish
- @ save address of finish as return-address for context-function
- @ will be entered after context-function returns
- str a2, [a1,#200]
+ ; save address of finish as return-address for context-function
+ ; will be entered after context-function returns (LR register)
+ str x1, [x0, #0x98]
- bx lr @ return pointer to context-data
+ ret lr ; return pointer to context-data (x0)
finish:
- @ exit code is zero
- mov a1, #0
- @ exit application
+ ; exit code is zero
+ mov x0, #0
+ ; exit application
bl __exit
+
+
--
2.3.5

View File

@ -1,40 +0,0 @@
From de60227a90989e502f5a0ade0c2a5d6bf7af82b8 Mon Sep 17 00:00:00 2001
From: Oliver Kowalke <oliver.kowalke@gmx.de>
Date: Tue, 30 Dec 2014 21:08:50 +0100
Subject: [PATCH 16/54] remove untested.cpp for ARM64/MACH-O
---
build/Jamfile.v2 | 3 ---
1 file changed, 3 deletions(-)
diff --git a/libs/context/build/Jamfile.v2 b/libs/context/build/Jamfile.v2
index c2d34cb..c7f2af2 100644
--- a/libs/context/build/Jamfile.v2
+++ b/libs/context/build/Jamfile.v2
@@ -227,7 +227,6 @@ alias asm_context_sources
alias asm_context_sources
: [ make asm/make_arm64_aapcs_macho_gas.o : asm/make_arm64_aapcs_macho_gas.S : @gas64 ]
[ make asm/jump_arm64_aapcs_macho_gas.o : asm/jump_arm64_aapcs_macho_gas.S : @gas64 ]
- untested.cpp
: <abi>aapcs
<address-model>64
<architecture>arm
@@ -237,7 +236,6 @@ alias asm_context_sources
alias asm_context_sources
: asm/make_arm64_aapcs_macho_gas.S
asm/jump_arm64_aapcs_macho_gas.S
- untested.cpp
: <abi>aapcs
<address-model>64
<architecture>arm
@@ -248,7 +246,6 @@ alias asm_context_sources
alias asm_context_sources
: asm/make_arm64_aapcs_macho_gas.S
asm/jump_arm64_aapcs_macho_gas.S
- untested.cpp
: <abi>aapcs
<address-model>64
<architecture>arm
--
2.3.5

View File

@ -1,299 +0,0 @@
From 8481d3ccfc8e9cd3b689c43418e27ccfe722fcb2 Mon Sep 17 00:00:00 2001
From: Oliver Kowalke <oliver.kowalke@gmx.de>
Date: Mon, 23 Feb 2015 16:23:11 +0100
Subject: [PATCH 46/54] add support for ARM64/ELF
---
build/Jamfile.v2 | 30 +++++++++
config/arm.cpp | 2 +-
src/asm/jump_arm64_aapcs_elf_gas.S | 131 +++++++++++++++++++++++++++++++++++++
src/asm/make_arm64_aapcs_elf_gas.S | 85 ++++++++++++++++++++++++
4 files changed, 247 insertions(+), 1 deletion(-)
create mode 100644 src/asm/jump_arm64_aapcs_elf_gas.S
create mode 100644 src/asm/make_arm64_aapcs_elf_gas.S
diff --git a/libs/context/build/Jamfile.v2 b/libs/context/build/Jamfile.v2
index 80d1c46..4bf3fce 100644
--- a/libs/context/build/Jamfile.v2
+++ b/libs/context/build/Jamfile.v2
@@ -223,6 +223,36 @@ alias asm_context_sources
;
# ARM64
+# ARM64/AAPCS/ELF
+alias asm_context_sources
+ : [ make asm/make_arm64_aapcs_elf_gas.o : asm/make_arm64_aapcs_elf_gas.S : @gas64 ]
+ [ make asm/jump_arm64_aapcs_elf_gas.o : asm/jump_arm64_aapcs_elf_gas.S : @gas64 ]
+ : <abi>aapcs
+ <address-model>64
+ <architecture>arm
+ <binary-format>elf
+ ;
+
+alias asm_context_sources
+ : asm/make_arm64_aapcs_elf_gas.S
+ asm/jump_arm64_aapcs_elf_gas.S
+ : <abi>aapcs
+ <address-model>64
+ <architecture>arm
+ <binary-format>elf
+ <toolset>clang
+ ;
+
+alias asm_context_sources
+ : asm/make_arm64_aapcs_elf_gas.S
+ asm/jump_arm64_aapcs_elf_gas.S
+ : <abi>aapcs
+ <address-model>64
+ <architecture>arm
+ <binary-format>elf
+ <toolset>gcc
+ ;
+
# ARM64/AAPCS/MACH-O
alias asm_context_sources
: [ make asm/make_arm64_aapcs_macho_gas.o : asm/make_arm64_aapcs_macho_gas.S : @gas64 ]
diff --git a/libs/context/config/arm.cpp b/libs/context/config/arm.cpp
index 6a83737..6eece0b 100644
--- a/libs/context/config/arm.cpp
+++ b/libs/context/config/arm.cpp
@@ -6,7 +6,7 @@
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#if !defined(__arm__) && !defined(__thumb__) && \
+#if !defined(__aarch64__) && !defined(__arm__) && !defined(__thumb__) && \
!defined(__TARGET_ARCH_ARM) && !defined(__TARGET_ARCH_THUMB) && \
!defined(_ARM) && !defined(_M_ARM)
#error "Not ARM"
diff --git a/libs/context/src/asm/jump_arm64_aapcs_elf_gas.S b/libs/context/src/asm/jump_arm64_aapcs_elf_gas.S
new file mode 100644
index 0000000..46e029d
--- /dev/null
+++ b/libs/context/src/asm/jump_arm64_aapcs_elf_gas.S
@@ -0,0 +1,131 @@
+/*
+ Copyright Edward Nevill 2015
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+*/
+/*******************************************************
+ * *
+ * ------------------------------------------------- *
+ * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | *
+ * ------------------------------------------------- *
+ * | 0x0 | 0x4 | 0x8 | 0xc | 0x10| 0x14| 0x18| 0x1c| *
+ * ------------------------------------------------- *
+ * | d8 | d9 | d10 | d11 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | *
+ * ------------------------------------------------- *
+ * | 0x20| 0x24| 0x28| 0x2c| 0x30| 0x34| 0x38| 0x3c| *
+ * ------------------------------------------------- *
+ * | d12 | d13 | d14 | d15 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | *
+ * ------------------------------------------------- *
+ * | 0x40| 0x44| 0x48| 0x4c| 0x50| 0x54| 0x58| 0x5c| *
+ * ------------------------------------------------- *
+ * | x19 | x20 | x21 | x22 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | *
+ * ------------------------------------------------- *
+ * | 0x60| 0x64| 0x68| 0x6c| 0x70| 0x74| 0x78| 0x7c| *
+ * ------------------------------------------------- *
+ * | x23 | x24 | x25 | x26 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | *
+ * ------------------------------------------------- *
+ * | 0x80| 0x84| 0x88| 0x8c| 0x90| 0x94| 0x98| 0x9c| *
+ * ------------------------------------------------- *
+ * | x27 | x28 | FP | LR | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 40 | 41 | 42 | 43 | | | *
+ * ------------------------------------------------- *
+ * | 0xa0| 0xa4| 0xa8| 0xac| | | *
+ * ------------------------------------------------- *
+ * | PC | align | | | *
+ * ------------------------------------------------- *
+ * *
+ *******************************************************/
+
+.cpu generic+fp+simd
+.text
+.align 2
+.global jump_fcontext
+.type jump_fcontext, %function
+jump_fcontext:
+ # prepare stack for GP + FPU
+ sub sp, sp, #0xb0
+
+# Because gcc may save integer registers in fp registers across a
+# function call we cannot skip saving the fp registers.
+#
+# Do not reinstate this test unless you fully understand what you
+# are doing.
+#
+# # test if fpu env should be preserved
+# cmp w3, #0
+# b.eq 1f
+
+ # save d8 - d15
+ stp d8, d9, [sp, #0x00]
+ stp d10, d11, [sp, #0x10]
+ stp d12, d13, [sp, #0x20]
+ stp d14, d15, [sp, #0x30]
+
+1:
+ # save x19-x30
+ stp x19, x20, [sp, #0x40]
+ stp x21, x22, [sp, #0x50]
+ stp x23, x24, [sp, #0x60]
+ stp x25, x26, [sp, #0x70]
+ stp x27, x28, [sp, #0x80]
+ stp x29, x30, [sp, #0x90]
+
+ # save LR as PC
+ str x30, [sp, #0xa0]
+
+ # store RSP (pointing to context-data) in first argument (x0).
+ # STR cannot have sp as a target register
+ mov x4, sp
+ str x4, [x0]
+
+ # restore RSP (pointing to context-data) from A2 (x1)
+ mov sp, x1
+
+# # test if fpu env should be preserved
+# cmp w3, #0
+# b.eq 2f
+
+ # load d8 - d15
+ ldp d8, d9, [x0, #0x00]
+ ldp d10, d11, [x0, #0x10]
+ ldp d12, d13, [x0, #0x20]
+ ldp d14, d15, [x0, #0x30]
+
+2:
+ # load x19-x30
+ ldp x19, x20, [sp, #0x40]
+ ldp x21, x22, [sp, #0x50]
+ ldp x23, x24, [sp, #0x60]
+ ldp x25, x26, [sp, #0x70]
+ ldp x27, x28, [sp, #0x80]
+ ldp x29, x30, [sp, #0x90]
+
+ # use third arg as return value after jump
+ # and as first arg in context function
+ mov x0, x2
+
+ # load pc
+ ldr x4, [sp, #0xa0]
+
+ # restore stack from GP + FPU
+ add sp, sp, #0xb0
+
+ ret x4
+.size jump_fcontext,.-jump_fcontext
+# Mark that we don't need executable stack.
+.section .note.GNU-stack,"",%progbits
diff --git a/libs/context/src/asm/make_arm64_aapcs_elf_gas.S b/libs/context/src/asm/make_arm64_aapcs_elf_gas.S
new file mode 100644
index 0000000..b208ab7
--- /dev/null
+++ b/libs/context/src/asm/make_arm64_aapcs_elf_gas.S
@@ -0,0 +1,85 @@
+/*
+ Copyright Edward Nevill 2015
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+*/
+/*******************************************************
+ * *
+ * ------------------------------------------------- *
+ * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | *
+ * ------------------------------------------------- *
+ * | 0x0 | 0x4 | 0x8 | 0xc | 0x10| 0x14| 0x18| 0x1c| *
+ * ------------------------------------------------- *
+ * | d8 | d9 | d10 | d11 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | *
+ * ------------------------------------------------- *
+ * | 0x20| 0x24| 0x28| 0x2c| 0x30| 0x34| 0x38| 0x3c| *
+ * ------------------------------------------------- *
+ * | d12 | d13 | d14 | d15 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | *
+ * ------------------------------------------------- *
+ * | 0x40| 0x44| 0x48| 0x4c| 0x50| 0x54| 0x58| 0x5c| *
+ * ------------------------------------------------- *
+ * | x19 | x20 | x21 | x22 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | *
+ * ------------------------------------------------- *
+ * | 0x60| 0x64| 0x68| 0x6c| 0x70| 0x74| 0x78| 0x7c| *
+ * ------------------------------------------------- *
+ * | x23 | x24 | x25 | x26 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | *
+ * ------------------------------------------------- *
+ * | 0x80| 0x84| 0x88| 0x8c| 0x90| 0x94| 0x98| 0x9c| *
+ * ------------------------------------------------- *
+ * | x27 | x28 | FP | LR | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 40 | 41 | 42 | 43 | | | *
+ * ------------------------------------------------- *
+ * | 0xa0| 0xa4| 0xa8| 0xac| | | *
+ * ------------------------------------------------- *
+ * | PC | align | | | *
+ * ------------------------------------------------- *
+ * *
+ *******************************************************/
+
+.cpu generic+fp+simd
+.text
+.align 2
+.global make_fcontext
+.type make_fcontext, %function
+make_fcontext:
+ # shift address in x0 (allocated stack) to lower 16 byte boundary
+ and x0, x0, ~0xF
+
+ # reserve space for context-data on context-stack
+ sub x0, x0, #0xb0
+
+ # third arg of make_fcontext() == address of context-function
+ # store address as a PC to jump in
+ str x2, [x0, #0xa0]
+
+ # save address of finish as return-address for context-function
+ # will be entered after context-function returns (LR register)
+ adr x1, finish
+ str x1, [x0, #0x98]
+
+ ret x30 // return pointer to context-data (x0)
+
+finish:
+ # exit code is zero
+ mov x0, #0
+ # exit application
+ bl _exit
+
+.size make_fcontext,.-make_fcontext
+# Mark that we don't need executable stack.
+.section .note.GNU-stack,"",%progbits
--
2.3.5

View File

@ -1,169 +0,0 @@
From 1e2584e00c71e120d652f0d4ae105e54ceca16a8 Mon Sep 17 00:00:00 2001
From: Oliver Kowalke <oliver.kowalke@gmx.de>
Date: Tue, 24 Feb 2015 17:50:14 +0100
Subject: [PATCH 47/54] some fixes for ARM64
---
src/asm/jump_arm64_aapcs_elf_gas.S | 44 ++++++++++++++++++------------------
src/asm/jump_arm64_aapcs_macho_gas.S | 44 ++++++++++++++++++------------------
2 files changed, 44 insertions(+), 44 deletions(-)
diff --git a/libs/context/src/asm/jump_arm64_aapcs_elf_gas.S b/libs/context/src/asm/jump_arm64_aapcs_elf_gas.S
index 46e029d..889008f 100644
--- a/libs/context/src/asm/jump_arm64_aapcs_elf_gas.S
+++ b/libs/context/src/asm/jump_arm64_aapcs_elf_gas.S
@@ -71,22 +71,22 @@ jump_fcontext:
# b.eq 1f
# save d8 - d15
- stp d8, d9, [sp, #0x00]
- stp d10, d11, [sp, #0x10]
- stp d12, d13, [sp, #0x20]
- stp d14, d15, [sp, #0x30]
+ stp d8, d9, [sp, #0x00]
+ stp d10, d11, [sp, #0x10]
+ stp d12, d13, [sp, #0x20]
+ stp d14, d15, [sp, #0x30]
1:
# save x19-x30
- stp x19, x20, [sp, #0x40]
- stp x21, x22, [sp, #0x50]
- stp x23, x24, [sp, #0x60]
- stp x25, x26, [sp, #0x70]
- stp x27, x28, [sp, #0x80]
- stp x29, x30, [sp, #0x90]
+ stp x19, x20, [sp, #0x40]
+ stp x21, x22, [sp, #0x50]
+ stp x23, x24, [sp, #0x60]
+ stp x25, x26, [sp, #0x70]
+ stp x27, x28, [sp, #0x80]
+ stp fp, lr, [sp, #0x90]
# save LR as PC
- str x30, [sp, #0xa0]
+ str lr, [sp, #0xa0]
# store RSP (pointing to context-data) in first argument (x0).
# STR cannot have sp as a target register
@@ -101,26 +101,26 @@ jump_fcontext:
# b.eq 2f
# load d8 - d15
- ldp d8, d9, [x0, #0x00]
- ldp d10, d11, [x0, #0x10]
- ldp d12, d13, [x0, #0x20]
- ldp d14, d15, [x0, #0x30]
+ ldp d8, d9, [sp, #0x00]
+ ldp d10, d11, [sp, #0x10]
+ ldp d12, d13, [sp, #0x20]
+ ldp d14, d15, [sp, #0x30]
2:
# load x19-x30
- ldp x19, x20, [sp, #0x40]
- ldp x21, x22, [sp, #0x50]
- ldp x23, x24, [sp, #0x60]
- ldp x25, x26, [sp, #0x70]
- ldp x27, x28, [sp, #0x80]
- ldp x29, x30, [sp, #0x90]
+ ldp x19, x20, [sp, #0x40]
+ ldp x21, x22, [sp, #0x50]
+ ldp x23, x24, [sp, #0x60]
+ ldp x25, x26, [sp, #0x70]
+ ldp x27, x28, [sp, #0x80]
+ ldp fp, lr, [sp, #0x90]
# use third arg as return value after jump
# and as first arg in context function
mov x0, x2
# load pc
- ldr x4, [sp, #0xa0]
+ ldr x4, [sp, #0xa0]
# restore stack from GP + FPU
add sp, sp, #0xb0
diff --git a/libs/context/src/asm/jump_arm64_aapcs_macho_gas.S b/libs/context/src/asm/jump_arm64_aapcs_macho_gas.S
index 29df555..958178e 100644
--- a/libs/context/src/asm/jump_arm64_aapcs_macho_gas.S
+++ b/libs/context/src/asm/jump_arm64_aapcs_macho_gas.S
@@ -58,24 +58,24 @@ _jump_fcontext:
b.eq 1f
; save d8 - d15
- stp d8, d9, [x0, #0x00]
- stp d10, d11, [x0, #0x10]
- stp d12, d13, [x0, #0x20]
- stp d14, d15, [x0, #0x30]
+ stp d8, d9, [sp, #0x00]
+ stp d10, d11, [sp, #0x10]
+ stp d12, d13, [sp, #0x20]
+ stp d14, d15, [sp, #0x30]
1:
#endif
; save x19-x30
- stp x19, x20, [sp, #0x40]
- stp x21, x22, [sp, #0x50]
- stp x23, x24, [sp, #0x60]
- stp x25, x26, [sp, #0x70]
- stp x27, x28, [sp, #0x80]
- stp fp, lr, [sp, #0x90]
+ stp x19, x20, [sp, #0x40]
+ stp x21, x22, [sp, #0x50]
+ stp x23, x24, [sp, #0x60]
+ stp x25, x26, [sp, #0x70]
+ stp x27, x28, [sp, #0x80]
+ stp fp, lr, [sp, #0x90]
; save LR as PC
- str lr, [sp, #0xa0]
+ str lr, [sp, #0xa0]
; store RSP (pointing to context-data) in first argument (x0).
; STR cannot have sp as a target register
@@ -91,28 +91,28 @@ _jump_fcontext:
b.eq 2f
; load d8 - d15
- ldp d8, d9, [x0, #0x00]
- ldp d10, d11, [x0, #0x10]
- ldp d12, d13, [x0, #0x20]
- ldp d14, d15, [x0, #0x30]
+ ldp d8, d9, [sp, #0x00]
+ ldp d10, d11, [sp, #0x10]
+ ldp d12, d13, [sp, #0x20]
+ ldp d14, d15, [sp, #0x30]
2:
#endif
; load x19-x30
- ldp x19, x20, [sp, #0x40]
- ldp x21, x22, [sp, #0x50]
- ldp x23, x24, [sp, #0x60]
- ldp x25, x26, [sp, #0x70]
- ldp x27, x28, [sp, #0x80]
- ldp fp, lr, [sp, #0x90]
+ ldp x19, x20, [sp, #0x40]
+ ldp x21, x22, [sp, #0x50]
+ ldp x23, x24, [sp, #0x60]
+ ldp x25, x26, [sp, #0x70]
+ ldp x27, x28, [sp, #0x80]
+ ldp fp, lr, [sp, #0x90]
; use third arg as return value after jump
; and as first arg in context function
mov x0, x2
; load pc
- ldr x4, [sp, #0xa0]
+ ldr x4, [sp, #0xa0]
; restore stack from GP + FPU
add sp, sp, #0xb0
--
2.3.5

View File

@ -1,38 +0,0 @@
From 6e2a2b4b309f4f98ece77edc8746fa683a2e05d8 Mon Sep 17 00:00:00 2001
From: Oliver Kowalke <oliver.kowalke@gmx.de>
Date: Wed, 25 Feb 2015 19:49:30 +0100
Subject: [PATCH 48/54] do not use aliases LR and FP for ARM64/gcc
---
src/asm/jump_arm64_aapcs_elf_gas.S | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/context/src/asm/jump_arm64_aapcs_elf_gas.S b/libs/context/src/asm/jump_arm64_aapcs_elf_gas.S
index 889008f..09bd7b5 100644
--- a/libs/context/src/asm/jump_arm64_aapcs_elf_gas.S
+++ b/libs/context/src/asm/jump_arm64_aapcs_elf_gas.S
@@ -83,10 +83,10 @@ jump_fcontext:
stp x23, x24, [sp, #0x60]
stp x25, x26, [sp, #0x70]
stp x27, x28, [sp, #0x80]
- stp fp, lr, [sp, #0x90]
+ stp x29, x30, [sp, #0x90]
# save LR as PC
- str lr, [sp, #0xa0]
+ str x30, [sp, #0xa0]
# store RSP (pointing to context-data) in first argument (x0).
# STR cannot have sp as a target register
@@ -113,7 +113,7 @@ jump_fcontext:
ldp x23, x24, [sp, #0x60]
ldp x25, x26, [sp, #0x70]
ldp x27, x28, [sp, #0x80]
- ldp fp, lr, [sp, #0x90]
+ ldp x29, x30, [sp, #0x90]
# use third arg as return value after jump
# and as first arg in context function
--
2.3.5

View File

@ -1,35 +0,0 @@
Index: boost_1_57_0/libs/context/build/Jamfile.v2
===================================================================
--- boost_1_57_0.orig/libs/context/build/Jamfile.v2
+++ boost_1_57_0/libs/context/build/Jamfile.v2
@@ -14,22 +14,9 @@ import os ;
import toolset ;
import architecture ;
-feature.feature segmented-stacks : on : optional propagated composite ;
-feature.compose <segmented-stacks>on : <define>BOOST_USE_SEGMENTED_STACKS ;
-
project boost/context
: requirements
- <library>/boost/system//boost_system
- <library>/boost/thread//boost_thread
<os>SOLARIS:<define>_XOPEN_SOURCE=600
- <toolset>gcc-4.7,<segmented-stacks>on:<cxxflags>-fsplit-stack
- <toolset>gcc-4.7,<segmented-stacks>on:<linkflags>"-static-libgcc"
- <toolset>gcc-4.8,<segmented-stacks>on:<cxxflags>-fsplit-stack
- <toolset>gcc-4.8,<segmented-stacks>on:<linkflags>"-static-libgcc"
- <toolset>gcc-4.9,<segmented-stacks>on:<cxxflags>-fsplit-stack
- <toolset>gcc-4.9,<segmented-stacks>on:<linkflags>"-static-libgcc"
- <toolset>clang-3.4,<segmented-stacks>on:<cxxflags>-fsplit-stack
- <toolset>clang-3.4,<segmented-stacks>on:<linkflags>"-static-libgcc"
<link>shared:<define>BOOST_CONTEXT_DYN_LINK=1
<define>BOOST_CONTEXT_SOURCE
: usage-requirements
@@ -849,7 +836,6 @@ alias stack_traits_sources
;
alias stack_traits_sources
- : posix/stack_traits.cpp
;
explicit stack_traits_sources ;

View File

@ -30,9 +30,9 @@
Name: boost
Summary: The free peer-reviewed portable C++ source libraries
Version: 1.57.0
%define version_enc 1_57_0
Release: 8%{?dist}
Version: 1.58.0
%define version_enc 1_58_0
Release: 1%{?dist}
License: Boost and MIT and Python
%define toplev_dirname %{name}_%{version_enc}
@ -96,7 +96,7 @@ Patch5: boost-1.48.0-add-bjam-man-page.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=828856
# https://bugzilla.redhat.com/show_bug.cgi?id=828857
# https://svn.boost.org/trac/boost/ticket/6701
Patch15: boost-1.50.0-pool.patch
Patch15: boost-1.58.0-pool.patch
# https://svn.boost.org/trac/boost/ticket/5637
Patch25: boost-1.57.0-mpl-print.patch
@ -111,38 +111,19 @@ Patch45: boost-1.54.0-locale-unused_typedef.patch
Patch49: boost-1.54.0-python-unused_typedef.patch
# https://svn.boost.org/trac/boost/ticket/9038
Patch51: boost-1.57.0-pool-test_linking.patch
# This was already fixed upstream, so no tracking bug.
Patch53: boost-1.54.0-pool-max_chunks_shadow.patch
Patch51: boost-1.58.0-pool-test_linking.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1102667
Patch61: boost-1.57.0-python-libpython_dep.patch
Patch62: boost-1.57.0-python-abi_letters.patch
Patch63: boost-1.55.0-python-test-PyImport_AppendInittab.patch
# https://svn.boost.org/trac/boost/ticket/10100
# https://github.com/boostorg/signals2/pull/8
Patch64: boost-1.57.0-signals2-weak_ptr.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1190039
Patch65: boost-1.57.0-build-optflags.patch
# https://svn.boost.org/trac/boost/ticket/10510
Patch66: boost-1.57.0-uuid-comparison.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1192002
# https://svn.boost.org/trac/boost/ticket/11044
Patch67: boost-1.57.0-move-is_class.patch
Patch70: boost-context-0001-add-support-for-ARM64-MACH-O.patch
Patch71: boost-context-0002-make-ARM64-unsupported.patch
Patch72: boost-context-0015-jump-and-make-stubs-for-arm64-aarch64-for-iOS-ABI.patch
Patch73: boost-context-0016-remove-untested.cpp-for-ARM64-MACH-O.patch
Patch74: boost-context-0046-add-support-for-ARM64-ELF.patch
Patch75: boost-context-0047-some-fixes-for-ARM64.patch
Patch76: boost-context-0048-do-not-use-aliases-LR-and-FP-for-ARM64-gcc.patch
Patch77: boost-context-partial-revert-of-0002.patch
Patch78: boost-context-use-sysv-not-aapcs.patch
%bcond_with tests
@ -627,22 +608,11 @@ a number of significant features and is now developed independently
%patch45 -p1
%patch49 -p1
%patch51 -p1
%patch53 -p1
%patch61 -p1
%patch62 -p1
%patch63 -p1
%patch64 -p2
%patch65 -p1
%patch66 -p2
%patch67 -p0
%patch70 -p1
%patch71 -p1
%patch72 -p1
%patch73 -p1
%patch74 -p1
%patch75 -p1
%patch76 -p1
%patch77 -p1
%patch78 -p1
# At least python2_version needs to be a macro so that it's visible in
@ -1263,6 +1233,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/bjam.1*
%changelog
* Fri Jul 17 2015 Jonathan Wakely <jwakely@redhat.com> - 1.58.0-1
- Rebase to 1.58.0
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.57.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

View File

@ -1 +1 @@
1be49befbdd9a5ce9def2983ba3e7b76 boost_1_57_0.tar.bz2
b8839650e61e9c1c0a89f371dd475546 boost_1_58_0.tar.bz2