diff --git a/rpcs3/Emu/Cell/PPUDisAsm.cpp b/rpcs3/Emu/Cell/PPUDisAsm.cpp index 484688ee12..ebfdffb5bc 100644 --- a/rpcs3/Emu/Cell/PPUDisAsm.cpp +++ b/rpcs3/Emu/Cell/PPUDisAsm.cpp @@ -330,7 +330,7 @@ void comment_constant(std::string& last_opcode, u64 value, bool print_float = fa // Comment constant formation fmt::append(last_opcode, " #0x%xh", value); - if (print_float && ((value >> 31) <= 1u || (value >> 31) == 0x1'ffff'ffffu)) + if (print_float && ((value >> 31) <= 1u || (value >> 31) == 0x1'ffff'ffffu) && (value > 0x3fffff && (value << 32 >> 32) < 0xffc00000)) { const f32 float_val = std::bit_cast(static_cast(value)); diff --git a/rpcs3/Emu/Cell/SPUDisAsm.h b/rpcs3/Emu/Cell/SPUDisAsm.h index 0d5862025b..5b1f097393 100644 --- a/rpcs3/Emu/Cell/SPUDisAsm.h +++ b/rpcs3/Emu/Cell/SPUDisAsm.h @@ -903,8 +903,14 @@ public: if (auto [is_const, value] = try_get_const_equal_value_array(+op.ra); is_const) { + if (value % 0x200 != 0) + { + // si10 is overwritten - likely an analysis mistake + return; + } + // Comment constant formation - comment_constant(last_opcode, value | static_cast(op.si10)); + comment_constant(last_opcode, value | static_cast(op.si10), false); } } void ORHI(spu_opcode_t op) @@ -941,8 +947,14 @@ public: if (auto [is_const, value] = try_get_const_equal_value_array(op.ra); is_const) { + if (value % 0x200 != 0) + { + // si10 is overwritten - likely an analysis mistake + return; + } + // Comment constant formation - comment_constant(last_opcode, value + static_cast(op.si10)); + comment_constant(last_opcode, value + static_cast(op.si10), false); } } void AHI(spu_opcode_t op) @@ -963,8 +975,14 @@ public: if (auto [is_const, value] = try_get_const_equal_value_array(op.ra); is_const) { + if (value % 0x200 != 0) + { + // si10 is overwritten - likely an analysis mistake + return; + } + // Comment constant formation - comment_constant(last_opcode, value ^ static_cast(op.si10)); + comment_constant(last_opcode, value ^ static_cast(op.si10), false); } } void XORHI(spu_opcode_t op)