From patchwork Tue May 29 10:50:09 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: 921994 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="bM8xu59r"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40wB3l59SFz9s08 for ; Tue, 29 May 2018 21:15:47 +1000 (AEST) Received: from localhost ([::1]:60226 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNcbR-0003xY-C6 for incoming@patchwork.ozlabs.org; Tue, 29 May 2018 07:15:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNcDj-0001zL-4r for qemu-devel@nongnu.org; Tue, 29 May 2018 06:51:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fNcDh-0004O0-WB for qemu-devel@nongnu.org; Tue, 29 May 2018 06:51:15 -0400 Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]:55299) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fNcDh-0004NV-P9 for qemu-devel@nongnu.org; Tue, 29 May 2018 06:51:13 -0400 Received: by mail-wm0-x22f.google.com with SMTP id a8-v6so39183225wmg.5 for ; Tue, 29 May 2018 03:51:13 -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 :mime-version:content-transfer-encoding; bh=6gS5dakbzi/Qoi2hMRV3+q4cQcdXxV2ENS7muhp21ik=; b=bM8xu59rvQjCyDlws6wcAvulsRaUL+zIUvjNY3PKdRFDdmi03zVZLpZtLNyx234Pu7 8XEoOzakqjjIjtRqUVsTJIiFw1YGB7tzZEwUQpSfeNWOErEWIp4YcBPz51K+bbEkpfyJ Ll4tc85aTV7AEadTcmO2km1xFkUEQaX9nZ1cSMh2WKEBrzQuKjcsHSugxec65zyPYj3z p5n0H/0+F9oUZ3MasPk175blByeRPVwazLJLIiSQBNFIyJngeZyHbddFr0ojpQJiakQ3 RDqJZQOI6CqXE8fTLZ39ZJYGWs2/zgRno1G4/LuXHpn5h2M5f86emCQUvmo54oLOSJd8 Zcbg== 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:mime-version:content-transfer-encoding; bh=6gS5dakbzi/Qoi2hMRV3+q4cQcdXxV2ENS7muhp21ik=; b=SjXfepfC7Lzvnnod/xO9bs/5AbTNI34SFYglkpgVcADHASCkLBBMjA3jtUPKjUmT/Q /p6SSDjrBLtl+cHeQ5OUQCU2P/t75e7GPbK6qb/HqkXDi6AnfZtouDCicD9RnSRbV5g9 MFD1a7NQqC5p2B1lAZTuzXqePZvel8hFnirxZrHHfy0CcRqG95i7+MSgNE2iMlNiAbz5 pr4kaZu931lvTHulUsYygeQBiQihkpnn+zE/1ntjLuDMZkoGN3QqV6iJeOJnkH1kZODC 4xBAsvNjOGtMhOMnBmYagiL6uaEDPrZXbuJhH3xiJ40m+q213AVrMkwFMdhlWPwiSv6d qkZg== X-Gm-Message-State: ALKqPweoWhX+/KQK6WabAxuVkE093rEnVtOQ2PCFjec/vLC/PklzTpdx IjQAcyCwXM6F6D8xIZh3k0KvLQ== X-Google-Smtp-Source: AB8JxZq8AvSj4bWNJN1pwhTIeXFrYUQjEptFyaUgPSd/s/RihKjxkt0boAOzyXL2hzzr9fpZ5aR1Gw== X-Received: by 2002:a2e:202:: with SMTP id 2-v6mr9426307ljc.117.1527591072442; Tue, 29 May 2018 03:51:12 -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 x10-v6sm4922506lfe.39.2018.05.29.03.51.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 May 2018 03:51:11 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Tue, 29 May 2018 12:50:09 +0200 Message-Id: <20180529105011.1914-37-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180529105011.1914-1-edgar.iglesias@gmail.com> References: <20180529105011.1914-1-edgar.iglesias@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22f Subject: [Qemu-devel] [PULL v1 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 Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: "Edgar E. Iglesias" Cleanup eval_cond_jmp to use tcg_gen_movcond_i64(). No functional change. Suggested-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Edgar E. Iglesias --- 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 591d232304..b79600cba5 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)