aboutsummaryrefslogtreecommitdiff
path: root/accel
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-03-31 10:37:04 -0700
committerRichard Henderson <richard.henderson@linaro.org>2023-06-05 12:04:29 -0700
commitd53106c997e5c8e61e37ae9ff9f0e1f243b03968 (patch)
tree4de92bccaed083434fefc464ac43101dab97d3b4 /accel
parent0f4e14c25a1900ee77ce29060adbaede1367bd3d (diff)
downloadqemu-d53106c997e5c8e61e37ae9ff9f0e1f243b03968.zip
qemu-d53106c997e5c8e61e37ae9ff9f0e1f243b03968.tar.gz
qemu-d53106c997e5c8e61e37ae9ff9f0e1f243b03968.tar.bz2
tcg: Pass TCGHelperInfo to tcg_gen_callN
In preparation for compiling tcg/ only once, eliminate the all_helpers array. Instantiate the info structs for the generic helpers in accel/tcg/, and the structs for the target-specific helpers in each translate.c. Since we don't see all of the info structs at startup, initialize at first use, using g_once_init_* to make sure we don't race while doing so. Reviewed-by: Anton Johansson <anjo@rev.ng> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'accel')
-rw-r--r--accel/tcg/plugin-gen.c5
-rw-r--r--accel/tcg/tcg-runtime.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c
index 5b73a39..40b34a0 100644
--- a/accel/tcg/plugin-gen.c
+++ b/accel/tcg/plugin-gen.c
@@ -49,6 +49,11 @@
#include "exec/exec-all.h"
#include "exec/plugin-gen.h"
#include "exec/translator.h"
+#include "exec/helper-proto.h"
+
+#define HELPER_H "accel/tcg/plugin-helpers.h"
+#include "exec/helper-info.c.inc"
+#undef HELPER_H
#ifdef CONFIG_SOFTMMU
# define CONFIG_SOFTMMU_GATE 1
diff --git a/accel/tcg/tcg-runtime.c b/accel/tcg/tcg-runtime.c
index e4e0300..14b59a3 100644
--- a/accel/tcg/tcg-runtime.c
+++ b/accel/tcg/tcg-runtime.c
@@ -31,6 +31,10 @@
#include "exec/log.h"
#include "tcg/tcg.h"
+#define HELPER_H "accel/tcg/tcg-runtime.h"
+#include "exec/helper-info.c.inc"
+#undef HELPER_H
+
/* 32-bit helpers */
int32_t HELPER(div_i32)(int32_t arg1, int32_t arg2)