Skip to content

Commit 5d2483f

Browse files
authored
fix #13479 (#13503)
1 parent e4ed19c commit 5d2483f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/vm.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,11 +580,11 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
580580
of opcCastIntToFloat32:
581581
let rb = instr.regB
582582
ensureKind(rkFloat)
583-
regs[ra].floatVal = cast[float32](int32(regs[rb].intVal))
583+
regs[ra].floatVal = cast[float32](regs[rb].intVal)
584584
of opcCastIntToFloat64:
585585
let rb = instr.regB
586586
ensureKind(rkFloat)
587-
regs[ra].floatVal = cast[float64](int64(regs[rb].intVal))
587+
regs[ra].floatVal = cast[float64](regs[rb].intVal)
588588

589589
of opcCastPtrToInt: # RENAME opcCastPtrOrRefToInt
590590
decodeBImm(rkInt)

0 commit comments

Comments
 (0)