From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1698) id 87B993844062; Sun, 13 Dec 2020 17:44:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 87B993844062 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: f20e60bef60626ea5c66d7711a76465092229395 X-Git-Newrev: 3ebe099ee043169cfaeb9d16909be35d0808d0cf Message-Id: <20201213174439.87B993844062@sourceware.org> Date: Sun, 13 Dec 2020 17:44:39 +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: Sun, 13 Dec 2020 17:44:39 -0000 https://gcc.gnu.org/g:3ebe099ee043169cfaeb9d16909be35d0808d0cf commit 3ebe099ee043169cfaeb9d16909be35d0808d0cf 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) {}