summaryrefslogtreecommitdiffstats
path: root/tcg
diff options
context:
space:
mode:
authorRichard Henderson2021-02-01 20:20:19 +0100
committerRichard Henderson2021-03-17 16:04:45 +0100
commit87713c04d19fc1e331e063b1f2d501091456c82e (patch)
tree4be38db43201a3d394a402cbf9f5c223520bcb97 /tcg
parenttcg/tci: Split out tcg_out_op_{rrm,rrrm,rrrrm} (diff)
downloadqemu-87713c04d19fc1e331e063b1f2d501091456c82e.tar.gz
qemu-87713c04d19fc1e331e063b1f2d501091456c82e.tar.xz
qemu-87713c04d19fc1e331e063b1f2d501091456c82e.zip
tcg/tci: Split out tcg_out_op_v
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg')
-rw-r--r--tcg/tci/tcg-target.c.inc14
1 files changed, 10 insertions, 4 deletions
diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc
index 2aa0997ae9..f93d587493 100644
--- a/tcg/tci/tcg-target.c.inc
+++ b/tcg/tci/tcg-target.c.inc
@@ -317,6 +317,15 @@ static void tcg_out_op_p(TCGContext *s, TCGOpcode op, void *p0)
old_code_ptr[1] = s->code_ptr - old_code_ptr;
}
+static void tcg_out_op_v(TCGContext *s, TCGOpcode op)
+{
+ uint8_t *old_code_ptr = s->code_ptr;
+
+ tcg_out_op_t(s, op);
+
+ old_code_ptr[1] = s->code_ptr - old_code_ptr;
+}
+
static void tcg_out_op_rr(TCGContext *s, TCGOpcode op, TCGReg r0, TCGReg r1)
{
uint8_t *old_code_ptr = s->code_ptr;
@@ -587,8 +596,6 @@ static inline void tcg_out_call(TCGContext *s, const tcg_insn_unit *arg)
static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args,
const int *const_args)
{
- uint8_t *old_code_ptr = s->code_ptr;
-
switch (opc) {
case INDEX_op_exit_tb:
tcg_out_op_p(s, opc, (void *)args[0]);
@@ -725,8 +732,7 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args,
break;
case INDEX_op_mb:
- tcg_out_op_t(s, opc);
- old_code_ptr[1] = s->code_ptr - old_code_ptr;
+ tcg_out_op_v(s, opc);
break;
case INDEX_op_mov_i32: /* Always emitted via tcg_out_mov. */