Core_Control_Register_Read Core_Device_Access_Memop
API Reference Manual  /  12 Haps  / 

Core_Control_Register_Write

Description
Triggered when a control register is written. Note that value is not (necessarily) the final contents in the register. When the callback is called, the processor register has not yet been updated with the new value.

If the callback routine breaks to the frontend by raising an exception, the instruction will be replayed possibly causing repeated memory operations.

For x86 processors, this hap is triggered by clts, lmsw, and mov. Also the hap is triggered when MSRs are written with wrmsr instruction. Page fault updates of CR2 should be caught with the Core_Exception hap.

For PowerPC processors, this hap is triggered by the mtspr, mtmsr, mtsr and mtsrin instructions (i.e. only explicit writes).

Callback Type
void (*)(lang_void *callback_data, 
         conf_object_t *trigger_obj, int64 register_number, 
         int64 value);

Index
register_number

Core_Control_Register_Read Core_Device_Access_Memop