dr_insert_save_fpstate

Function dr_insert_save_fpstate 

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

Inserts into \p ilist prior to \p where meta-instruction(s) to save the x87 floating point state into the 16-byte-aligned buffer referred to by \p buf, which must be 512 bytes for processors with the FXSR feature, and 108 bytes for those without (where this routine does not support 16-bit operand sizing). \p buf should have size of OPSZ_512; this routine will automatically adjust it to OPSZ_108 if necessary. \note proc_fpstate_save_size() can be used to determine the particular size needed.

When the FXSR feature is present, the fxsave format matches the bitwidth of the ISA mode of the current thread (see dr_get_isa_mode()).

The last floating-point instruction address is left in an untranslated state (i.e., it may point into the code cache).