diff options
author | Daniil Cherednik <dan.cherednik@gmail.com> | 2023-03-31 10:54:08 +0300 |
---|---|---|
committer | Daniil Cherednik <dan.cherednik@gmail.com> | 2023-03-31 12:28:07 +0300 |
commit | fc1cffcfa7f0497a1f97b384a24bcbf23362f3be (patch) | |
tree | c15f7ab5b9e9b20fd0ef8fc07d598d28e8b32004 /contrib/restricted | |
parent | 8a749596d40e91c896a1907afcd108d9221fbde1 (diff) | |
download | ydb-fc1cffcfa7f0497a1f97b384a24bcbf23362f3be.tar.gz |
Ydb stable 23-1-1923.1.19
x-stable-origin-commit: c5d5a396e89d0a72e0267a55e93d8404d4fb54fe
Diffstat (limited to 'contrib/restricted')
6 files changed, 0 insertions, 847 deletions
diff --git a/contrib/restricted/boost/context/include/boost/context/stack_context.hpp b/contrib/restricted/boost/context/include/boost/context/stack_context.hpp deleted file mode 100644 index 740d981dc7..0000000000 --- a/contrib/restricted/boost/context/include/boost/context/stack_context.hpp +++ /dev/null @@ -1,72 +0,0 @@ - -// 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) - -#ifndef BOOST_CONTEXT_STACK_CONTEXT_H -#define BOOST_CONTEXT_STACK_CONTEXT_H - -#include <cstddef> - -#include <boost/config.hpp> - -#include <boost/context/detail/config.hpp> - -#ifdef BOOST_HAS_ABI_HEADERS -# include BOOST_ABI_PREFIX -#endif - -namespace boost { -namespace context { - -#if ! defined(BOOST_CONTEXT_NO_CXX11) -struct BOOST_CONTEXT_DECL stack_context { -# if defined(BOOST_USE_SEGMENTED_STACKS) - typedef void * segments_context[BOOST_CONTEXT_SEGMENTS]; -# endif - - std::size_t size{ 0 }; - void * sp{ nullptr }; -# if defined(BOOST_USE_SEGMENTED_STACKS) - segments_context segments_ctx{}; -# endif -# if defined(BOOST_USE_VALGRIND) - unsigned valgrind_stack_id{ 0 }; -# endif -}; -#else -struct BOOST_CONTEXT_DECL stack_context { -# if defined(BOOST_USE_SEGMENTED_STACKS) - typedef void * segments_context[BOOST_CONTEXT_SEGMENTS]; -# endif - - std::size_t size; - void * sp; -# if defined(BOOST_USE_SEGMENTED_STACKS) - segments_context segments_ctx; -# endif -# if defined(BOOST_USE_VALGRIND) - unsigned valgrind_stack_id; -# endif - - stack_context() : - size( 0), - sp( 0) -# if defined(BOOST_USE_SEGMENTED_STACKS) - , segments_ctx() -# endif -# if defined(BOOST_USE_VALGRIND) - , valgrind_stack_id( 0) -# endif - {} -}; -#endif - -}} - -#ifdef BOOST_HAS_ABI_HEADERS -# include BOOST_ABI_SUFFIX -#endif - -#endif // BOOST_CONTEXT_STACK_CONTEXT_H diff --git a/contrib/restricted/boost/context/src/asm/jump_x86_64_ms_pe_masm.masm b/contrib/restricted/boost/context/src/asm/jump_x86_64_ms_pe_masm.masm deleted file mode 100644 index c8a28a558e..0000000000 --- a/contrib/restricted/boost/context/src/asm/jump_x86_64_ms_pe_masm.masm +++ /dev/null @@ -1,205 +0,0 @@ - -; Copyright Oliver Kowalke 2009. -; 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 | -; ---------------------------------------------------------------------------------- -; | SEE registers (XMM6-XMM15) | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -; ---------------------------------------------------------------------------------- -; | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | -; ---------------------------------------------------------------------------------- -; | SEE registers (XMM6-XMM15) | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -; ---------------------------------------------------------------------------------- -; | 0xe40 | 0x44 | 0x48 | 0x4c | 0x50 | 0x54 | 0x58 | 0x5c | -; ---------------------------------------------------------------------------------- -; | SEE registers (XMM6-XMM15) | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -; ---------------------------------------------------------------------------------- -; | 0x60 | 0x64 | 0x68 | 0x6c | 0x70 | 0x74 | 0x78 | 0x7c | -; ---------------------------------------------------------------------------------- -; | SEE registers (XMM6-XMM15) | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 32 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -; ---------------------------------------------------------------------------------- -; | 0x80 | 0x84 | 0x88 | 0x8c | 0x90 | 0x94 | 0x98 | 0x9c | -; ---------------------------------------------------------------------------------- -; | SEE registers (XMM6-XMM15) | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -; ---------------------------------------------------------------------------------- -; | 0xa0 | 0xa4 | 0xa8 | 0xac | 0xb0 | 0xb4 | 0xb8 | 0xbc | -; ---------------------------------------------------------------------------------- -; | fc_mxcsr|fc_x87_cw| <alignment> | fbr_strg | fc_dealloc | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -; ---------------------------------------------------------------------------------- -; | 0xc0 | 0xc4 | 0xc8 | 0xcc | 0xd0 | 0xd4 | 0xd8 | 0xdc | -; ---------------------------------------------------------------------------------- -; | limit | base | R12 | R13 | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -; ---------------------------------------------------------------------------------- -; | 0xe0 | 0xe4 | 0xe8 | 0xec | 0xf0 | 0xf4 | 0xf8 | 0xfc | -; ---------------------------------------------------------------------------------- -; | R14 | R15 | RDI | RSI | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -; ---------------------------------------------------------------------------------- -; | 0x100 | 0x104 | 0x108 | 0x10c | 0x110 | 0x114 | 0x118 | 0x11c | -; ---------------------------------------------------------------------------------- -; | RBX | RBP | hidden | RIP | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | -; ---------------------------------------------------------------------------------- -; | 0x120 | 0x124 | 0x128 | 0x12c | 0x130 | 0x134 | 0x138 | 0x13c | -; ---------------------------------------------------------------------------------- -; | parameter area | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | -; ---------------------------------------------------------------------------------- -; | 0x140 | 0x144 | 0x148 | 0x14c | 0x150 | 0x154 | 0x158 | 0x15c | -; ---------------------------------------------------------------------------------- -; | FCTX | DATA | | -; ---------------------------------------------------------------------------------- - -.code - -jump_fcontext PROC BOOST_CONTEXT_EXPORT FRAME - .endprolog - - ; prepare stack - lea rsp, [rsp-0118h] - -IFNDEF BOOST_USE_TSX - ; save XMM storage - movaps [rsp], xmm6 - movaps [rsp+010h], xmm7 - movaps [rsp+020h], xmm8 - movaps [rsp+030h], xmm9 - movaps [rsp+040h], xmm10 - movaps [rsp+050h], xmm11 - movaps [rsp+060h], xmm12 - movaps [rsp+070h], xmm13 - movaps [rsp+080h], xmm14 - movaps [rsp+090h], xmm15 - ; save MMX control- and status-word - stmxcsr [rsp+0a0h] - ; save x87 control-word - fnstcw [rsp+0a4h] -ENDIF - - ; load NT_TIB - mov r10, gs:[030h] - ; save fiber local storage - mov rax, [r10+020h] - mov [rsp+0b0h], rax - ; save current deallocation stack - mov rax, [r10+01478h] - mov [rsp+0b8h], rax - ; save current stack limit - mov rax, [r10+010h] - mov [rsp+0c0h], rax - ; save current stack base - mov rax, [r10+08h] - mov [rsp+0c8h], rax - - mov [rsp+0d0h], r12 ; save R12 - mov [rsp+0d8h], r13 ; save R13 - mov [rsp+0e0h], r14 ; save R14 - mov [rsp+0e8h], r15 ; save R15 - mov [rsp+0f0h], rdi ; save RDI - mov [rsp+0f8h], rsi ; save RSI - mov [rsp+0100h], rbx ; save RBX - mov [rsp+0108h], rbp ; save RBP - - mov [rsp+0110h], rcx ; save hidden address of transport_t - - ; preserve RSP (pointing to context-data) in R9 - mov r9, rsp - - ; restore RSP (pointing to context-data) from RDX - mov rsp, rdx - -IFNDEF BOOST_USE_TSX - ; restore XMM storage - movaps xmm6, [rsp] - movaps xmm7, [rsp+010h] - movaps xmm8, [rsp+020h] - movaps xmm9, [rsp+030h] - movaps xmm10, [rsp+040h] - movaps xmm11, [rsp+050h] - movaps xmm12, [rsp+060h] - movaps xmm13, [rsp+070h] - movaps xmm14, [rsp+080h] - movaps xmm15, [rsp+090h] - ; restore MMX control- and status-word - ldmxcsr [rsp+0a0h] - ; save x87 control-word - fldcw [rsp+0a4h] -ENDIF - - ; load NT_TIB - mov r10, gs:[030h] - ; restore fiber local storage - mov rax, [rsp+0b0h] - mov [r10+020h], rax - ; restore current deallocation stack - mov rax, [rsp+0b8h] - mov [r10+01478h], rax - ; restore current stack limit - mov rax, [rsp+0c0h] - mov [r10+010h], rax - ; restore current stack base - mov rax, [rsp+0c8h] - mov [r10+08h], rax - - mov r12, [rsp+0d0h] ; restore R12 - mov r13, [rsp+0d8h] ; restore R13 - mov r14, [rsp+0e0h] ; restore R14 - mov r15, [rsp+0e8h] ; restore R15 - mov rdi, [rsp+0f0h] ; restore RDI - mov rsi, [rsp+0f8h] ; restore RSI - mov rbx, [rsp+0100h] ; restore RBX - mov rbp, [rsp+0108h] ; restore RBP - - mov rax, [rsp+0110h] ; restore hidden address of transport_t - - ; prepare stack - lea rsp, [rsp+0118h] - - ; load return-address - pop r10 - - ; transport_t returned in RAX - ; return parent fcontext_t - mov [rax], r9 - ; return data - mov [rax+08h], r8 - - ; transport_t as 1.arg of context-function - mov rcx, rax - - ; indirect jump to context - jmp r10 -jump_fcontext ENDP -END diff --git a/contrib/restricted/boost/context/src/asm/make_x86_64_ms_pe_masm.masm b/contrib/restricted/boost/context/src/asm/make_x86_64_ms_pe_masm.masm deleted file mode 100644 index 8f6c959a83..0000000000 --- a/contrib/restricted/boost/context/src/asm/make_x86_64_ms_pe_masm.masm +++ /dev/null @@ -1,163 +0,0 @@ - -; Copyright Oliver Kowalke 2009. -; 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 | -; ---------------------------------------------------------------------------------- -; | SEE registers (XMM6-XMM15) | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -; ---------------------------------------------------------------------------------- -; | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | -; ---------------------------------------------------------------------------------- -; | SEE registers (XMM6-XMM15) | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -; ---------------------------------------------------------------------------------- -; | 0xe40 | 0x44 | 0x48 | 0x4c | 0x50 | 0x54 | 0x58 | 0x5c | -; ---------------------------------------------------------------------------------- -; | SEE registers (XMM6-XMM15) | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -; ---------------------------------------------------------------------------------- -; | 0x60 | 0x64 | 0x68 | 0x6c | 0x70 | 0x74 | 0x78 | 0x7c | -; ---------------------------------------------------------------------------------- -; | SEE registers (XMM6-XMM15) | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 32 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -; ---------------------------------------------------------------------------------- -; | 0x80 | 0x84 | 0x88 | 0x8c | 0x90 | 0x94 | 0x98 | 0x9c | -; ---------------------------------------------------------------------------------- -; | SEE registers (XMM6-XMM15) | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -; ---------------------------------------------------------------------------------- -; | 0xa0 | 0xa4 | 0xa8 | 0xac | 0xb0 | 0xb4 | 0xb8 | 0xbc | -; ---------------------------------------------------------------------------------- -; | fc_mxcsr|fc_x87_cw| <alignment> | fbr_strg | fc_dealloc | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -; ---------------------------------------------------------------------------------- -; | 0xc0 | 0xc4 | 0xc8 | 0xcc | 0xd0 | 0xd4 | 0xd8 | 0xdc | -; ---------------------------------------------------------------------------------- -; | limit | base | R12 | R13 | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -; ---------------------------------------------------------------------------------- -; | 0xe0 | 0xe4 | 0xe8 | 0xec | 0xf0 | 0xf4 | 0xf8 | 0xfc | -; ---------------------------------------------------------------------------------- -; | R14 | R15 | RDI | RSI | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -; ---------------------------------------------------------------------------------- -; | 0x100 | 0x104 | 0x108 | 0x10c | 0x110 | 0x114 | 0x118 | 0x11c | -; ---------------------------------------------------------------------------------- -; | RBX | RBP | hidden | RIP | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | -; ---------------------------------------------------------------------------------- -; | 0x120 | 0x124 | 0x128 | 0x12c | 0x130 | 0x134 | 0x138 | 0x13c | -; ---------------------------------------------------------------------------------- -; | parameter area | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | -; ---------------------------------------------------------------------------------- -; | 0x140 | 0x144 | 0x148 | 0x14c | 0x150 | 0x154 | 0x158 | 0x15c | -; ---------------------------------------------------------------------------------- -; | FCTX | DATA | | -; ---------------------------------------------------------------------------------- - -; standard C library function -EXTERN _exit:PROC -.code - -; generate function table entry in .pdata and unwind information in -make_fcontext PROC BOOST_CONTEXT_EXPORT FRAME - ; .xdata for a function's structured exception handling unwind behavior - .endprolog - - ; first arg of make_fcontext() == top of context-stack - mov rax, rcx - - ; shift address in RAX to lower 16 byte boundary - ; == pointer to fcontext_t and address of context stack - and rax, -16 - - ; reserve space for context-data on context-stack - ; on context-function entry: (RSP -0x8) % 16 == 0 - sub rax, 0150h - - ; third arg of make_fcontext() == address of context-function - ; stored in RBX - mov [rax+0100h], r8 - - ; first arg of make_fcontext() == top of context-stack - ; save top address of context stack as 'base' - mov [rax+0c8h], rcx - ; second arg of make_fcontext() == size of context-stack - ; negate stack size for LEA instruction (== substraction) - neg rdx - ; compute bottom address of context stack (limit) - lea rcx, [rcx+rdx] - ; save bottom address of context stack as 'limit' - mov [rax+0c0h], rcx - ; save address of context stack limit as 'dealloction stack' - mov [rax+0b8h], rcx - ; set fiber-storage to zero - xor rcx, rcx - mov [rax+0b0h], rcx - - ; save MMX control- and status-word - stmxcsr [rax+0a0h] - ; save x87 control-word - fnstcw [rax+0a4h] - - ; compute address of transport_t - lea rcx, [rax+0140h] - ; store address of transport_t in hidden field - mov [rax+0110h], rcx - - ; compute abs address of label trampoline - lea rcx, trampoline - ; save address of trampoline as return-address for context-function - ; will be entered after calling jump_fcontext() first time - mov [rax+0118h], rcx - - ; compute abs address of label finish - lea rcx, finish - ; save address of finish as return-address for context-function in RBP - ; will be entered after context-function returns - mov [rax+0108h], rcx - - ret ; return pointer to context-data - -trampoline: - ; store return address on stack - ; fix stack alignment - push rbp - ; jump to context-function - jmp rbx - -finish: - ; exit code is zero - xor rcx, rcx - ; exit application - call _exit - hlt -make_fcontext ENDP -END diff --git a/contrib/restricted/boost/context/src/asm/ontop_x86_64_ms_pe_masm.masm b/contrib/restricted/boost/context/src/asm/ontop_x86_64_ms_pe_masm.masm deleted file mode 100644 index b57dd15884..0000000000 --- a/contrib/restricted/boost/context/src/asm/ontop_x86_64_ms_pe_masm.masm +++ /dev/null @@ -1,207 +0,0 @@ - -; Copyright Oliver Kowalke 2009. -; 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 | -; ---------------------------------------------------------------------------------- -; | SEE registers (XMM6-XMM15) | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -; ---------------------------------------------------------------------------------- -; | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | -; ---------------------------------------------------------------------------------- -; | SEE registers (XMM6-XMM15) | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -; ---------------------------------------------------------------------------------- -; | 0xe40 | 0x44 | 0x48 | 0x4c | 0x50 | 0x54 | 0x58 | 0x5c | -; ---------------------------------------------------------------------------------- -; | SEE registers (XMM6-XMM15) | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -; ---------------------------------------------------------------------------------- -; | 0x60 | 0x64 | 0x68 | 0x6c | 0x70 | 0x74 | 0x78 | 0x7c | -; ---------------------------------------------------------------------------------- -; | SEE registers (XMM6-XMM15) | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 32 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -; ---------------------------------------------------------------------------------- -; | 0x80 | 0x84 | 0x88 | 0x8c | 0x90 | 0x94 | 0x98 | 0x9c | -; ---------------------------------------------------------------------------------- -; | SEE registers (XMM6-XMM15) | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -; ---------------------------------------------------------------------------------- -; | 0xa0 | 0xa4 | 0xa8 | 0xac | 0xb0 | 0xb4 | 0xb8 | 0xbc | -; ---------------------------------------------------------------------------------- -; | fc_mxcsr|fc_x87_cw| <alignment> | fbr_strg | fc_dealloc | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -; ---------------------------------------------------------------------------------- -; | 0xc0 | 0xc4 | 0xc8 | 0xcc | 0xd0 | 0xd4 | 0xd8 | 0xdc | -; ---------------------------------------------------------------------------------- -; | limit | base | R12 | R13 | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -; ---------------------------------------------------------------------------------- -; | 0xe0 | 0xe4 | 0xe8 | 0xec | 0xf0 | 0xf4 | 0xf8 | 0xfc | -; ---------------------------------------------------------------------------------- -; | R14 | R15 | RDI | RSI | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -; ---------------------------------------------------------------------------------- -; | 0x100 | 0x104 | 0x108 | 0x10c | 0x110 | 0x114 | 0x118 | 0x11c | -; ---------------------------------------------------------------------------------- -; | RBX | RBP | hidden | RIP | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | -; ---------------------------------------------------------------------------------- -; | 0x120 | 0x124 | 0x128 | 0x12c | 0x130 | 0x134 | 0x138 | 0x13c | -; ---------------------------------------------------------------------------------- -; | parameter area | -; ---------------------------------------------------------------------------------- -; ---------------------------------------------------------------------------------- -; | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | -; ---------------------------------------------------------------------------------- -; | 0x140 | 0x144 | 0x148 | 0x14c | 0x150 | 0x154 | 0x158 | 0x15c | -; ---------------------------------------------------------------------------------- -; | FCTX | DATA | | -; ---------------------------------------------------------------------------------- - -.code - -ontop_fcontext PROC BOOST_CONTEXT_EXPORT FRAME - .endprolog - - ; prepare stack - lea rsp, [rsp-0118h] - -IFNDEF BOOST_USE_TSX - ; save XMM storage - movaps [rsp], xmm6 - movaps [rsp+010h], xmm7 - movaps [rsp+020h], xmm8 - movaps [rsp+030h], xmm9 - movaps [rsp+040h], xmm10 - movaps [rsp+050h], xmm11 - movaps [rsp+060h], xmm12 - movaps [rsp+070h], xmm13 - movaps [rsp+080h], xmm14 - movaps [rsp+090h], xmm15 - ; save MMX control- and status-word - stmxcsr [rsp+0a0h] - ; save x87 control-word - fnstcw [rsp+0a4h] -ENDIF - - ; load NT_TIB - mov r10, gs:[030h] - ; save fiber local storage - mov rax, [r10+020h] - mov [rsp+0b0h], rax - ; save current deallocation stack - mov rax, [r10+01478h] - mov [rsp+0b8h], rax - ; save current stack limit - mov rax, [r10+010h] - mov [rsp+0c0h], rax - ; save current stack base - mov rax, [r10+08h] - mov [rsp+0c8h], rax - - mov [rsp+0d0h], r12 ; save R12 - mov [rsp+0d8h], r13 ; save R13 - mov [rsp+0e0h], r14 ; save R14 - mov [rsp+0e8h], r15 ; save R15 - mov [rsp+0f0h], rdi ; save RDI - mov [rsp+0f8h], rsi ; save RSI - mov [rsp+0100h], rbx ; save RBX - mov [rsp+0108h], rbp ; save RBP - - mov [rsp+0110h], rcx ; save hidden address of transport_t - - ; preserve RSP (pointing to context-data) in RCX - mov rcx, rsp - - ; restore RSP (pointing to context-data) from RDX - mov rsp, rdx - -IFNDEF BOOST_USE_TSX - ; restore XMM storage - movaps xmm6, [rsp] - movaps xmm7, [rsp+010h] - movaps xmm8, [rsp+020h] - movaps xmm9, [rsp+030h] - movaps xmm10, [rsp+040h] - movaps xmm11, [rsp+050h] - movaps xmm12, [rsp+060h] - movaps xmm13, [rsp+070h] - movaps xmm14, [rsp+080h] - movaps xmm15, [rsp+090h] - ; restore MMX control- and status-word - ldmxcsr [rsp+0a0h] - ; save x87 control-word - fldcw [rsp+0a4h] -ENDIF - - ; load NT_TIB - mov r10, gs:[030h] - ; restore fiber local storage - mov rax, [rsp+0b0h] - mov [r10+020h], rax - ; restore current deallocation stack - mov rax, [rsp+0b8h] - mov [r10+01478h], rax - ; restore current stack limit - mov rax, [rsp+0c0h] - mov [r10+010h], rax - ; restore current stack base - mov rax, [rsp+0c8h] - mov [r10+08h], rax - - mov r12, [rsp+0d0h] ; restore R12 - mov r13, [rsp+0d8h] ; restore R13 - mov r14, [rsp+0e0h] ; restore R14 - mov r15, [rsp+0e8h] ; restore R15 - mov rdi, [rsp+0f0h] ; restore RDI - mov rsi, [rsp+0f8h] ; restore RSI - mov rbx, [rsp+0100h] ; restore RBX - mov rbp, [rsp+0108h] ; restore RBP - - mov rax, [rsp+0110h] ; restore hidden address of transport_t - - ; prepare stack - lea rsp, [rsp+0118h] - - ; keep return-address on stack - - ; transport_t returned in RAX - ; return parent fcontext_t - mov [rax], rcx - ; return data - mov [rax+08h], r8 - - ; transport_t as 1.arg of context-function - ; RCX contains address of returned (hidden) transfer_t - mov rcx, rax - ; RDX contains address of passed transfer_t - mov rdx, rax - - ; indirect jump to context - jmp r9 -ontop_fcontext ENDP -END diff --git a/contrib/restricted/boost/context/src/windows/stack_traits.cpp b/contrib/restricted/boost/context/src/windows/stack_traits.cpp deleted file mode 100644 index 4edada0965..0000000000 --- a/contrib/restricted/boost/context/src/windows/stack_traits.cpp +++ /dev/null @@ -1,98 +0,0 @@ - -// 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) - -#include "boost/context/stack_traits.hpp" - -extern "C" { -#include <windows.h> -} - -//#if defined (BOOST_WINDOWS) || _POSIX_C_SOURCE >= 200112L - -#include <algorithm> -#include <cmath> -#include <cstddef> -#include <cstring> -#include <stdexcept> - -#include <boost/assert.hpp> -#include <boost/context/detail/config.hpp> - -#include <boost/context/stack_context.hpp> - -// x86_64 -// test x86_64 before i386 because icc might -// define __i686__ for x86_64 too -#if defined(__x86_64__) || defined(__x86_64) \ - || defined(__amd64__) || defined(__amd64) \ - || defined(_M_X64) || defined(_M_AMD64) - -// Windows seams not to provide a constant or function -// telling the minimal stacksize -# define MIN_STACKSIZE 8 * 1024 -#else -# define MIN_STACKSIZE 4 * 1024 -#endif - -#ifdef BOOST_HAS_ABI_HEADERS -# include BOOST_ABI_PREFIX -#endif - -namespace { - -std::size_t pagesize() BOOST_NOEXCEPT_OR_NOTHROW { - SYSTEM_INFO si; - ::GetSystemInfo(&si); - return static_cast< std::size_t >( si.dwPageSize ); -} - -} - -namespace boost { -namespace context { - -// Windows seams not to provide a limit for the stacksize -// libcoco uses 32k+4k bytes as minimum -BOOST_CONTEXT_DECL -bool -stack_traits::is_unbounded() BOOST_NOEXCEPT_OR_NOTHROW { - return true; -} - -BOOST_CONTEXT_DECL -std::size_t -stack_traits::page_size() BOOST_NOEXCEPT_OR_NOTHROW { - static std::size_t size = pagesize(); - return size; -} - -BOOST_CONTEXT_DECL -std::size_t -stack_traits::default_size() BOOST_NOEXCEPT_OR_NOTHROW { - return 128 * 1024; -} - -// because Windows seams not to provide a limit for minimum stacksize -BOOST_CONTEXT_DECL -std::size_t -stack_traits::minimum_size() BOOST_NOEXCEPT_OR_NOTHROW { - return MIN_STACKSIZE; -} - -// because Windows seams not to provide a limit for maximum stacksize -// maximum_size() can never be called (pre-condition ! is_unbounded() ) -BOOST_CONTEXT_DECL -std::size_t -stack_traits::maximum_size() BOOST_NOEXCEPT_OR_NOTHROW { - BOOST_ASSERT( ! is_unbounded() ); - return 1 * 1024 * 1024 * 1024; // 1GB -} - -}} - -#ifdef BOOST_HAS_ABI_HEADERS -# include BOOST_ABI_SUFFIX -#endif diff --git a/contrib/restricted/boost/coroutine/src/windows/stack_traits.cpp b/contrib/restricted/boost/coroutine/src/windows/stack_traits.cpp deleted file mode 100644 index a31ebb56a9..0000000000 --- a/contrib/restricted/boost/coroutine/src/windows/stack_traits.cpp +++ /dev/null @@ -1,102 +0,0 @@ - -// Copyright Oliver Kowalke 2009. -// 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) - -#include "boost/coroutine/stack_traits.hpp" - -extern "C" { -#include <windows.h> -} - -//#if defined (BOOST_WINDOWS) || _POSIX_C_SOURCE >= 200112L - -#include <algorithm> -#include <cmath> -#include <cstddef> -#include <cstring> -#include <stdexcept> - -#include <boost/assert.hpp> -#include <boost/coroutine/detail/config.hpp> - -#include <boost/coroutine/stack_context.hpp> - -// x86_64 -// test x86_64 before i386 because icc might -// define __i686__ for x86_64 too -#if defined(__x86_64__) || defined(__x86_64) \ - || defined(__amd64__) || defined(__amd64) \ - || defined(_M_X64) || defined(_M_AMD64) - -// Windows seams not to provide a constant or function -// telling the minimal stacksize -# define MIN_STACKSIZE 8 * 1024 -#else -# define MIN_STACKSIZE 4 * 1024 -#endif - -#ifdef BOOST_HAS_ABI_HEADERS -# include BOOST_ABI_PREFIX -#endif - -namespace { - -std::size_t pagesize() -{ - SYSTEM_INFO si; - ::GetSystemInfo(&si); - return static_cast< std::size_t >( si.dwPageSize ); -} - -} - -namespace boost { -namespace coroutines { - -// Windows seams not to provide a limit for the stacksize -// libcoco uses 32k+4k bytes as minimum -bool -stack_traits::is_unbounded() BOOST_NOEXCEPT -{ return true; } - -std::size_t -stack_traits::page_size() BOOST_NOEXCEPT -{ - static std::size_t size = pagesize(); - return size; -} - -std::size_t -stack_traits::default_size() BOOST_NOEXCEPT -{ - std::size_t size = 64 * 1024; // 64 kB - if ( is_unbounded() ) - return (std::max)( size, minimum_size() ); - - BOOST_ASSERT( maximum_size() >= minimum_size() ); - return maximum_size() == minimum_size() - ? minimum_size() - : ( std::min)( size, maximum_size() ); -} - -// because Windows seams not to provide a limit for minimum stacksize -std::size_t -stack_traits::minimum_size() BOOST_NOEXCEPT -{ return MIN_STACKSIZE; } - -// because Windows seams not to provide a limit for maximum stacksize -// maximum_size() can never be called (pre-condition ! is_unbounded() ) -std::size_t -stack_traits::maximum_size() BOOST_NOEXCEPT -{ - BOOST_ASSERT( ! is_unbounded() ); - return 1 * 1024 * 1024 * 1024; // 1GB -} - -}} - -#ifdef BOOST_HAS_ABI_HEADERS -# include BOOST_ABI_SUFFIX -#endif |