Browse Source

* fixed 'not(boolean64)' for WebAssembly

Nikolay Nikolov 4 năm trước cách đây
mục cha
commit
188a21bbfd
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      compiler/wasm32/hlcgcpu.pas

+ 4 - 1
compiler/wasm32/hlcgcpu.pas

@@ -544,7 +544,10 @@ implementation
             { boolean not: =0? for boolean }
             { boolean not: =0? for boolean }
             { todo: should we also do this for cbool? }
             { todo: should we also do this for cbool? }
             if (op=OP_NOT) and is_pasbool(size) then
             if (op=OP_NOT) and is_pasbool(size) then
-              list.concat(taicpu.op_none(a_i64_eqz))
+              begin
+                list.concat(taicpu.op_none(a_i64_eqz));
+                list.concat(taicpu.op_none(a_i64_extend_i32_u));
+              end
             else
             else
               begin
               begin
                 if op=OP_NOT then
                 if op=OP_NOT then