aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2014-04-28 12:21:26 -0400
committerRichard Henderson <rth@twiddle.net>2014-05-12 11:13:12 -0700
commit4e9cf8409aa993d4925075ddaf41770d46eb1fb1 (patch)
tree69c0f4a7393ffc2fcd8fe4de5d70d97506c73690
parentfdd8ec71847b5167a4be524c2d22d186fc3b6e3a (diff)
tcg-sparc: Create tcg_out_call
Rename the existing tcg_out_calli to tcg_out_call_nodelay. Signed-off-by: Richard Henderson <rth@twiddle.net>
-rw-r--r--tcg/sparc/tcg-target.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/tcg/sparc/tcg-target.c b/tcg/sparc/tcg-target.c
index 22a98fb8cc..4f8de1e0fe 100644
--- a/tcg/sparc/tcg-target.c
+++ b/tcg/sparc/tcg-target.c
@@ -735,7 +735,7 @@ static void tcg_out_addsub2(TCGContext *s, TCGReg rl, TCGReg rh,
tcg_out_mov(s, TCG_TYPE_I32, rl, tmp);
}
-static void tcg_out_calli(TCGContext *s, tcg_insn_unit *dest)
+static void tcg_out_call_nodelay(TCGContext *s, tcg_insn_unit *dest)
{
ptrdiff_t disp = tcg_pcrel_diff(s, dest);
@@ -748,6 +748,12 @@ static void tcg_out_calli(TCGContext *s, tcg_insn_unit *dest)
}
}
+static void tcg_out_call(TCGContext *s, tcg_insn_unit *dest)
+{
+ tcg_out_call_nodelay(s, dest);
+ tcg_out_nop(s);
+}
+
#ifdef CONFIG_SOFTMMU
static tcg_insn_unit *qemu_ld_trampoline[16];
static tcg_insn_unit *qemu_st_trampoline[16];
@@ -803,7 +809,7 @@ static void build_trampolines(TCGContext *s)
/* Set the env operand. */
tcg_out_mov(s, TCG_TYPE_PTR, TCG_REG_O0, TCG_AREG0);
/* Tail call. */
- tcg_out_calli(s, qemu_ld_helpers[i]);
+ tcg_out_call_nodelay(s, qemu_ld_helpers[i]);
tcg_out_mov(s, TCG_TYPE_PTR, TCG_REG_O7, ra);
}
@@ -850,7 +856,7 @@ static void build_trampolines(TCGContext *s)
/* Set the env operand. */
tcg_out_mov(s, TCG_TYPE_PTR, TCG_REG_O0, TCG_AREG0);
/* Tail call. */
- tcg_out_calli(s, qemu_st_helpers[i]);
+ tcg_out_call_nodelay(s, qemu_st_helpers[i]);
tcg_out_mov(s, TCG_TYPE_PTR, TCG_REG_O7, ra);
}
}
@@ -1030,7 +1036,7 @@ static void tcg_out_qemu_ld(TCGContext *s, TCGReg data, TCGReg addr,
func = qemu_ld_trampoline[memop];
}
assert(func != NULL);
- tcg_out_calli(s, func);
+ tcg_out_call_nodelay(s, func);
/* delay slot */
tcg_out_movi(s, TCG_TYPE_I32, param, memi);
@@ -1107,7 +1113,7 @@ static void tcg_out_qemu_st(TCGContext *s, TCGReg data, TCGReg addr,
func = qemu_st_trampoline[memop];
assert(func != NULL);
- tcg_out_calli(s, func);
+ tcg_out_call_nodelay(s, func);
/* delay slot */
tcg_out_movi(s, TCG_TYPE_REG, param, memi);
@@ -1163,12 +1169,12 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc,
break;
case INDEX_op_call:
if (const_args[0]) {
- tcg_out_calli(s, (void *)(uintptr_t)a0);
+ tcg_out_call(s, (void *)(uintptr_t)a0);
} else {
tcg_out_arithi(s, TCG_REG_O7, a0, 0, JMPL);
+ /* delay slot */
+ tcg_out_nop(s);
}
- /* delay slot */
- tcg_out_nop(s);
break;
case INDEX_op_br:
tcg_out_bpcc(s, COND_A, BPCC_PT, a0);