Przeglądaj źródła

+ 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 lat temu
rodzic
commit
46bf123fcd
1 zmienionych plików z 1 dodań i 1 usunięć
  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));