Skip to main content

dr_insert_restore_fpstate

Function dr_insert_restore_fpstate 

Source
pub unsafe extern "C" fn dr_insert_restore_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 restore the x87 floating point state from the 16-byte-aligned buffer referred to by 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()).