Browse Source

* allocate the base and frame pointer correctly as locals after the previous commit

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

+ 3 - 2
compiler/wasm32/hlcgcpu.pas

@@ -1673,8 +1673,9 @@ implementation
       pd:=tcpuprocdef(current_procinfo.procdef);
       pd:=tcpuprocdef(current_procinfo.procdef);
       g_procdef(list,pd);
       g_procdef(list,pd);
 
 
-      tg.gethltemp(list,voidpointertype,voidpointertype.size,tt_persistent,pd.frame_pointer_ref);
-      tg.gethltemp(list,voidpointertype,voidpointertype.size,tt_persistent,pd.base_pointer_ref);
+      { hack: we use tt_regallocator to force a local }
+      tg.gethltemp(list,voidpointertype,voidpointertype.size,tt_regallocator,pd.frame_pointer_ref);
+      tg.gethltemp(list,voidpointertype,voidpointertype.size,tt_regallocator,pd.base_pointer_ref);
 
 
       { the localsize is based on tg.lasttemp -> already in terms of stack
       { the localsize is based on tg.lasttemp -> already in terms of stack
         slots rather than bytes }
         slots rather than bytes }