From a325eb52bd3861c31ffdf6b950e4186c8b5c08c0 Mon Sep 17 00:00:00 2001 From: elad335 <18193363+elad335@users.noreply.github.com> Date: Fri, 25 Oct 2024 01:00:23 +0300 Subject: [PATCH] Compilation hotfix --- rpcs3/Emu/Cell/lv2/sys_time.cpp | 8 ++++---- rpcs3/util/asm.hpp | 4 ++++ rpcs3/util/types.hpp | 4 ---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/rpcs3/Emu/Cell/lv2/sys_time.cpp b/rpcs3/Emu/Cell/lv2/sys_time.cpp index aa5436d998..adc15da13a 100644 --- a/rpcs3/Emu/Cell/lv2/sys_time.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_time.cpp @@ -151,7 +151,7 @@ u64 get_timebased_time() { const u64 tsc = utils::get_tsc(); -#if is_u128_emulated +#if _MSC_VER const u64 result = static_cast(u128_from_mul(tsc, g_timebase_freq) / freq) * g_cfg.core.clocks_scale / 100u; #else const u64 result = (tsc / freq * g_timebase_freq + tsc % freq * g_timebase_freq / freq) * g_cfg.core.clocks_scale / 100u; @@ -168,7 +168,7 @@ u64 get_timebased_time() const u64 time = count.QuadPart; const u64 freq = s_time_aux_info.perf_freq; -#if is_u128_emulated +#if _MSC_VER const u64 result = static_cast(u128_from_mul(time * g_cfg.core.clocks_scale, g_timebase_freq) / freq / 100u); #else const u64 result = (time / freq * g_timebase_freq + time % freq * g_timebase_freq / freq) * g_cfg.core.clocks_scale / 100u; @@ -211,7 +211,7 @@ u64 get_system_time() { const u64 tsc = utils::get_tsc(); -#if is_u128_emulated +#if _MSC_VER const u64 result = static_cast(u128_from_mul(tsc, 1000000ull) / freq) * g_cfg.core.clocks_scale / 100u; #else const u64 result = (tsc / freq * 1000000ull + tsc % freq * 1000000ull / freq) * g_cfg.core.clocks_scale / 100u; @@ -228,7 +228,7 @@ u64 get_system_time() const u64 time = count.QuadPart; const u64 freq = s_time_aux_info.perf_freq; -#if is_u128_emulated +#if _MSC_VER const u64 result = static_cast(u128_from_mul(time, 1000000ull) / freq); #else const u64 result = time / freq * 1000000ull + (time % freq) * 1000000ull / freq; diff --git a/rpcs3/util/asm.hpp b/rpcs3/util/asm.hpp index f59941dee9..bab63ccfc6 100644 --- a/rpcs3/util/asm.hpp +++ b/rpcs3/util/asm.hpp @@ -466,3 +466,7 @@ namespace utils } // namespace utils using utils::busy_wait; + +#ifdef _MSC_VER +using utils::operator/; +#endif diff --git a/rpcs3/util/types.hpp b/rpcs3/util/types.hpp index e2c559d5e6..e078c2cae0 100644 --- a/rpcs3/util/types.hpp +++ b/rpcs3/util/types.hpp @@ -250,8 +250,6 @@ using __m128 = float __attribute__((vector_size(16))); #ifndef _MSC_VER using u128 = __uint128_t; using s128 = __int128_t; - -static constexpr bool is_u128_emulated = false; #else extern "C" @@ -566,8 +564,6 @@ struct s128 : u128 return *this; } }; - -static constexpr bool is_u128_emulated = true; #endif // Optimization for u64*u64=u128