Refuse A_Jcc, A_SETcc, and A_CMOVcc without condition

This commit is contained in:
Pierre Muller 2022-12-10 19:50:47 +00:00
parent a592636d9c
commit e2905b8fad
2 changed files with 7 additions and 1 deletions

View File

@ -1035,6 +1035,10 @@ Implementation
if (gas_needsuffix[actopcode]=attsufINTdual) xor (suflen=2) then
continue;
{ We need to refuse the opcodes that require a condition }
if (actopcode=A_Jcc) or (actopcode=A_SETcc) or (actopcode=A_CMOVcc) then
actopcode:=A_NONE;
if actopcode<>A_NONE then
begin
if gas_needsuffix[actopcode]=attsufFPU then

View File

@ -207,7 +207,9 @@ Unit Rax86int;
{ Search opcodes }
actopcode:=tasmop(PtrUInt(iasmops.Find(s)));
if actopcode<>A_NONE then
{ We need to exclude opcodes that require a condition suffix }
if (actopcode<>A_NONE) and (actopcode<>A_Jcc) and
(actopcode<>A_SETcc) and (actopcode<>A_CMOVcc) then
begin
actasmtoken:=AS_OPCODE;
result:=TRUE;