浏览代码

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

git-svn-id: branches/wasm@47166 -
nickysn 5 年之前
父节点
当前提交
19519eb3d2
共有 1 个文件被更改,包括 4 次插入0 次删除
  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