From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1873) id ECC163857C5B; Fri, 17 Sep 2021 14:34:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ECC163857C5B Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Iain Buclaw To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/ibuclaw/heads/darwin)] D, Linux : Add implementation for PPC64 init stack. X-Act-Checkin: gcc X-Git-Author: Iain Sandoe X-Git-Refname: refs/users/ibuclaw/heads/darwin X-Git-Oldrev: d869b64b954e3bcffcbfb16db0dbb8a5a7bd4254 X-Git-Newrev: 8a68bdef741682502fb9e0bd8469ece2f71c63d7 Message-Id: <20210917143451.ECC163857C5B@sourceware.org> Date: Fri, 17 Sep 2021 14:34:51 +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: Fri, 17 Sep 2021 14:34:52 -0000 https://gcc.gnu.org/g:8a68bdef741682502fb9e0bd8469ece2f71c63d7 commit 8a68bdef741682502fb9e0bd8469ece2f71c63d7 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) {}