@@ -2524,6 +2524,10 @@ QEMU_BUILD_BUG_ON(FRAME_SIZE >= (1 << 14));
/* We're expecting to use a single ADDI insn. */
QEMU_BUILD_BUG_ON(FRAME_SIZE - PUSH_SIZE > 0xfff);
+static inline void tcg_out_start(TCGContext *s)
+{
+}
+
static void tcg_target_qemu_prologue(TCGContext *s)
{
TCGReg r;
@@ -2270,6 +2270,10 @@ static void tcg_out_nop_fill(tcg_insn_unit *p, int count)
}
}
+static inline void tcg_out_start(TCGContext *s)
+{
+}
+
/* Compute frame size via macros, to share between tcg_target_qemu_prologue
and tcg_register_jit. */
@@ -3497,6 +3497,10 @@ static const int tcg_target_callee_save_regs[] = {
+ TCG_TARGET_STACK_ALIGN - 1) \
& ~(TCG_TARGET_STACK_ALIGN - 1))
+static inline void tcg_out_start(TCGContext *s)
+{
+}
+
/* Generate global QEMU prologue and epilogue code */
static void tcg_target_qemu_prologue(TCGContext *s)
{
@@ -2469,6 +2469,10 @@ static tcg_insn_unit *align_code_ptr(TCGContext *s)
return s->code_ptr;
}
+static inline void tcg_out_start(TCGContext *s)
+{
+}
+
/* Stack frame parameters. */
#define REG_SIZE (TCG_TARGET_REG_BITS / 8)
#define SAVE_SIZE ((int)ARRAY_SIZE(tcg_target_callee_save_regs) * REG_SIZE)
@@ -1906,6 +1906,10 @@ static void tcg_out_nop_fill(tcg_insn_unit *p, int count)
}
}
+static inline void tcg_out_start(TCGContext *s)
+{
+}
+
/* Parameters for function call generation, used in tcg.c. */
#define TCG_TARGET_STACK_ALIGN 16
#define TCG_TARGET_EXTEND_ARGS 1
@@ -1790,6 +1790,10 @@ static const TCGTargetOpDef *tcg_target_op_def(TCGOpcode op)
}
}
+static inline void tcg_out_start(TCGContext *s)
+{
+}
+
static const int tcg_target_callee_save_regs[] = {
TCG_REG_S0, /* used for the global env (TCG_AREG0) */
TCG_REG_S1,
@@ -2495,6 +2495,10 @@ static void query_s390_facilities(void)
}
}
+static inline void tcg_out_start(TCGContext *s)
+{
+}
+
static void tcg_target_init(TCGContext *s)
{
query_s390_facilities();
@@ -1004,6 +1004,10 @@ static void build_trampolines(TCGContext *s)
}
#endif
+static inline void tcg_out_start(TCGContext *s)
+{
+}
+
/* Generate global QEMU prologue and epilogue code */
static void tcg_target_qemu_prologue(TCGContext *s)
{
@@ -100,6 +100,7 @@ static void tcg_register_jit_int(void *buf, size_t size,
/* Forward declarations for functions declared and used in tcg-target.inc.c. */
static const char *target_parse_constraint(TCGArgConstraint *ct,
const char *ct_str, TCGType type);
+static void tcg_out_start(TCGContext *s);
static void tcg_out_ld(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg1,
intptr_t arg2);
static void tcg_out_mov(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg);
@@ -3926,6 +3927,7 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb)
#endif
num_insns = -1;
+ tcg_out_start(s);
QTAILQ_FOREACH(op, &s->ops, link) {
TCGOpcode opc = op->opc;
@@ -889,6 +889,10 @@ static void tcg_target_init(TCGContext *s)
CPU_TEMP_BUF_NLONGS * sizeof(long));
}
+static inline void tcg_out_start(void)
+{
+}
+
/* Generate global QEMU prologue and epilogue code. */
static inline void tcg_target_qemu_prologue(TCGContext *s)
{
This function is called at the beginning of any translation block. We will use it to emit ENDBR32 or ENDBR64 annotations for x86 CET. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> --- tcg/aarch64/tcg-target.inc.c | 4 ++++ tcg/arm/tcg-target.inc.c | 4 ++++ tcg/i386/tcg-target.inc.c | 4 ++++ tcg/mips/tcg-target.inc.c | 4 ++++ tcg/ppc/tcg-target.inc.c | 4 ++++ tcg/riscv/tcg-target.inc.c | 4 ++++ tcg/s390/tcg-target.inc.c | 4 ++++ tcg/sparc/tcg-target.inc.c | 4 ++++ tcg/tcg.c | 2 ++ tcg/tci/tcg-target.inc.c | 4 ++++ 10 files changed, 38 insertions(+)