Browse Source

+ support global references with offset in the LLVM-MC asm writer

git-svn-id: branches/wasm@47166 -
nickysn 5 năm trước cách đây
mục cha
commit
19519eb3d2
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      compiler/wasm32/agllvmmc.pas

+ 4 - 0
compiler/wasm32/agllvmmc.pas

@@ -186,6 +186,10 @@ implementation
             // This register is not part of this instruction, it will have
             // been placed on the stack by the previous one.
             result:=ref.symbol.name;
+            if ref.offset>0 then
+              result:=result+'+'+tostr(ref.offset)
+            else if ref.offset<0 then
+              result:=result+tostr(ref.offset);
           end
         else
           begin