summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-04-05 23:56:23 +0000
committernickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-04-05 23:56:23 +0000
commit29d0bb0b663158599cf2bfe2b3507d21c8805cce (patch)
tree0e42a20df1c3141f94691974b616ef96ca94fd6a
parent9ccb3fa2c94415d5e843cfee023cfa96c6dbd030 (diff)
downloadfpc-29d0bb0b663158599cf2bfe2b3507d21c8805cce.tar.gz
* handle aitconst_farptr with a constant (nil) directly in the internal asm
writer, without calling writereloc git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@30457 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r--compiler/assemble.pas8
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/assemble.pas b/compiler/assemble.pas
index 118a0aed00..6712714202 100644
--- a/compiler/assemble.pas
+++ b/compiler/assemble.pas
@@ -1647,7 +1647,13 @@ Implementation
end;
{$ifdef i8086}
aitconst_farptr :
- ObjData.writereloc(Tai_const(hp).symofs,sizeof(longint),Objdata.SymbolRef(tai_const(hp).sym),RELOC_FARPTR);
+ if assigned(tai_const(hp).sym) and
+ not assigned(tai_const(hp).endsym) then
+ ObjData.writereloc(Tai_const(hp).symofs,tai_const(hp).size,Objdata.SymbolRef(tai_const(hp).sym),RELOC_FARPTR)
+ else if relative_reloc then
+ internalerror(2015040601)
+ else
+ ObjData.writebytes(Tai_const(hp).value,tai_const(hp).size);
{$endif i8086}
{$ifdef arm}
aitconst_got: