mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 00:09:23 +02:00
+ introduced is_ref_in_opertypes
git-svn-id: branches/z80@44764 -
This commit is contained in:
parent
54ad38288b
commit
c9ac7afba7
@ -84,6 +84,8 @@ uses
|
|||||||
OT_REF_IY, { memory contents at address in register IY }
|
OT_REF_IY, { memory contents at address in register IY }
|
||||||
OT_REF_IX_d, { memory contents at address in register IX+d, d is in [-128..127] }
|
OT_REF_IX_d, { memory contents at address in register IX+d, d is in [-128..127] }
|
||||||
OT_REF_IY_d); { memory contents at address in register IY+d, d is in [-128..127] }
|
OT_REF_IY_d); { memory contents at address in register IY+d, d is in [-128..127] }
|
||||||
|
trefoperandtype = OT_REF_ADDR16..OT_REF_IY_d;
|
||||||
|
trefoperandtypes = set of trefoperandtype;
|
||||||
|
|
||||||
tinsentry = record
|
tinsentry = record
|
||||||
opcode : tasmop;
|
opcode : tasmop;
|
||||||
@ -143,6 +145,7 @@ uses
|
|||||||
function is_ref_ix_d(const ref:treference): Boolean;
|
function is_ref_ix_d(const ref:treference): Boolean;
|
||||||
function is_ref_iy_d(const ref:treference): Boolean;
|
function is_ref_iy_d(const ref:treference): Boolean;
|
||||||
function is_ref_opertype(const ref:treference;opertype:toperandtype): Boolean;
|
function is_ref_opertype(const ref:treference;opertype:toperandtype): Boolean;
|
||||||
|
function is_ref_in_opertypes(const ref:treference;const refopertypes:trefoperandtypes): Boolean;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -447,6 +450,18 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function is_ref_in_opertypes(const ref: treference; const refopertypes: trefoperandtypes): Boolean;
|
||||||
|
var
|
||||||
|
ot: trefoperandtype;
|
||||||
|
begin
|
||||||
|
result:=true;
|
||||||
|
for ot:=low(trefoperandtypes) to high(trefoperandtypes) do
|
||||||
|
if (ot in refopertypes) and is_ref_opertype(ref,ot) then
|
||||||
|
exit;
|
||||||
|
result:=false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure InitAsm;
|
procedure InitAsm;
|
||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user