Prechádzať zdrojové kódy

* fix bug in thlcgwasm.a_load_reg_reg when fromsize is a 32-bit pointer and tosize is 64-bit

Nikolay Nikolov 3 dní pred
rodič
commit
8531a81aab
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      compiler/wasm32/hlcgcpu.pas

+ 1 - 1
compiler/wasm32/hlcgcpu.pas

@@ -1437,7 +1437,7 @@ implementation
   procedure thlcgwasm.a_load_reg_reg(list: TAsmList; fromsize, tosize: tdef; reg1, reg2: tregister);
   procedure thlcgwasm.a_load_reg_reg(list: TAsmList; fromsize, tosize: tdef; reg1, reg2: tregister);
     begin
     begin
       a_load_reg_stack(list,fromsize,reg1);
       a_load_reg_stack(list,fromsize,reg1);
-      if def2regtyp(fromsize)=R_INTREGISTER then
+      if def2regtyp(fromsize) in [R_INTREGISTER,R_ADDRESSREGISTER] then
         resize_stack_int_val(list,fromsize,tosize,false);
         resize_stack_int_val(list,fromsize,tosize,false);
       a_load_stack_reg(list,tosize,reg2);
       a_load_stack_reg(list,tosize,reg2);
     end;
     end;