[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 20/26] tcg-ppc64: Rename tcg_out_calli to tcg_out_cal
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PULL 20/26] tcg-ppc64: Rename tcg_out_calli to tcg_out_call |
Date: |
Mon, 12 May 2014 16:31:08 -0700 |
Merge the existing tcg_out_call into tcg_out_op.
Signed-off-by: Richard Henderson <address@hidden>
---
tcg/ppc64/tcg-target.c | 37 ++++++++++++++++---------------------
1 file changed, 16 insertions(+), 21 deletions(-)
diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c
index 4a0b7db..d80f2d9 100644
--- a/tcg/ppc64/tcg-target.c
+++ b/tcg/ppc64/tcg-target.c
@@ -707,7 +707,7 @@ static void tcg_out_b(TCGContext *s, int mask,
tcg_insn_unit *target)
}
}
-static void tcg_out_calli(TCGContext *s, void *target)
+static void tcg_out_call(TCGContext *s, tcg_insn_unit *target)
{
#ifdef __APPLE__
tcg_out_b(s, LK, target);
@@ -740,23 +740,6 @@ static void tcg_out_calli(TCGContext *s, void *target)
#endif
}
-static void tcg_out_call(TCGContext *s, TCGArg arg, int const_arg)
-{
- if (const_arg) {
- tcg_out_calli(s, (void *)(uintptr_t)arg);
- } else {
-#ifdef __APPLE__
- tcg_out32(s, MTSPR | RS(arg) | LR);
- tcg_out32(s, BCLR | BO_ALWAYS | LK);
-#else
- tcg_out32(s, LD | TAI(TCG_REG_R0, arg, 0));
- tcg_out32(s, MTSPR | RA(TCG_REG_R0) | CTR);
- tcg_out32(s, LD | TAI(TCG_REG_R2, arg, 8));
- tcg_out32(s, BCCTR | BO_ALWAYS | LK);
-#endif
- }
-}
-
static void tcg_out_mem_long(TCGContext *s, int opi, int opx, TCGReg rt,
TCGReg base, tcg_target_long offset)
{
@@ -971,7 +954,7 @@ static void tcg_out_qemu_ld_slow_path(TCGContext *s,
TCGLabelQemuLdst *lb)
tcg_out_movi(s, TCG_TYPE_I32, TCG_REG_R5, lb->mem_index);
tcg_out32(s, MFSPR | RT(TCG_REG_R6) | LR);
- tcg_out_calli(s, qemu_ld_helpers[opc & ~MO_SIGN]);
+ tcg_out_call(s, qemu_ld_helpers[opc & ~MO_SIGN]);
if (opc & MO_SIGN) {
uint32_t insn = qemu_exts_opc[opc & MO_SIZE];
@@ -1001,7 +984,7 @@ static void tcg_out_qemu_st_slow_path(TCGContext *s,
TCGLabelQemuLdst *lb)
tcg_out_movi(s, TCG_TYPE_I32, TCG_REG_R6, lb->mem_index);
tcg_out32(s, MFSPR | RT(TCG_REG_R7) | LR);
- tcg_out_calli(s, qemu_st_helpers[opc]);
+ tcg_out_call(s, qemu_st_helpers[opc]);
tcg_out_b(s, 0, lb->raddr);
}
@@ -1520,7 +1503,19 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc,
const TCGArg *args,
}
break;
case INDEX_op_call:
- tcg_out_call(s, args[0], const_args[0]);
+ if (const_args[0]) {
+ tcg_out_call(s, (void *)(uintptr_t)arg);
+ } else {
+#ifdef __APPLE__
+ tcg_out32(s, MTSPR | RS(arg) | LR);
+ tcg_out32(s, BCLR | BO_ALWAYS | LK);
+#else
+ tcg_out32(s, LD | TAI(TCG_REG_R0, arg, 0));
+ tcg_out32(s, MTSPR | RA(TCG_REG_R0) | CTR);
+ tcg_out32(s, LD | TAI(TCG_REG_R2, arg, 8));
+ tcg_out32(s, BCCTR | BO_ALWAYS | LK);
+#endif
+ }
break;
case INDEX_op_movi_i32:
tcg_out_movi(s, TCG_TYPE_I32, args[0], args[1]);
--
1.9.0
- [Qemu-devel] [PULL 05/26] tcg: Define tcg_insn_unit for code pointers, (continued)
- [Qemu-devel] [PULL 05/26] tcg: Define tcg_insn_unit for code pointers, Richard Henderson, 2014/05/12
- [Qemu-devel] [PULL 06/26] tcg-i386: Define TCG_TARGET_INSN_UNIT_SIZE, Richard Henderson, 2014/05/12
- [Qemu-devel] [PULL 08/26] tcg-ppc: Define TCG_TARGET_INSN_UNIT_SIZE, Richard Henderson, 2014/05/12
- [Qemu-devel] [PULL 07/26] tcg-ppc64: Define TCG_TARGET_INSN_UNIT_SIZE, Richard Henderson, 2014/05/12
- [Qemu-devel] [PULL 09/26] tcg-sparc: Define TCG_TARGET_INSN_UNIT_SIZE, Richard Henderson, 2014/05/12
- [Qemu-devel] [PULL 10/26] tcg-arm: Define TCG_TARGET_INSN_UNIT_SIZE, Richard Henderson, 2014/05/12
- [Qemu-devel] [PULL 11/26] tcg-aarch64: Define TCG_TARGET_INSN_UNIT_SIZE, Richard Henderson, 2014/05/12
- [Qemu-devel] [PULL 17/26] tcg-i386: Rename tcg_out_calli to tcg_out_call, Richard Henderson, 2014/05/12
- [Qemu-devel] [PULL 18/26] tcg-s390: Rename tgen_calli to tcg_out_call, Richard Henderson, 2014/05/12
- [Qemu-devel] [PULL 19/26] tcg-ppc: Split out tcg_out_call, Richard Henderson, 2014/05/12
- [Qemu-devel] [PULL 20/26] tcg-ppc64: Rename tcg_out_calli to tcg_out_call,
Richard Henderson <=
- [Qemu-devel] [PULL 21/26] tcg-sparc: Create tcg_out_call, Richard Henderson, 2014/05/12
- [Qemu-devel] [PULL 22/26] tcg-mips: Split out tcg_out_call, Richard Henderson, 2014/05/12
- [Qemu-devel] [PULL 24/26] tcg: Make call address a constant parameter, Richard Henderson, 2014/05/12
- [Qemu-devel] [PULL 23/26] tci: Create tcg_out_call, Richard Henderson, 2014/05/12
- [Qemu-devel] [PULL 25/26] tcg: Use tcg_target_available_regs in tcg_reg_alloc_mov, Richard Henderson, 2014/05/12
- [Qemu-devel] [PULL 26/26] tcg: Remove unreachable code in tcg_out_op and op_defs, Richard Henderson, 2014/05/12
- [Qemu-devel] [PULL 12/26] tcg-s390: Define TCG_TARGET_INSN_UNIT_SIZE, Richard Henderson, 2014/05/12
- [Qemu-devel] [PULL 16/26] tcg: Require TCG_TARGET_INSN_UNIT_SIZE, Richard Henderson, 2014/05/12
- [Qemu-devel] [PULL 14/26] tcg-mips: Define TCG_TARGET_INSN_UNIT_SIZE, Richard Henderson, 2014/05/12
- [Qemu-devel] [PULL 15/26] tci: Define TCG_TARGET_INSN_UNIT_SIZE, Richard Henderson, 2014/05/12