From e6ebb222bf4182e4dd37d2f70a0a8351d4cb0a8e Mon Sep 17 00:00:00 2001 From: Rerumu Date: Mon, 27 Jun 2022 20:24:01 -0400 Subject: [PATCH] Add truncation for `f32` and `f64` --- codegen/luajit/runtime/runtime.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/codegen/luajit/runtime/runtime.lua b/codegen/luajit/runtime/runtime.lua index d739931..5490847 100644 --- a/codegen/luajit/runtime/runtime.lua +++ b/codegen/luajit/runtime/runtime.lua @@ -324,6 +324,8 @@ do trunc.i64_f64 = i64 trunc.u64_f32 = i64 trunc.u64_f64 = i64 + trunc.f32 = truncate + trunc.f64 = truncate function extend.i32_i8(num) num = bit_and(num, 0xFF)