drreg.h File Reference

Header for DynamoRIO Register Management Extension. More...

#include "drmgr.h"
#include "drvector.h"

Data Structures

struct  _drreg_options_t
 
struct  _drreg_reserve_info_t
 

Macros

#define DRMGR_PRIORITY_NAME_DRREG_HIGH   "drreg_high"
 
#define DRMGR_PRIORITY_NAME_DRREG_LOW   "drreg_low"
 
#define DRMGR_PRIORITY_NAME_DRREG_FAULT   "drreg_fault"
 

Typedefs

typedef struct _drreg_options_t drreg_options_t
 
typedef struct _drreg_reserve_info_t drreg_reserve_info_t
 

Enumerations

enum  drreg_status_t {
  DRREG_SUCCESS,
  DRREG_ERROR,
  DRREG_ERROR_INVALID_PARAMETER,
  DRREG_ERROR_FEATURE_NOT_AVAILABLE,
  DRREG_ERROR_REG_CONFLICT,
  DRREG_ERROR_IN_USE,
  DRREG_ERROR_OUT_OF_SLOTS,
  DRREG_ERROR_NO_APP_VALUE
}
 
enum  {
  DRMGR_PRIORITY_INSERT_DRREG_HIGH = -7500,
  DRMGR_PRIORITY_INSERT_DRREG_LOW = 7500,
  DRMGR_PRIORITY_FAULT_DRREG = -7500
}
 
enum  drreg_bb_properties_t {
  DRREG_CONTAINS_SPANNING_CONTROL_FLOW = 0x001,
  DRREG_IGNORE_CONTROL_FLOW = 0x002,
  DRREG_USER_RESTORES_AT_BB_END = 0x004,
  DRREG_HANDLE_MULTI_PHASE_SLOT_RESERVATIONS = 0x008
}
 

Functions

DR_EXPORT drreg_status_t drreg_init (drreg_options_t *ops)
 
DR_EXPORT drreg_status_t drreg_exit (void)
 
DR_EXPORT drreg_status_t drreg_max_slots_used (DR_PARAM_OUT uint *max)
 
DR_EXPORT drreg_status_t drreg_reserve_aflags (void *drcontext, instrlist_t *ilist, instr_t *where)
 
DR_EXPORT drreg_status_t drreg_unreserve_aflags (void *drcontext, instrlist_t *ilist, instr_t *where)
 
DR_EXPORT drreg_status_t drreg_aflags_liveness (void *drcontext, instr_t *inst, DR_PARAM_OUT uint *value)
 
DR_EXPORT drreg_status_t drreg_are_aflags_dead (void *drcontext, instr_t *inst, bool *dead)
 
DR_EXPORT drreg_status_t drreg_restore_app_aflags (void *drcontext, instrlist_t *ilist, instr_t *where)
 
DR_EXPORT drreg_status_t drreg_reserve_register (void *drcontext, instrlist_t *ilist, instr_t *where, drvector_t *reg_allowed, DR_PARAM_OUT reg_id_t *reg)
 
DR_EXPORT drreg_status_t drreg_reserve_dead_register (void *drcontext, instrlist_t *ilist, instr_t *where, drvector_t *reg_allowed, DR_PARAM_OUT reg_id_t *reg)
 
DR_EXPORT drreg_status_t drreg_init_and_fill_vector (drvector_t *vec, bool allowed)
 
DR_EXPORT drreg_status_t drreg_set_vector_entry (drvector_t *vec, reg_id_t reg, bool allowed)
 
DR_EXPORT drreg_status_t drreg_get_app_value (void *drcontext, instrlist_t *ilist, instr_t *where, reg_id_t app_reg, reg_id_t dst_reg)
 
DR_EXPORT drreg_status_t drreg_restore_app_values (void *drcontext, instrlist_t *ilist, instr_t *where, opnd_t opnd, DR_PARAM_INOUT reg_id_t *swap)
 
DR_EXPORT drreg_status_t drreg_restore_all (void *drcontext, instrlist_t *bb, instr_t *where)
 
DR_EXPORT drreg_status_t drreg_statelessly_restore_app_value (void *drcontext, instrlist_t *ilist, reg_id_t reg, instr_t *where_restore, instr_t *where_respill, bool *restore_needed DR_PARAM_OUT, bool *respill_needed DR_PARAM_OUT)
 
DR_EXPORT drreg_status_t drreg_statelessly_restore_all (void *drcontext, instrlist_t *ilist, instr_t *where_restore, instr_t *where_respill, bool *restore_needed DR_PARAM_OUT, bool *respill_needed DR_PARAM_OUT)
 
DR_EXPORT drreg_status_t drreg_reservation_info (void *drcontext, reg_id_t reg, opnd_t *opnd DR_PARAM_OUT, bool *is_dr_slot DR_PARAM_OUT, uint *tls_offs DR_PARAM_OUT)
 
DR_EXPORT drreg_status_t drreg_reservation_info_ex (void *drcontext, reg_id_t reg, drreg_reserve_info_t *info DR_PARAM_OUT)
 
DR_EXPORT drreg_status_t drreg_unreserve_register (void *drcontext, instrlist_t *ilist, instr_t *where, reg_id_t reg)
 
DR_EXPORT drreg_status_t drreg_is_register_dead (void *drcontext, reg_id_t reg, instr_t *inst, bool *dead)
 
DR_EXPORT drreg_status_t drreg_set_bb_properties (void *drcontext, drreg_bb_properties_t flags)
 
DR_EXPORT drreg_status_t drreg_is_instr_spill_or_restore (void *drcontext, instr_t *instr, bool *spill DR_PARAM_OUT, bool *restore DR_PARAM_OUT, reg_id_t *reg_spilled DR_PARAM_OUT)
 

Detailed Description

Header for DynamoRIO Register Management Extension.