From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1698) id 21E013858425; Wed, 13 Oct 2021 08:31:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 21E013858425 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: 0f9dbe67d103edf9034930e245f8424f832bae0a X-Git-Newrev: 87d056bf8e69bff1fc76fcd079833014bd4f5f75 Message-Id: <20211013083105.21E013858425@sourceware.org> Date: Wed, 13 Oct 2021 08:31:05 +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: Wed, 13 Oct 2021 08:31:05 -0000 https://gcc.gnu.org/g:87d056bf8e69bff1fc76fcd079833014bd4f5f75 commit 87d056bf8e69bff1fc76fcd079833014bd4f5f75 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;