mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 08:51:10 +02:00
* refactored tx86intreader.AddReferences to use a pair of case statements,
depending on the combination of operand types; this is done, so that adding OPR_LOCAL with OPR_REFERENCE operands can be supported later. git-svn-id: trunk@38443 -
This commit is contained in:
parent
0f6a88b0c7
commit
d3cb61b651
@ -828,8 +828,12 @@ Unit Rax86int;
|
||||
end;
|
||||
|
||||
begin
|
||||
if (dest.opr.typ<>OPR_REFERENCE) or (src.opr.typ<>OPR_REFERENCE) then
|
||||
internalerror(2018022601);
|
||||
case dest.opr.typ of
|
||||
OPR_REFERENCE:
|
||||
begin
|
||||
case src.opr.typ of
|
||||
OPR_REFERENCE:
|
||||
begin
|
||||
AddRegister(src.opr.ref.base,1);
|
||||
AddRegister(src.opr.ref.index,src.opr.ref.scalefactor);
|
||||
if src.opr.ref.segment<>NR_NO then
|
||||
@ -854,6 +858,14 @@ Unit Rax86int;
|
||||
if dest.opr.ref.refaddr=addr_no then
|
||||
dest.opr.ref.refaddr:=src.opr.ref.refaddr;
|
||||
end;
|
||||
else
|
||||
internalerror(2018030701);
|
||||
end;
|
||||
end;
|
||||
else
|
||||
internalerror(2018030702);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure tx86intreader.SetSegmentOverride(oper:tx86operand;seg:tregister);
|
||||
|
Loading…
Reference in New Issue
Block a user