For example:
static bool gen_lr(DisasContext *ctx, arg_atomic *a, MemOp mop)
{
TCGv src1;
decode_save_opc(ctx, 0);
src1 = get_address(ctx, a->rs1, 0);
gen_helper_print("src1 %x\n", src1);
...
return true;
}
When the TCG executes instructions containing this function, the terminal will
print:
src1 0x...
However, currently the parameter type for `helper_print` is uniformly set to
`tl`,
so when passing parameters of other types, they need to be cast to the `TCGv`
type.
