summaryrefslogtreecommitdiff
path: root/compiler/rautils.pas
diff options
context:
space:
mode:
authornickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-10-28 17:22:37 +0000
committernickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-10-28 17:22:37 +0000
commit356b8422d7f9d4b4282b76f76bd69fe1f0747eaa (patch)
treecdefd0326dd0384d5dd3de2aea85b89172c7b9a1 /compiler/rautils.pas
parentf83ba04751b0c3460e7521fc6cabcb41b4f4e180 (diff)
downloadfpc-356b8422d7f9d4b4282b76f76bd69fe1f0747eaa.tar.gz
+ support local label data access in the i8086 inline asm (fixes test tlbldat1.pp)
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@32179 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/rautils.pas')
-rw-r--r--compiler/rautils.pas21
1 files changed, 21 insertions, 0 deletions
diff --git a/compiler/rautils.pas b/compiler/rautils.pas
index 185efcfc9d..b69340a5ee 100644
--- a/compiler/rautils.pas
+++ b/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);