From baf5ff4e05987a027d8912aa231ecd3c79147dd1 Mon Sep 17 00:00:00 2001 From: Nikolay Nikolov Date: Fri, 1 Oct 2021 04:40:50 +0300 Subject: [PATCH] * another WebAssembly cbool fix in twasmtypeconvnode.second_int_to_bool --- compiler/wasm32/nwasmcnv.pas | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/wasm32/nwasmcnv.pas b/compiler/wasm32/nwasmcnv.pas index 0557d534b9..41f93bccbb 100644 --- a/compiler/wasm32/nwasmcnv.pas +++ b/compiler/wasm32/nwasmcnv.pas @@ -141,20 +141,20 @@ implementation current_asmdata.CurrAsmList.Concat(taicpu.op_functype(a_if,TWasmFuncType.Create([],[wbt_i32]))); thlcgwasm(hlcg).incblock; thlcgwasm(hlcg).decstack(current_asmdata.CurrAsmList,1); - if is_64bit(left.resultdef) then + if is_64bit(resultdef) then current_asmdata.CurrAsmList.Concat( taicpu.op_const(a_i64_const, -1) ) - else if is_32bit(left.resultdef) then + else if is_32bit(resultdef) then current_asmdata.CurrAsmList.Concat( taicpu.op_const(a_i32_const, -1) ) - else if is_16bit(left.resultdef) then + else if is_16bit(resultdef) then current_asmdata.CurrAsmList.Concat( taicpu.op_const(a_i32_const, 65535) ) - else if is_8bit(left.resultdef) then + else if is_8bit(resultdef) then current_asmdata.CurrAsmList.Concat( taicpu.op_const(a_i32_const, 255) ) else internalerror(2021100101); thlcgwasm(hlcg).incstack(current_asmdata.CurrAsmList,1); current_asmdata.CurrAsmList.Concat( taicpu.op_none(a_else) ); thlcgwasm(hlcg).decstack(current_asmdata.CurrAsmList,1); - if is_64bit(left.resultdef) then + if is_64bit(resultdef) then current_asmdata.CurrAsmList.Concat( taicpu.op_const(a_i64_const, 0) ) else current_asmdata.CurrAsmList.Concat( taicpu.op_const(a_i32_const, 0) );