From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMYmg-0007nb-Jp for qemu-devel@nongnu.org; Sun, 09 Mar 2014 04:08:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WMYma-0007Nh-PM for qemu-devel@nongnu.org; Sun, 09 Mar 2014 04:08:34 -0400 Received: from mail-qg0-x22a.google.com ([2607:f8b0:400d:c04::22a]:37410) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMYma-0007NZ-Kp for qemu-devel@nongnu.org; Sun, 09 Mar 2014 04:08:28 -0400 Received: by mail-qg0-f42.google.com with SMTP id q107so3656277qgd.1 for ; Sun, 09 Mar 2014 00:08:28 -0800 (PST) Sender: Richard Henderson From: Richard Henderson Date: Sun, 9 Mar 2014 00:07:54 -0800 Message-Id: <1394352479-5625-10-git-send-email-rth@twiddle.net> In-Reply-To: <1394352479-5625-1-git-send-email-rth@twiddle.net> References: <1394352479-5625-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH 09/14] tcg-aarch64: Use tcg_out_insn for setcond List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: alex.bennee@linaro.org, peter.maydell@linaro.org, claudio.fontana@huawei.com Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c index 7f41c75..c38e3c0 100644 --- a/tcg/aarch64/tcg-target.c +++ b/tcg/aarch64/tcg-target.c @@ -654,14 +654,6 @@ static void tcg_out_cmp(TCGContext *s, TCGType ext, TCGReg a, } } -static inline void tcg_out_cset(TCGContext *s, TCGType ext, - TCGReg rd, TCGCond c) -{ - /* Using CSET alias of CSINC 0x1a800400 Xd, XZR, XZR, invert(cond) */ - unsigned int base = ext ? 0x9a9f07e0 : 0x1a9f07e0; - tcg_out32(s, base | tcg_cond_to_aarch64[tcg_invert_cond(c)] << 12 | rd); -} - static inline void tcg_out_goto(TCGContext *s, intptr_t target) { intptr_t offset = (target - (intptr_t)s->code_ptr) / 4; @@ -1391,7 +1383,9 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, /* FALLTHRU */ case INDEX_op_setcond_i64: tcg_out_cmp(s, ext, a1, a2, c2); - tcg_out_cset(s, 0, a0, args[3]); + /* Use CSET alias of CSINC Wd, WZR, WZR, invert(cond). */ + tcg_out_insn(s, 3506, CSINC, TCG_TYPE_I32, a0, TCG_REG_XZR, + TCG_REG_XZR, tcg_invert_cond(args[3])); break; case INDEX_op_movcond_i32: -- 1.8.5.3