Message ID | 20200828141929.77854-61-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp1137596ilg; Fri, 28 Aug 2020 07:37:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyG31b10Y2Az/Cz0uVWsyEl6diGqdcbu8OoPioUvWRfbZ9SFMVqPCOxkl/Qd3wvAiYciuGw X-Received: by 2002:a25:2e10:: with SMTP id u16mr3036074ybu.17.1598625452871; Fri, 28 Aug 2020 07:37:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598625452; cv=none; d=google.com; s=arc-20160816; b=YfXF6nUL7/FsLq+9jl/WfjJIyHxXFaUqB3eM2YqQ313x043KMGVoo3FGEO+b5e9Dfi GqxnpJmKCY9EcDwVUycwvEcM10neoIIHHlYEvCSJxtvEJwq7EUDz+H7GV5fzT6WI34Ps 3uNh1lBA+BobxABltixmwbsj6i827+HRxLi+p8gLdLDnOWV4QgNqCeMdwAUrOoIS3mB1 8fsVX6HHLR6/Wj4sD6mGd2FT5MdE4FmlwwTSEOQRj2prnSOGHACmMyBhqbHPfRVE7GLX jEvm78zYdvHflUwIxk8QrS95NgJltaHyrls1GzdDTpdMcUxKLaOlwKLm2BIsY+AINCkx w2sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=zwo2tLKRvQRJhDTbPnKciACBLjC4l/PhJRnGW8zacPw=; b=EE3eFAcitgNcmZ6Ef/BW1UgP/FZKVEWOEtaNN0hq7t7fWD7hdpvj4mihAZfP2OM6Xn E+JgXnVOxe5Y255o/LOSK1k78VZoiM0cxSStUdNU/n/OhedxHh/ifiMT5idkWF9iWYS1 KgxuarKFz51QjRtxSMx7IcelxYN2PbAez6jXWDJNkOJzNGMDNQKH3CtKxp0gQshEbCrE o+pzLB21Yz9mlPDAJXYmGArPUykA4UaLuwS3RjH0ZMx8s39x2e/Tv3iyJhtWyFyCxj/9 ZSntcC8yJTPl+y/k8kjtpJTDvYro/DiYYuhkVseq8rq88gLezbZGbYuK2w4zkkT18v5o qtbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PXJUCSQe; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s91si939597ybi.418.2020.08.28.07.37.32 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 28 Aug 2020 07:37:32 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PXJUCSQe; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:49104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1kBfVU-0001Iw-8k for patch@linaro.org; Fri, 28 Aug 2020 10:37:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51860) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1kBfFL-0001wq-0u for qemu-devel@nongnu.org; Fri, 28 Aug 2020 10:20:51 -0400 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:33318) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1kBfFJ-0005PE-8y for qemu-devel@nongnu.org; Fri, 28 Aug 2020 10:20:50 -0400 Received: by mail-pl1-x643.google.com with SMTP id h2so540615plr.0 for <qemu-devel@nongnu.org>; Fri, 28 Aug 2020 07:20:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zwo2tLKRvQRJhDTbPnKciACBLjC4l/PhJRnGW8zacPw=; b=PXJUCSQeawL24bOK+pBya9y/6qqKkx1vVpKY9dPs6244AxiKuiaXzktpKPOsQqH+E1 Iqh89YAhc2AzTQdXZWoKpfoE2seW+vGt3/h8BdIyQ5tAn1ABEeC/0PacB4qxpui6VgUN 3Gs9QNQg/SazlTJtpFa5CQlG4gw22pGv351PRUZqaMog268zsgQGXb5fp+FkO9UTRTlb teH/yY32UseutouA3xLIABj3aijsmclzb9mW4v2tKLPhuzW4ETFXTL4Cn+b5EIepHn+V 6z7uL8JVEWpBvYe0S1lid0DjIAFbomlvqpqPNEB9kCpf9mzFT45b7N0LWgtjj+wUerT5 L2+A== 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=zwo2tLKRvQRJhDTbPnKciACBLjC4l/PhJRnGW8zacPw=; b=AJT7+q8M+nlJQfSG/18w4CkdCsX5J/LWwATaJ4txEpcAzSXoOMN4w9x1WVkwvfN0hO 04DqehiMhGUoTghTqtg5dB8J2hx90ZykMbI98FXUDX668g6kaAWbNQaKS0aYyyUmIYWC mQjgaRQMDDFznpUwEcrdHbE5pEm8dLTn7MjoOB4x8Dcfwu0MjcYEihBaN3sN50LKyj+J dr/LCXsTZlV+2l1YPzvJRt+WXa/zKboLHRkeRW5+4tpoxOQnhgD4eP9/V4ysA9yV+JNT riWZXSd6Avf/YLGkL7LQfynNBnqLAsKtMPQK/Y6SSK3mLgmhQXZ3YIEGhKsP6NHKxnbY OovA== X-Gm-Message-State: AOAM532+8YWPpfrLYTmFNEgBmMvk2jqYOax0Di4/zUzlZb2XlQPUUFrA nRQmwwxzqJL4i1rXlP+8nJgF5v9gjgTlkA== X-Received: by 2002:a17:902:44c:: with SMTP id 70mr1468024ple.293.1598624447602; Fri, 28 Aug 2020 07:20:47 -0700 (PDT) Received: from localhost.localdomain ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id j3sm1403080pjw.23.2020.08.28.07.20.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 07:20:46 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Subject: [PATCH v2 60/76] target/microblaze: Replace clear_imm with tb_flags_to_set Date: Fri, 28 Aug 2020 07:19:13 -0700 Message-Id: <20200828141929.77854-61-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200828141929.77854-1-richard.henderson@linaro.org> References: <20200828141929.77854-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::643; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x643.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: edgar.iglesias@xilinx.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
target/microblaze improvements
|
expand
|
diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 597b96ffb3..c0b586f467 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -75,7 +75,7 @@ typedef struct DisasContext { unsigned int cpustate_changed; unsigned int delayed_branch; unsigned int tb_flags; - unsigned int clear_imm; + unsigned int tb_flags_to_set; int mem_index; #define JMP_NOJMP 0 @@ -535,8 +535,7 @@ static bool trans_imm(DisasContext *dc, arg_imm *arg) { dc->ext_imm = arg->imm << 16; tcg_gen_movi_i32(cpu_imm, dc->ext_imm); - dc->tb_flags |= IMM_FLAG; - dc->clear_imm = 0; + dc->tb_flags_to_set = IMM_FLAG; return true; } @@ -1688,7 +1687,8 @@ static void mb_tr_translate_insn(DisasContextBase *dcb, CPUState *cs) (uint32_t)dc->base.pc_next); } - dc->clear_imm = 1; + dc->tb_flags_to_set = 0; + ir = cpu_ldl_code(env, dc->base.pc_next); if (!decode(dc, ir)) { old_decode(dc, ir); @@ -1700,10 +1700,13 @@ static void mb_tr_translate_insn(DisasContextBase *dcb, CPUState *cs) dc->r0_set = false; } - if (dc->clear_imm && (dc->tb_flags & IMM_FLAG)) { - dc->tb_flags &= ~IMM_FLAG; + /* Discard the imm global when its contents cannot be used. */ + if ((dc->tb_flags & ~dc->tb_flags_to_set) & IMM_FLAG) { tcg_gen_discard_i32(cpu_imm); } + + dc->tb_flags &= ~IMM_FLAG; + dc->tb_flags |= dc->tb_flags_to_set; dc->base.pc_next += 4; if (dc->delayed_branch && --dc->delayed_branch == 0) {
This more general update variable will be able to handle delay slots as well. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- target/microblaze/translate.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) -- 2.25.1