aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure
diff options
context:
space:
mode:
authorMary <me@thog.eu>2021-12-05 00:02:30 +0100
committerGitHub <noreply@github.com>2021-12-04 20:02:30 -0300
commitf39fce8f54c1e4dfa1ca56e4a2b1668e9ea30956 (patch)
treeeaf667ed72bc8838d5404712d60b67579502f0d5 /ARMeilleure
parent7c9360d39353db38a8b5c5ff9c52924a577f089e (diff)
misc: Migrate usage of RuntimeInformation to OperatingSystem (#2901)
Very basic migration across the codebase.
Diffstat (limited to 'ARMeilleure')
-rw-r--r--ARMeilleure/CodeGen/X86/CallingConvention.cs2
-rw-r--r--ARMeilleure/Signal/NativeSignalHandler.cs2
-rw-r--r--ARMeilleure/Translation/Cache/JitCache.cs2
-rw-r--r--ARMeilleure/Translation/PTC/Ptc.cs8
4 files changed, 7 insertions, 7 deletions
diff --git a/ARMeilleure/CodeGen/X86/CallingConvention.cs b/ARMeilleure/CodeGen/X86/CallingConvention.cs
index 2769fd93..74799623 100644
--- a/ARMeilleure/CodeGen/X86/CallingConvention.cs
+++ b/ARMeilleure/CodeGen/X86/CallingConvention.cs
@@ -151,7 +151,7 @@ namespace ARMeilleure.CodeGen.X86
public static CallConvName GetCurrentCallConv()
{
- return RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
+ return OperatingSystem.IsWindows()
? CallConvName.Windows
: CallConvName.SystemV;
}
diff --git a/ARMeilleure/Signal/NativeSignalHandler.cs b/ARMeilleure/Signal/NativeSignalHandler.cs
index babc7d42..9f14dd6b 100644
--- a/ARMeilleure/Signal/NativeSignalHandler.cs
+++ b/ARMeilleure/Signal/NativeSignalHandler.cs
@@ -95,7 +95,7 @@ namespace ARMeilleure.Signal
{
if (_initialized) return;
- bool unix = RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
+ bool unix = OperatingSystem.IsLinux() || OperatingSystem.IsMacOS();
ref SignalHandlerConfig config = ref GetConfigRef();
if (unix)
diff --git a/ARMeilleure/Translation/Cache/JitCache.cs b/ARMeilleure/Translation/Cache/JitCache.cs
index c0d0a25d..24affa34 100644
--- a/ARMeilleure/Translation/Cache/JitCache.cs
+++ b/ARMeilleure/Translation/Cache/JitCache.cs
@@ -39,7 +39,7 @@ namespace ARMeilleure.Translation.Cache
_cacheAllocator = new CacheMemoryAllocator(CacheSize);
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ if (OperatingSystem.IsWindows())
{
JitUnwindWindows.InstallFunctionTableHandler(_jitRegion.Pointer, CacheSize, _jitRegion.Pointer + Allocate(PageSize));
}
diff --git a/ARMeilleure/Translation/PTC/Ptc.cs b/ARMeilleure/Translation/PTC/Ptc.cs
index 8e5349e5..04cab561 100644
--- a/ARMeilleure/Translation/PTC/Ptc.cs
+++ b/ARMeilleure/Translation/PTC/Ptc.cs
@@ -960,10 +960,10 @@ namespace ARMeilleure.Translation.PTC
{
uint osPlatform = 0u;
- osPlatform |= (RuntimeInformation.IsOSPlatform(OSPlatform.FreeBSD) ? 1u : 0u) << 0;
- osPlatform |= (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ? 1u : 0u) << 1;
- osPlatform |= (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? 1u : 0u) << 2;
- osPlatform |= (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? 1u : 0u) << 3;
+ osPlatform |= (OperatingSystem.IsFreeBSD() ? 1u : 0u) << 0;
+ osPlatform |= (OperatingSystem.IsLinux() ? 1u : 0u) << 1;
+ osPlatform |= (OperatingSystem.IsMacOS() ? 1u : 0u) << 2;
+ osPlatform |= (OperatingSystem.IsWindows() ? 1u : 0u) << 3;
return osPlatform;
}