From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1698) id CE53638708C5; Mon, 21 Dec 2020 20:37:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CE53638708C5 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Iain D Sandoe To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/iains/heads/d-for-darwin)] D, Linux : Add implementation for PPC64 init stack. X-Act-Checkin: gcc X-Git-Author: Iain Sandoe X-Git-Refname: refs/users/iains/heads/d-for-darwin X-Git-Oldrev: df0835240c37ff74615181ba571c5ed0f417d966 X-Git-Newrev: 42c2dd43e0bb0a8724d8ebbdaf7d2238356a613f Message-Id: <20201221203758.CE53638708C5@sourceware.org> Date: Mon, 21 Dec 2020 20:37:58 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Dec 2020 20:37:58 -0000 https://gcc.gnu.org/g:42c2dd43e0bb0a8724d8ebbdaf7d2238356a613f commit 42c2dd43e0bb0a8724d8ebbdaf7d2238356a613f Author: Iain Sandoe Date: Fri Dec 11 00:53:40 2020 +0000 D, Linux : Add implementation for PPC64 init stack. This provides an initStack entry for 'Posix' PPC64 case. Diff: --- libphobos/libdruntime/core/thread.d | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/libphobos/libdruntime/core/thread.d b/libphobos/libdruntime/core/thread.d index d6506cda036..98b781eb945 100644 --- a/libphobos/libdruntime/core/thread.d +++ b/libphobos/libdruntime/core/thread.d @@ -5024,6 +5024,33 @@ private: assert( (cast(size_t) pstack & 0x0f) == 0 ); } + else version (AsmPPC64_Posix) + { + version (StackGrowsDown) + { + pstack -= long.sizeof * 5; + } + else + { + pstack += long.sizeof * 5; + } + + push( cast(size_t) &fiber_entryPoint ); // link register + push( 0x00000000_00000000 ); // control register + push( 0x00000000_00000000 ); // old stack pointer + + // GPR values + version (StackGrowsDown) + { + pstack -= long.sizeof * 20; + } + else + { + pstack += long.sizeof * 20; + } + + assert( (cast(size_t) pstack & 0x0f) == 0 ); + } else version (AsmMIPS_O32_Posix) { version (StackGrowsDown) {}