#[before_tcg_codegen]Expand description
(Callback) Callback ID: PANDA_CB_BEFORE_TCG_CODEGEN
before_tcg_codegen:
Called before host code generation for every basic block. Enables
inspection and modification of the TCG block after lifting from guest
code.
Arguments:
CPUState *env: the current CPU state
TranslationBlock *tb: the TB about to be compiled
Helper call location: translate-all.c
Return value:
NoneCallback arguments: (&mut CPUState, &mut TranslationBlock, )
ยงExample
use panda::prelude::*;
#[panda::before_tcg_codegen]
fn callback(_: &mut CPUState, _: &mut TranslationBlock, ) {
// do stuff
}