[gcc(refs/users/iains/heads/d-for-darwin)] D, Darwin : Make the Darwin code path more obvious (NFC).
Iain D Sandoe
iains@gcc.gnu.org
Mon Oct 18 15:54:32 GMT 2021
https://gcc.gnu.org/g:099b7c964b6179f23defa7f89748b1c4366a213e
commit 099b7c964b6179f23defa7f89748b1c4366a213e
Author: Iain Sandoe <iain@sandoe.co.uk>
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;
More information about the Gcc-cvs
mailing list