From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1873) id 692ED393BC04; Sun, 7 Mar 2021 17:02:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 692ED393BC04 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, Darwin : Make the Darwin code path more obvious (NFC). X-Act-Checkin: gcc X-Git-Author: Iain Sandoe X-Git-Refname: refs/users/ibuclaw/heads/darwin X-Git-Oldrev: 5c6a65e155ae09954dfd20ad3d5bb664d9fdecb3 X-Git-Newrev: 0eca126fd56718be8f1ddaa47398e8e162cccd6f Message-Id: <20210307170210.692ED393BC04@sourceware.org> Date: Sun, 7 Mar 2021 17:02:10 +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, 07 Mar 2021 17:02:10 -0000 https://gcc.gnu.org/g:0eca126fd56718be8f1ddaa47398e8e162cccd6f commit 0eca126fd56718be8f1ddaa47398e8e162cccd6f 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 9a4ffacc6d2..6430d7189c0 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; @@ -99,6 +104,11 @@ private { // let X32 be handled by ucontext swapcontext } + else version (OSX) + { + version = AsmExternal; + version = AsmX86_Posix; + } else { version = AsmExternal;