Browse Source

* fixed WebAssembly code generation in thlcgwasm.g_overflowCheck_loc (patch by Pierre)

Nikolay Nikolov 3 years ago
parent
commit
6e4e3b8580
1 changed files with 2 additions and 0 deletions
  1. 2 0
      compiler/wasm32/hlcgcpu.pas

+ 2 - 0
compiler/wasm32/hlcgcpu.pas

@@ -2164,8 +2164,10 @@ implementation
       if not(cs_check_overflow in current_settings.localswitches) then
       if not(cs_check_overflow in current_settings.localswitches) then
         exit;
         exit;
       current_asmdata.getjumplabel(hl);
       current_asmdata.getjumplabel(hl);
+      list.concat(taicpu.op_none(a_block));
       a_cmp_const_loc_label(list,s32inttype,OC_EQ,0,ovloc,hl);
       a_cmp_const_loc_label(list,s32inttype,OC_EQ,0,ovloc,hl);
       g_call_system_proc(list,'fpc_overflow',[],nil);
       g_call_system_proc(list,'fpc_overflow',[],nil);
+      list.concat(taicpu.op_none(a_end_block));
       a_label(list,hl);
       a_label(list,hl);
     end;
     end;