Closed meithecatte closed 1 year ago
this feels like a glaring oversight! i'm surprised i'd never noticed this either. is_jcc
, is_setcc
, and is_cmovc
helpers on the various Opcode
certainly seem reasonable to me.
(those helpers are now on all three forms of Opcode
, and will get published as part of an eventual 1.1.6 release)
Currently,
Opcode::condition
provides some facilities for handling Jcc, SETcc and CMOVcc with common code for the condition codes themselves. However, you still need to list all the 16 conditional jumps in a match, or do ugly string processing hacks, to actually check whether an Opcode is a Jcc, or whether it is SETcc or CMOVcc.