diff --git a/src/common/fp/op/FPRecipExponent.cpp b/src/common/fp/op/FPRecipExponent.cpp index 4e0224e7..eafad6a9 100644 --- a/src/common/fp/op/FPRecipExponent.cpp +++ b/src/common/fp/op/FPRecipExponent.cpp @@ -48,8 +48,9 @@ FPT FPRecipExponent(FPT op, FPCR fpcr, FPSR& fpsr) { } // Infinities and normals - const auto negated_exponent = (~exponent << FPInfo::explicit_mantissa_width) & FPInfo::exponent_mask; - return FPT(sign_bits | negated_exponent); + const FPT negated_exponent = FPT(~exponent); + const FPT adjusted_exponent = FPT(negated_exponent << FPInfo::explicit_mantissa_width) & FPInfo::exponent_mask; + return FPT(sign_bits | adjusted_exponent); } template u16 FPRecipExponent(u16 op, FPCR fpcr, FPSR& fpsr);