Received: from eggs.gnu.org ([2001:4830:134:3::10]:59472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wjzhr-0005J3-KP for qemu-devel@nongnu.org; Mon, 12 May 2014 19:32:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wjzhl-0005ye-GB for qemu-devel@nongnu.org; Mon, 12 May 2014 19:32:27 -0400 Received: from mail-qg0-x233.google.com ([2607:f8b0:400d:c04::233]:57538) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wjzhl-0005ya-Bv for qemu-devel@nongnu.org; Mon, 12 May 2014 19:32:21 -0400 Received: by mail-qg0-f51.google.com with SMTP id q107so8423439qgd.38 for ; Mon, 12 May 2014 16:32:21 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Mon, 12 May 2014 16:31:09 -0700 Message-Id: <1399937474-6530-22-git-send-email-rth@twiddle.net> In-Reply-To: <1399937474-6530-1-git-send-email-rth@twiddle.net> References: <1399937474-6530-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PULL 21/26] tcg-sparc: Create tcg_out_call List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org Rename the existing tcg_out_calli to tcg_out_call_nodelay. Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/tcg/sparc/tcg-target.c b/tcg/sparc/tcg-target.c index 22a98fb..4f8de1e 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); -- 1.9.0