On 5/16/21 7:53 AM, Philippe Mathieu-Daudé wrote:
-    op->args[*cb_idx + 1] = tcg_flags;
+    op->args[*cb_idx + 1] = (*begin_op)->args[*cb_idx + 1];

I don't understand this change, can you explain?

This patch drops a mostly-unimplemented feature from plugins, where in theory the registration of the plugin would specify the TCG_CALL_* flags.

Instead, take the flags from the plugin template function -- i.e. copy them across from the original begin_op.

-static inline uint32_t cb_to_tcg_flags(enum qemu_plugin_cb_flags flags)
-{
-    uint32_t ret;
-
-    switch (flags) {
-    case QEMU_PLUGIN_CB_RW_REGS:
-        ret = 0;
-        break;
-    case QEMU_PLUGIN_CB_R_REGS:
-        ret = TCG_CALL_NO_WG;
-        break;
-    case QEMU_PLUGIN_CB_NO_REGS:
-    default:
-        ret = TCG_CALL_NO_RWG;
-    }
-    return ret;
-}

This is where the plugin interface was supposed to convert flags from one form to another. This got stored in a structure and then passed along as an argument to the function containing that first hunk above.


r~

Reply via email to