summaryrefslogtreecommitdiff
path: root/compiler/aoptbase.pas
diff options
context:
space:
mode:
authornickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-05-11 14:21:26 +0000
committernickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-05-11 14:21:26 +0000
commit220f38099b4a67a57014ea13e9359607dc600cf1 (patch)
treebc1e52c8414804f7a0365389c540648af2c6cca3 /compiler/aoptbase.pas
parent144dcd21a5555a5f3f24cf049c2824bb0f8b26c8 (diff)
downloadfpc-220f38099b4a67a57014ea13e9359607dc600cf1.tar.gz
+ added a correct implementation of TAOptBase.SuperRegistersEqual for the Z80
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@45337 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/aoptbase.pas')
-rw-r--r--compiler/aoptbase.pas6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/aoptbase.pas b/compiler/aoptbase.pas
index 7ed67da54d..9aec57342f 100644
--- a/compiler/aoptbase.pas
+++ b/compiler/aoptbase.pas
@@ -335,7 +335,13 @@ unit aoptbase;
as SuperRegistersEqual is used a lot
}
+{$ifdef Z80}
+ { Z80 registers are indexed in an incompatible way (without R_SUBH), so it
+ needs a special check. }
+ Result:=super_registers_equal(reg1,reg2);
+{$else Z80}
Result:=(DWord(reg1) and $ff00ffff)=(DWord(reg2) and $ff00ffff);
+{$endif Z80}
end;
{ ******************* Processor dependent stuff *************************** }