Browse Source

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

git-svn-id: branches/wasm@47166 -
nickysn 4 years ago
parent
commit
19519eb3d2
1 changed files with 4 additions and 0 deletions
  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
             // This register is not part of this instruction, it will have
             // been placed on the stack by the previous one.
             // been placed on the stack by the previous one.
             result:=ref.symbol.name;
             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
           end
         else
         else
           begin
           begin