From patchwork Tue May 8 17:31:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 10386817 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 044DD60236 for ; Tue, 8 May 2018 17:59:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E6541283C5 for ; Tue, 8 May 2018 17:59:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D75E22869B; Tue, 8 May 2018 17:59:31 +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 4F072283C5 for ; Tue, 8 May 2018 17:59:30 +0000 (UTC) Received: from localhost ([::1]:52715 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fG6te-0002te-4a for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 May 2018 13:59:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44339) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fG6Tr-0000Mr-U7 for qemu-devel@nongnu.org; Tue, 08 May 2018 13:32:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fG6Tr-0005dj-1A for qemu-devel@nongnu.org; Tue, 08 May 2018 13:32:51 -0400 Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]:35741) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fG6Tq-0005dM-QE for qemu-devel@nongnu.org; Tue, 08 May 2018 13:32:50 -0400 Received: by mail-lf0-x243.google.com with SMTP id y72-v6so33291834lfd.2 for ; Tue, 08 May 2018 10:32:50 -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=4pux2+QUZ3+DJ7XC6X8rHKOgOgL6Ju2kIIrec7BnmSw=; b=apwM/JDDyP+3HEP7+HudJqJZI/yrYnGv8JFCjm7h+DTaPropn6M3Nkxr4BVBuE//ZE v59KS47yc/PqHaVWauEhOsoi4Tb37HIFz7u6F2DIt7JQB0J5ZuSdSp7xM/cjax5otCRH GRI60WpubLBEfngcZeIeNrBjKUNtaR+hZDDK0YTyC3fR8Hyi0zHggSLZ4bFA2SY6XTvH jd5hDW5HnY7O/NzgATMWCy+Vl1LJtbwf2YotCcsH57TJY1ZNTu6tcIhAhkHUy2WIa1pl 8Qv6kLcNraupZcAknmHBXPOJuWWPDQ4zo5U0XmnYFvUXB+GXg4EosJik3f07fpXRLN5L 8iLg== 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=4pux2+QUZ3+DJ7XC6X8rHKOgOgL6Ju2kIIrec7BnmSw=; b=oIb6oNqKM9JqOhcHxk5GK2wRg6wBIR+9kvbL5TSTTf10zKHJTOLLmn2t675gDGSC8I 7+j7rBTZqW8LNLG/wiGy/MoC/v1tbmZkAAXGrdl4lbcyQr5Tkq+uS1d5yhZ8FXUTzUlK Zrvh8awjMnC0JcOi/9goVLlk9y0Js5Socfw4uNhvFQyafsWZ0zojpjdX3p6QEyS310B9 ajllkLBIN1oP7fCytpea3B/bxVp9X7PQGiyGGH31gzmRsOC8XZ11RJI4mBJ0/o4KLalx KGSdaxreBKcN2rmqS5h8YRmiNUnqcbQ3YkO5mjH5njT9Waf6Socva9L/CoeuYGPORkBT lF8g== X-Gm-Message-State: ALKqPweDwFvi1Bw1ATFv0NNFcAFDgOkZn0rFnKM0RhuEcempFuyMcW2V oUw6hNuhv3mYM6PxH6D8J/poUw== X-Google-Smtp-Source: AB8JxZq0tOn0a4bmBqmkZZ1XLdIhHcYhhnVvWEhkRDtPKPCFhLk6k9g4n0p5Mj6ZMDVtX33JyfQCzg== X-Received: by 2002:a2e:7a0c:: with SMTP id v12-v6mr1622038ljc.79.1525800769293; Tue, 08 May 2018 10:32:49 -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 y23-v6sm4345952ljh.88.2018.05.08.10.32.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 May 2018 10:32:48 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Tue, 8 May 2018 19:31:52 +0200 Message-Id: <20180508173152.29327-37-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180508173152.29327-1-edgar.iglesias@gmail.com> References: <20180508173152.29327-1-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::243 Subject: [Qemu-devel] [PATCH v2 36/36] 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, 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 --- target/microblaze/translate.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 256acce876..a4f6b307d3 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -1167,12 +1167,9 @@ 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_i64(TCG_COND_EQ, env_btaken, 0, l1); - tcg_gen_mov_i64(cpu_SR[SR_PC], pc_true); - gen_set_label(l1); + tcg_gen_movcond_i64(TCG_COND_NE, cpu_SR[SR_PC], + env_btaken, tcg_const_i64(0), + pc_true, pc_false); } static void dec_bcc(DisasContext *dc)