Skip to main content

dr_restore_arith_flags_from_xax

Function dr_restore_arith_flags_from_xax 

Source
pub unsafe extern "C" fn dr_restore_arith_flags_from_xax(
    drcontext: *mut c_void,
    ilist: *mut instrlist_t,
    where_: *mut instr_t,
)
Expand description

Inserts into \p ilist prior to \p where meta-instruction(s) to restore the 6 arithmetic flags from xax. This currently uses DynamoRIO’s “add $0x7f %al ; sahf” code sequence, which is faster and easier than popf. The caller must ensure that xax contains the arithmetic flags, most likely from dr_save_arith_flags_to_xax(). \note X86-only