* use the eqz instruction instead of "xor 1" in twasmwhilerepeatnode.pass_generate_code_condition for reversing the condition

git-svn-id: branches/wasm@48030 -
This commit is contained in:
nickysn 2021-01-04 11:24:02 +00:00
parent 0fae32d2b7
commit 0a923963a9

View File

@ -69,11 +69,9 @@ begin
secondpass(left); secondpass(left);
// reversing the condition // reversing the condition
// todo: there should be a better approach if not (lnf_checknegate in loopflags) then
if not (lnf_checknegate in loopflags) then begin current_asmdata.CurrAsmList.concat(taicpu.op_none(a_i32_eqz));
current_asmdata.CurrAsmList.concat(taicpu.op_const(a_i32_const,1) );
current_asmdata.CurrAsmList.concat(taicpu.op_none(a_i32_xor) );
end;
current_asmdata.CurrAsmList.concat(taicpu.op_const(a_br_if,1) ); current_asmdata.CurrAsmList.concat(taicpu.op_const(a_br_if,1) );
end; end;