From 41f451bf8b74bbe63ed1a7a4448315bd01d2f5fe Mon Sep 17 00:00:00 2001 From: guccigang420 <> Date: Sun, 1 Oct 2023 17:30:28 +0200 Subject: [PATCH] Fixed MulHi in value.cc for Linux systems --- src/xenia/cpu/hir/value.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/xenia/cpu/hir/value.cc b/src/xenia/cpu/hir/value.cc index 1a72ba22f6..caf1eaf96a 100644 --- a/src/xenia/cpu/hir/value.cc +++ b/src/xenia/cpu/hir/value.cc @@ -409,13 +409,15 @@ void Value::MulHi(Value* other, bool is_unsigned) { } #else if (is_unsigned) { - constant.i64 = static_cast( + constant.i64 = static_cast(( static_cast(constant.i64) * - static_cast(other->constant.i64)); + static_cast(other->constant.i64)) + >> 64); } else { constant.i64 = - static_cast(static_cast<__int128>(constant.i64) * - static_cast<__int128>(other->constant.i64)); + static_cast((static_cast<__int128>(constant.i64) * + static_cast<__int128>(other->constant.i64)) + >> 64); } #endif // XE_COMPILER_MSVC break;