* bail out early in MatchInstruction

This commit is contained in:
florian 2021-10-04 22:18:53 +02:00
parent 01a449c807
commit 1e136b0cc7

View File

@ -278,15 +278,16 @@ unit aoptx86;
op : TAsmOp; op : TAsmOp;
begin begin
result:=false; result:=false;
if (instr.typ <> ait_instruction) or
((opsize <> []) and not(taicpu(instr).opsize in opsize)) then
exit;
for op in ops do for op in ops do
begin begin
if (instr.typ = ait_instruction) and if taicpu(instr).opcode = op then
(taicpu(instr).opcode = op) and begin
((opsize = []) or (taicpu(instr).opsize in opsize)) then result:=true;
begin exit;
result:=true; end;
exit;
end;
end; end;
end; end;