From patchwork Wed May 16 18:51:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 10404751 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E8233601D2 for ; Wed, 16 May 2018 19:22:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D53CC2866C for ; Wed, 16 May 2018 19:22:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C707528699; Wed, 16 May 2018 19:22:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, FSL_HELO_FAKE, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 62CA82866C for ; Wed, 16 May 2018 19:22:19 +0000 (UTC) Received: from localhost ([::1]:34709 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJ209-0002gI-Vj for patchwork-qemu-devel@patchwork.kernel.org; Wed, 16 May 2018 15:22:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJ1Xc-0003gh-DD for qemu-devel@nongnu.org; Wed, 16 May 2018 14:52:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fJ1Xa-000133-Lz for qemu-devel@nongnu.org; Wed, 16 May 2018 14:52:48 -0400 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:38880) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fJ1Xa-00012g-GP for qemu-devel@nongnu.org; Wed, 16 May 2018 14:52:46 -0400 Received: by mail-wr0-x244.google.com with SMTP id 94-v6so2767240wrf.5 for ; Wed, 16 May 2018 11:52:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KNp6ggdU2eGrbYxkP5R/E4uvDtpuBaIXfa1d+ek8pfo=; b=g2mgF7eEQyh+nMdV6azOuKdvz8dW3MqqCmsC85Zc4fDnvoQS/vwi9k69EutSlNn6oI 4xQGTiPjSoaQJ76lvEnLUyWHoSLNMOGxrYeTwDdP/BAcNrb9YeLUBBgB4z1OIqhw0ANJ Xz07P7Cd7j4KpB6P1Zc0X4brVq91zAqDraP50MuHqdFjrLcNK9fcWLmPNA6Zg1duB1ZB eRiLtDrXN63QmyPCYsgSNdM7PUtgO6DgidK6YTu3YfXaGlaUnAwC2JuEDgYSvJmmF8Gb kzbHFC/ytRe3HazjhR/+xX5ebUEVtiPjWnvhndWg2pKvk4g4twzodoBZu8XW5xKmV3MM TkNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=KNp6ggdU2eGrbYxkP5R/E4uvDtpuBaIXfa1d+ek8pfo=; b=eWrunj1HmIwbXsrnolnIOCWqGLONoOIOe+bD3YQfPeMr1FviJwM1jiZxaABwSsDASD oS+WtqFFCaZp4N+DkwZ2Kgw2OX3yIUQAY+eUgfL+wAqMA7pSQmlK5Oi/INC212MQyuWI PKQHfI7Os6UatCVQLic2ijTUOiozXc6yB+StLxi1q26qPllEXjoVIYabYOJJ7Y8pGT2G rAo6dhtnJWfMaQS+txk9G9NakefFvv0+iNIFbrPGe/KoT0Mjt5g/KcDg+e1nfyJTEn6W Iug859ZCXYZi4QClPIKnsJq/h+dZI3gcfayprK0y2WTZ28XB6Ah677hTQReaj/9jIWgv Q6cA== X-Gm-Message-State: ALKqPwcN5eWsoBpgXbIs2/j4VLohaO5qICNBpAUvoxT5J1HZVRt/IbN6 G+zfT7shbP37uGnATcAfyYkB/Q== X-Google-Smtp-Source: AB8JxZpSr48OEMgLWVIrhKhrp8KbABtZn3kJXjc6sVmzw3o7OizLeA6g7T5f8hHO3cISyY/G/r4JTg== X-Received: by 2002:a19:23c8:: with SMTP id j191-v6mr15067322lfj.1.1526496765021; Wed, 16 May 2018 11:52:45 -0700 (PDT) Received: from gmail.com (81-231-232-130-no39.tbcn.telia.com. [81.231.232.130]) by smtp.gmail.com with ESMTPSA id o134-v6sm771227lfo.43.2018.05.16.11.52.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 May 2018 11:52:44 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Wed, 16 May 2018 20:51:44 +0200 Message-Id: <20180516185146.30708-37-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180516185146.30708-1-edgar.iglesias@gmail.com> References: <20180516185146.30708-1-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::244 Subject: [Qemu-devel] [PATCH v3 36/38] target-microblaze: Use tcg_gen_movcond in eval_cond_jmp X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: edgar.iglesias@xilinx.com, peter.maydell@linaro.org, sstabellini@kernel.org, sai.pavan.boddu@xilinx.com, frasse.iglesias@gmail.com, alistair@alistair23.me, richard.henderson@linaro.org, frederic.konrad@adacore.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: "Edgar E. Iglesias" Cleanup eval_cond_jmp to use tcg_gen_movcond_i64(). No functional change. Suggested-by: Richard Henderson Signed-off-by: Edgar E. Iglesias Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/microblaze/translate.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index a846797d9c..78c2855ff0 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -1171,12 +1171,16 @@ static inline void eval_cc(DisasContext *dc, unsigned int cc, static void eval_cond_jmp(DisasContext *dc, TCGv_i64 pc_true, TCGv_i64 pc_false) { - TCGLabel *l1 = gen_new_label(); - /* Conditional jmp. */ - tcg_gen_mov_i64(cpu_SR[SR_PC], pc_false); - tcg_gen_brcondi_i32(TCG_COND_EQ, env_btaken, 0, l1); - tcg_gen_mov_i64(cpu_SR[SR_PC], pc_true); - gen_set_label(l1); + TCGv_i64 tmp_btaken = tcg_temp_new_i64(); + TCGv_i64 tmp_zero = tcg_const_i64(0); + + tcg_gen_extu_i32_i64(tmp_btaken, env_btaken); + tcg_gen_movcond_i64(TCG_COND_NE, cpu_SR[SR_PC], + tmp_btaken, tmp_zero, + pc_true, pc_false); + + tcg_temp_free_i64(tmp_btaken); + tcg_temp_free_i64(tmp_zero); } static void dec_bcc(DisasContext *dc)