summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/int128.nim9
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/int128.nim b/compiler/int128.nim
index d85f96084..4791954a2 100644
--- a/compiler/int128.nim
+++ b/compiler/int128.nim
@@ -345,11 +345,10 @@ proc low64(a: Int128): uint64 =
   bitconcat(a.udata[1], a.udata[0])
 
 proc `*`*(lhs, rhs: Int128): Int128 =
-  let a32 = cast[uint64](lhs.udata[1])
-  let a00 = cast[uint64](lhs.udata[0])
-  let b32 = cast[uint64](rhs.udata[1])
-  let b00 = cast[uint64](rhs.udata[0])
-
+  let a32 = uint64(lhs.udata[1])
+  let a00 = uint64(lhs.udata[0])
+  let b32 = uint64(rhs.udata[1])
+  let b00 = uint64(rhs.udata[0])
   result = makeInt128(high64(lhs) * low64(rhs) + low64(lhs) * high64(rhs) + a32 * b32, a00 * b00)
   result += toInt128(a32 * b00) shl 32
   result += toInt128(a00 * b32) shl 32