Browse Source

* fixed thlcgwasm.a_load_loc_stack for LOC_REFERENCE

git-svn-id: branches/wasm@47971 -
nickysn 4 years ago
parent
commit
0e23b9288c
1 changed files with 3 additions and 1 deletions
  1. 3 1
      compiler/wasm32/hlcgcpu.pas

+ 3 - 1
compiler/wasm32/hlcgcpu.pas

@@ -437,6 +437,7 @@ implementation
   procedure thlcgwasm.a_load_loc_stack(list: TAsmList;size: tdef;const loc: tlocation);
     var
       tmpref: treference;
+      extra_slots: LongInt;
     begin
       case loc.loc of
         LOC_REGISTER,LOC_CREGISTER,
@@ -445,7 +446,8 @@ implementation
         LOC_REFERENCE,LOC_CREFERENCE:
           begin
             tmpref:=loc.reference;
-            a_load_ref_stack(list,size,loc.reference,prepare_stack_for_ref(list,tmpref,false));
+            extra_slots:=prepare_stack_for_ref(list,tmpref,false);
+            a_load_ref_stack(list,size,tmpref,extra_slots);
           end;
         LOC_CONSTANT:
           a_load_const_stack(list,size,loc.value,def2regtyp(size));