Browse Source

+ also ensure that ref.base and ref.index are not set for symbols in thlcgwasm.a_loadaddr_ref_reg

git-svn-id: branches/wasm@47940 -
nickysn 4 years ago
parent
commit
46bf123fcd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/wasm32/hlcgcpu.pas

+ 1 - 1
compiler/wasm32/hlcgcpu.pas

@@ -1153,7 +1153,7 @@ implementation
 
   procedure thlcgwasm.a_loadaddr_ref_reg(list: TAsmList; fromsize, tosize: tdef; const ref: treference; r: tregister);
     begin
-      if assigned(ref.symbol) then
+      if assigned(ref.symbol) and (ref.base=NR_NO) and (ref.index=NR_NO) then
         begin
           // pushing address on stack
           list.Concat(taicpu.op_ref(a_i32_const, ref));