mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 06:08:55 +02:00
* fixed WebAssembly code generation for not(cbool64)
This commit is contained in:
parent
9aefda1e6a
commit
d2726c2406
@ -571,14 +571,15 @@ implementation
|
||||
end
|
||||
else if (op=OP_NOT) and is_cbool(size) then
|
||||
begin
|
||||
list.concat(taicpu.op_none(a_i64_eqz));
|
||||
current_asmdata.CurrAsmList.Concat(taicpu.op_functype(a_if,TWasmFuncType.Create([],[wbt_i64])));
|
||||
incblock;
|
||||
decstack(current_asmdata.CurrAsmList,1);
|
||||
current_asmdata.CurrAsmList.Concat( taicpu.op_const(a_i64_const, 0) );
|
||||
current_asmdata.CurrAsmList.Concat( taicpu.op_const(a_i64_const, -1) );
|
||||
incstack(current_asmdata.CurrAsmList,1);
|
||||
current_asmdata.CurrAsmList.Concat( taicpu.op_none(a_else) );
|
||||
decstack(current_asmdata.CurrAsmList,1);
|
||||
current_asmdata.CurrAsmList.Concat( taicpu.op_const(a_i64_const, -1) );
|
||||
current_asmdata.CurrAsmList.Concat( taicpu.op_const(a_i64_const, 0) );
|
||||
incstack(current_asmdata.CurrAsmList,1);
|
||||
current_asmdata.CurrAsmList.concat(taicpu.op_none(a_end_if));
|
||||
thlcgwasm(hlcg).decblock;
|
||||
|
Loading…
Reference in New Issue
Block a user