From e1438b72adefe9eb26e4768bc79e1a897753fdfb Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 31 Oct 2019 17:44:01 +0100 Subject: [PATCH] Fix types of wasm builtins. --- libyul/backends/wasm/WasmDialect.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libyul/backends/wasm/WasmDialect.cpp b/libyul/backends/wasm/WasmDialect.cpp index f781292ae..67c732e4d 100644 --- a/libyul/backends/wasm/WasmDialect.cpp +++ b/libyul/backends/wasm/WasmDialect.cpp @@ -46,12 +46,22 @@ WasmDialect::WasmDialect(): }) addFunction(name, 2, 1); + m_functions["i64.lt_u"_yulstring].returns.front() = "i32"_yulstring; + m_functions["i64.gt_u"_yulstring].returns.front() = "i32"_yulstring; + m_functions["i64.le_u"_yulstring].returns.front() = "i32"_yulstring; + m_functions["i64.ge_u"_yulstring].returns.front() = "i32"_yulstring; + m_functions["i64.eq"_yulstring].returns.front() = "i32"_yulstring; + m_functions["i64.ne"_yulstring].returns.front() = "i32"_yulstring; + addFunction("i64.eqz", 1, 1); + m_functions["i64.eqz"_yulstring].returns.front() = "i32"_yulstring; addFunction("i64.store", 2, 0, false); + m_functions["i64.store"_yulstring].parameters.front() = "i32"_yulstring; m_functions["i64.store"_yulstring].sideEffects.invalidatesStorage = false; addFunction("i64.load", 1, 1, false); + m_functions["i64.load"_yulstring].parameters.front() = "i32"_yulstring; m_functions["i64.load"_yulstring].sideEffects.invalidatesStorage = false; m_functions["i64.load"_yulstring].sideEffects.invalidatesMemory = false; m_functions["i64.load"_yulstring].sideEffects.sideEffectFree = true;