From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1698) id C098D385800F; Mon, 18 Oct 2021 15:54:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C098D385800F 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, Darwin : Make the Darwin code path more obvious (NFC). X-Act-Checkin: gcc X-Git-Author: Iain Sandoe X-Git-Refname: refs/users/iains/heads/d-for-darwin X-Git-Oldrev: fdbfa9f9b5916a99687a9089851754cf98162119 X-Git-Newrev: 099b7c964b6179f23defa7f89748b1c4366a213e Message-Id: <20211018155432.C098D385800F@sourceware.org> Date: Mon, 18 Oct 2021 15:54:32 +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:32 -0000 https://gcc.gnu.org/g:099b7c964b6179f23defa7f89748b1c4366a213e commit 099b7c964b6179f23defa7f89748b1c4366a213e Author: Iain Sandoe Date: Thu Dec 10 14:09:09 2020 +0000 D, Darwin : Make the Darwin code path more obvious (NFC). Darwin passes version (Darwin) _and_ version(Posix) thus the AsmExternal and AsmX86*_Posix cases were already in effect. This just makes it more obvious (and also eases switching to ucontext for testing). Diff: --- libphobos/libdruntime/core/thread/fiber.d | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libphobos/libdruntime/core/thread/fiber.d b/libphobos/libdruntime/core/thread/fiber.d index f4c04ce7358..64e90182596 100644 --- a/libphobos/libdruntime/core/thread/fiber.d +++ b/libphobos/libdruntime/core/thread/fiber.d @@ -76,6 +76,11 @@ private // fiber_switchContext does not support shadow stack from // Intel CET. So use ucontext implementation. } + else version (OSX) + { + version = AsmExternal; + version = AsmX86_Posix; + } else { version = AsmExternal; @@ -101,6 +106,11 @@ private { // let X32 be handled by ucontext swapcontext } + else version (OSX) + { + version = AsmExternal; + version = AsmX86_Posix; + } else { version = AsmExternal;