mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 16:49:00 +02:00
Refuse A_Jcc, A_SETcc, and A_CMOVcc without condition
This commit is contained in:
parent
a592636d9c
commit
e2905b8fad
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user