summaryrefslogtreecommitdiff
path: root/compiler/x86/aasmcpu.pas
diff options
context:
space:
mode:
authorflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2019-11-13 20:47:42 +0000
committerflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2019-11-13 20:47:42 +0000
commitd37bf13b57d9cfaefdd94206da741dc7aac70883 (patch)
treec4230f5e68efd0235a9a572ae51941b21ad1b940 /compiler/x86/aasmcpu.pas
parent73da3026ec871e78568878e3bbae4026e7b90a9b (diff)
downloadfpc-d37bf13b57d9cfaefdd94206da741dc7aac70883.tar.gz
* check in the internal assembler for references with incorrect use of RIP
+ test git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@43461 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/x86/aasmcpu.pas')
-rw-r--r--compiler/x86/aasmcpu.pas6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/x86/aasmcpu.pas b/compiler/x86/aasmcpu.pas
index 833145eceb..1c043c22dd 100644
--- a/compiler/x86/aasmcpu.pas
+++ b/compiler/x86/aasmcpu.pas
@@ -2572,6 +2572,9 @@ implementation
else
{ it's an indirection }
begin
+ if ((br=NR_RIP) and (ir<>NR_NO)) or
+ (ir=NR_RIP) then
+ message(asmw_e_illegal_use_of_rip);
{ 16 bit? }
if ((ir<>NR_NO) and (isub in [R_SUBMMX,R_SUBMMY,R_SUBMMZ]) and
@@ -3722,11 +3725,8 @@ implementation
begin
{ safety check }
-
if objdata.currobjsec.size<>longword(insoffset) then
- begin
internalerror(200130121);
- end;
{ those variables are initialized inside local procedures, the dfa cannot handle this yet }
currsym:=nil;