Ver código fonte

+ support local label data access in the i8086 inline asm (fixes test tlbldat1.pp)

git-svn-id: trunk@32179 -
nickysn 9 anos atrás
pai
commit
ef5e368327
2 arquivos alterados com 25 adições e 0 exclusões
  1. 21 0
      compiler/rautils.pas
  2. 4 0
      compiler/x86/rax86int.pas

+ 21 - 0
compiler/rautils.pas

@@ -922,6 +922,27 @@ Begin
         SetupVar:=TRUE;
         Exit;
       end;
+{$ifdef i8086}
+    labelsym :
+      begin
+        case opr.typ of
+          OPR_REFERENCE:
+            begin
+              opr.ref.symbol:=current_asmdata.RefAsmSymbol(tlabelsym(sym).mangledname);
+              if opr.ref.segment=NR_NO then
+                opr.ref.segment:=NR_CS;
+            end;
+          else
+            begin
+              Message(asmr_e_unsupported_symbol_type);
+              exit;
+            end;
+        end;
+        hasvar:=true;
+        SetupVar:=TRUE;
+        Exit;
+      end
+{$endif i8086}
     else
       begin
         Message(asmr_e_unsupported_symbol_type);

+ 4 - 0
compiler/x86/rax86int.pas

@@ -1263,6 +1263,10 @@ Unit Rax86int;
                           end
                         else
                           oper.opr.ref.relsymbol:=hl;
+{$ifdef i8086}
+                        if oper.opr.ref.segment=NR_NO then
+                          oper.opr.ref.segment:=NR_CS;
+{$endif i8086}
                       end
                    else
                     if oper.SetupVar(tempstr,GotOffset) then