[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 22/26] tcg-mips: Split out tcg_out_call
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PULL 22/26] tcg-mips: Split out tcg_out_call |
Date: |
Mon, 12 May 2014 16:31:10 -0700 |
Signed-off-by: Richard Henderson <address@hidden>
---
tcg/mips/tcg-target.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/tcg/mips/tcg-target.c b/tcg/mips/tcg-target.c
index eaf1745..65acc86 100644
--- a/tcg/mips/tcg-target.c
+++ b/tcg/mips/tcg-target.c
@@ -153,11 +153,6 @@ static int target_parse_constraint(TCGArgConstraint *ct,
const char **pct_str)
ct->ct |= TCG_CT_REG;
tcg_regset_set(ct->u.regs, 0xffffffff);
break;
- case 'C':
- ct->ct |= TCG_CT_REG;
- tcg_regset_clear(ct->u.regs);
- tcg_regset_set_reg(ct->u.regs, TCG_REG_T9);
- break;
case 'L': /* qemu_ld output arg constraint */
ct->ct |= TCG_CT_REG;
tcg_regset_set(ct->u.regs, 0xffffffff);
@@ -1252,6 +1247,13 @@ static void tcg_out_qemu_st(TCGContext *s, const TCGArg
*args,
#endif
}
+static void tcg_out_call(TCGContext *s, tcg_insn_unit *target)
+{
+ tcg_out_movi(s, TCG_TYPE_PTR, TCG_REG_T9, (intptr_t)target);
+ tcg_out_opc_reg(s, OPC_JALR, TCG_REG_RA, TCG_REG_T9, 0);
+ tcg_out_nop(s);
+}
+
static inline void tcg_out_op(TCGContext *s, TCGOpcode opc,
const TCGArg *args, const int *const_args)
{
@@ -1277,8 +1279,8 @@ static inline void tcg_out_op(TCGContext *s, TCGOpcode
opc,
s->tb_next_offset[args[0]] = tcg_current_code_size(s);
break;
case INDEX_op_call:
- tcg_out_opc_reg(s, OPC_JALR, TCG_REG_RA, args[0], 0);
- tcg_out_nop(s);
+ assert(const_args[0]);
+ tcg_out_call(s, (tcg_insn_unit *)(intptr_t)args[0]);
break;
case INDEX_op_br:
tcg_out_brcond(s, TCG_COND_EQ, TCG_REG_ZERO, TCG_REG_ZERO, args[0]);
@@ -1546,7 +1548,7 @@ static inline void tcg_out_op(TCGContext *s, TCGOpcode
opc,
static const TCGTargetOpDef mips_op_defs[] = {
{ INDEX_op_exit_tb, { } },
{ INDEX_op_goto_tb, { } },
- { INDEX_op_call, { "C" } },
+ { INDEX_op_call, { "i" } },
{ INDEX_op_br, { } },
{ INDEX_op_mov_i32, { "r", "r" } },
--
1.9.0
- [Qemu-devel] [PULL 08/26] tcg-ppc: Define TCG_TARGET_INSN_UNIT_SIZE, (continued)
- [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, 2014/05/12
- [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 <=
- [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
- [Qemu-devel] [PULL 13/26] tcg-ia64: Define TCG_TARGET_INSN_UNIT_SIZE, Richard Henderson, 2014/05/12
- Re: [Qemu-devel] [PULL 00/26] tcg updates, Peter Maydell, 2014/05/13