emit_x64_floating_point: Fix EmitFPU64ToDouble for TowardsMinusInfinity rounding mode
This commit is contained in:
parent
a2eb9a02e0
commit
0b97e9bd8d
1 changed files with 3 additions and 0 deletions
|
@ -1112,6 +1112,9 @@ void EmitX64::EmitFPU64ToDouble(EmitContext& ctx, IR::Inst* inst) {
|
|||
code.subpd(tmp, code.MConst(xword, 0x4330000000000000, 0x4530000000000000));
|
||||
code.pshufd(result, tmp, 0b01001110);
|
||||
code.addpd(result, tmp);
|
||||
if (ctx.FPSCR_RMode() == FP::RoundingMode::TowardsMinusInfinity) {
|
||||
code.pand(result, code.MConst(xword, f64_non_sign_mask));
|
||||
}
|
||||
}
|
||||
|
||||
ctx.reg_alloc.DefineValue(inst, result);
|
||||
|
|
Loading…
Reference in a new issue