mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 05:29:30 +02:00
* 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:
parent
0fae32d2b7
commit
0a923963a9
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user