* allow cmov with memory reference if it is a pure symbol or a rip relative symbol: as the symbol is

allocated within the image of the program, this should never cause a seg. fault, so it is save
    to use cmov with it

git-svn-id: trunk@43368 -
This commit is contained in:
florian 2019-11-02 18:09:11 +00:00
parent 5ead23513d
commit c3ef42b164

View File

@ -3184,7 +3184,17 @@ unit aoptx86;
or ((taicpu(p).oper[0]^.typ = top_ref) and
(taicpu(p).oper[0]^.ref^.refaddr = addr_no))
}
MatchOpType(taicpu(p),top_reg,top_reg);
(MatchOpType(taicpu(p),top_reg,top_reg) or
{ allow references, but only pure symbols or got rel. addressing with RIP as based,
it is not expected that this can cause a seg. violation }
(MatchOpType(taicpu(p),top_ref,top_reg) and
(((taicpu(p).oper[0]^.ref^.base=NR_NO) and (taicpu(p).oper[0]^.ref^.refaddr=addr_no)) or
((taicpu(p).oper[0]^.ref^.base=NR_RIP) and (taicpu(p).oper[0]^.ref^.refaddr=addr_pic))
) and
(taicpu(p).oper[0]^.ref^.index=NR_NO) and
(taicpu(p).oper[0]^.ref^.offset=0)
)
);
end;