From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1698) id E6AD73858404; Mon, 18 Oct 2021 15:54:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E6AD73858404 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: 0bf6fac0393689e4f8d72704eec3430e0562322c X-Git-Newrev: 7f61c4ae7534ec2635cdfb24fef6dae1c8d420b2 Message-Id: <20211018155442.E6AD73858404@sourceware.org> Date: Mon, 18 Oct 2021 15:54:42 +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, 18 Oct 2021 15:54:43 -0000 https://gcc.gnu.org/g:7f61c4ae7534ec2635cdfb24fef6dae1c8d420b2 commit 7f61c4ae7534ec2635cdfb24fef6dae1c8d420b2 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/fiber.d | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/libphobos/libdruntime/core/thread/fiber.d b/libphobos/libdruntime/core/thread/fiber.d index 64e90182596..4ae0d033be1 100644 --- a/libphobos/libdruntime/core/thread/fiber.d +++ b/libphobos/libdruntime/core/thread/fiber.d @@ -1395,6 +1395,31 @@ private: *cast(size_t*)(pstack + wsize) = cast(size_t) Thread.getThis().m_addr; 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; + } + } else version (AsmMIPS_O32_Posix) { version (StackGrowsDown) {}