diff --git a/src/common/safe_ops.h b/src/common/safe_ops.h index bc6d7b88..eb833ebb 100644 --- a/src/common/safe_ops.h +++ b/src/common/safe_ops.h @@ -103,7 +103,7 @@ T ArithmeticShiftRightDouble(T top, T bottom, int shift_amount) { template T Negate(T value) { - return static_cast(-static_cast>(value)); + return static_cast(~static_cast(value) + 1); } } // namespace Dynarmic::Safe