Skip to main content

dr_save_arith_flags

Function dr_save_arith_flags 

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

Inserts into \p ilist prior to \p where meta-instruction(s) to save the 6 arithmetic flags into xax after first saving xax to the spill slot \p slot. This is equivalent to dr_save_reg() of xax to \p slot followed by lahf and seto al instructions. See dr_restore_arith_flags().

\warning At completion of the inserted instructions the saved flags are in the xax register. The xax register should not be modified after using this routine unless it is first saved (and later restored prior to using dr_restore_arith_flags()).

\note X86-only

\deprecated This routine is equivalent to dr_save_reg() followed by dr_save_arith_flags_to_xax().