aboutsummaryrefslogtreecommitdiff
path: root/accel/tcg/plugin-gen.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel/tcg/plugin-gen.c')
-rw-r--r--accel/tcg/plugin-gen.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c
index 0f8be53d39..47e05ec634 100644
--- a/accel/tcg/plugin-gen.c
+++ b/accel/tcg/plugin-gen.c
@@ -443,6 +443,13 @@ static TCGOp *append_inline_cb(const struct qemu_plugin_dyn_cb *cb,
char *ptr = cb->userp;
size_t elem_size = 0;
size_t offset = 0;
+ if (!ptr) {
+ /* use inline entry */
+ ptr = cb->inline_insn.entry.score->data->data;
+ elem_size = g_array_get_element_size(cb->inline_insn.entry.score->data);
+ offset = cb->inline_insn.entry.offset;
+ }
+
op = copy_ld_i32(&begin_op, op);
op = copy_mul_i32(&begin_op, op, elem_size);
op = copy_ext_i32_ptr(&begin_op, op);