Pārlūkot izejas kodu

+ support got modifier on labels

git-svn-id: trunk@47851 -
florian 4 gadi atpakaļ
vecāks
revīzija
33afecd117
3 mainītis faili ar 20 papildinājumiem un 0 dzēšanām
  1. 1 0
      .gitattributes
  2. 2 0
      compiler/x86/rax86att.pas
  3. 17 0
      tests/tbs/tb0682.pp

+ 1 - 0
.gitattributes

@@ -13435,6 +13435,7 @@ tests/tbs/tb0678.pp svneol=native#text/pascal
 tests/tbs/tb0679.pp svneol=native#text/pascal
 tests/tbs/tb0680.pp svneol=native#text/pascal
 tests/tbs/tb0681.pp svneol=native#text/pascal
+tests/tbs/tb0682.pp svneol=native#text/pascal
 tests/tbs/ub0060.pp svneol=native#text/plain
 tests/tbs/ub0069.pp svneol=native#text/plain
 tests/tbs/ub0119.pp svneol=native#text/plain

+ 2 - 0
compiler/x86/rax86att.pas

@@ -649,6 +649,7 @@ Implementation
                  CreateLocalLabel(actasmpattern,hl,false);
                  Consume(AS_ID);
                  AddLabelOperand(hl);
+                 MaybeGetPICModifier(oper);
                end
               else
                { Check for label }
@@ -656,6 +657,7 @@ Implementation
                 begin
                   Consume(AS_ID);
                   AddLabelOperand(hl);
+                  MaybeGetPICModifier(oper);
                 end
               else
                { probably a variable or normal expression }

+ 17 - 0
tests/tbs/tb0682.pp

@@ -0,0 +1,17 @@
+{ %target=linux,openbsd,netbsd,freebsd }
+{ %cpu=i386 }
+{ %norun }
+{$goto on }
+label
+  l;
+
+begin
+  asm
+    movl l@GOT(%eax),%eax 
+    l:
+  end;
+  asm
+    movl .Ll@GOT(%eax),%eax 
+    .Ll:
+  end;
+end.