浏览代码

* WebAssembly code generation fix in thlcgwasm.a_op_reg_reg_reg_checkoverflow, based on patch by Pierre (but simplified, to use a single block)

Nikolay Nikolov 3 年之前
父节点
当前提交
8bea5dd41e
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      compiler/wasm32/hlcgcpu.pas

+ 2 - 0
compiler/wasm32/hlcgcpu.pas

@@ -1734,9 +1734,11 @@ implementation
               current_asmdata.getjumplabel(lab);
               { can be optimized by removing duplicate xor'ing to convert dst from
                 signed to unsigned quadrant }
+              list.concat(taicpu.op_none(a_block));
               a_cmp_reg_reg_label(list,size,OC_B,dst,src1,lab);
               a_cmp_reg_reg_label(list,size,OC_B,dst,src2,lab);
               a_op_const_stack(list,OP_XOR,s32inttype,1);
+              list.concat(taicpu.op_none(a_end_block));
               a_label(list,lab);
             end;
           a_load_stack_reg(list,s32inttype,ovloc.register);