Explorar o código

* fixed getting of float function result after call

git-svn-id: branches/wasm@48280 -
nickysn %!s(int64=4) %!d(string=hai) anos
pai
achega
84e2299399
Modificáronse 1 ficheiros con 9 adicións e 1 borrados
  1. 9 1
      compiler/wasm32/hlcgcpu.pas

+ 9 - 1
compiler/wasm32/hlcgcpu.pas

@@ -1175,6 +1175,7 @@ implementation
       extra_sslots,
       extra_dslots: longint;
       tmpsref, tmpdref: treference;
+      tmpreg: tregister;
     begin
       if sref.base<>NR_EVAL_STACK_BASE then
         begin
@@ -1190,7 +1191,14 @@ implementation
           a_load_stack_ref(list,tosize,tmpdref,extra_dslots);
         end
       else
-        inherited;
+        begin
+          { verify if we have the same reference }
+          if references_equal(sref,dref) then
+            exit;
+          tmpreg:=getregisterfordef(list,tosize);
+          a_load_ref_reg(list,fromsize,tosize,sref,tmpreg);
+          a_load_reg_ref(list,tosize,tosize,tmpreg,dref);
+        end;
     end;
 
   procedure thlcgwasm.a_loadaddr_ref_reg(list: TAsmList; fromsize, tosize: tdef; const ref: treference; r: tregister);