From nobody Wed Feb 11 03:08:06 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1598891459; cv=none; d=zohomail.com; s=zohoarc; b=NYoS9ITLE7vv5gjgxP+9XsY4L3J8zsBY1300JVuAVT6pGnppKCAUXjH3Q7vIekfRSYmJ7c773kZfoXKRkjvUiSa1YHpv+1i1bkZHreXdJaz9fkOiMcUuD9iru4uFRv5L+AbdR1Kp+iMNmkgEg1nBIf7tj0MP86G6ebbpYXwor/A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598891459; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9yukNREp9KLx7ngPQjIPDt7zSrwG6GvjIbptJAOWSaU=; b=J1GlXu72LH07AS0cu6R9joU/X0gJBi1JIyQIN/RgfGklPBRPxDYSZij9jcfQMTQ13E5K+RChIvHhjJS+6XT5GLRTpwbL2V5lZcr3uTkQCgBFa31dJnxB5tNmaR8UhXEznoJRqqoS+0k9YqyBXwCPr0Q1iElyZt8eLEdp26RBWCE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598891459804584.8615486783482; Mon, 31 Aug 2020 09:30:59 -0700 (PDT) Received: from localhost ([::1]:38992 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kCmhu-00059n-QJ for importer@patchew.org; Mon, 31 Aug 2020 12:30:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34486) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kCmL4-00061q-4U for qemu-devel@nongnu.org; Mon, 31 Aug 2020 12:07:22 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:46348) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kCmL2-00067k-9r for qemu-devel@nongnu.org; Mon, 31 Aug 2020 12:07:21 -0400 Received: by mail-pf1-x42f.google.com with SMTP id b124so794988pfg.13 for ; Mon, 31 Aug 2020 09:07:19 -0700 (PDT) Received: from localhost.localdomain ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id gt13sm17218pjb.43.2020.08.31.09.07.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 09:07:17 -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=9yukNREp9KLx7ngPQjIPDt7zSrwG6GvjIbptJAOWSaU=; b=S1UuJNZgcEJpKE9BCCMllrjEz+ym5UOpgwvm0aohS/w+SqoiWqqSDj1lZHKM0XlTHh 1tHf2Zm1IJryROZkrjHsqmcKW4ZCc9NkUfZJI8AGi6KgnbEOd/5SXXGDyCSNwNhZ3ydO zR5OjdQHiB2m6kU5aRcllqRJVtEEXKk/xXluyCuS/YOeNb2+s1+7zGBzfp2hUZQDRrm8 52hxWsTRjM4z/lwcJXSxI2ZkDYRjcRtdMAzYUgEYJLn73RB2xUh5xwWZ/7AnR/o0Ov+L xpjzufxA1LYso56u/9Zdg1aItJfvPb4PpaotgssZK+1+Ya5EjbiBiGAry8IdjNriftQv PKYw== 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=9yukNREp9KLx7ngPQjIPDt7zSrwG6GvjIbptJAOWSaU=; b=JKte2rFEe+M1RZaeYerptUFtTkgH0IwE7GkTnMRNHUQEmMcBp8roUqDBk+18tnx+4N HGyT/Burv5f0U1qshFJ/1mtJKQ60/r4DfJpMmJtRnm2jvdVZNlVj6azju+EvbFnZXCvV xvY1Ib4JMZ49d/BqrDumEPwecWg6BWYUzdOncR3elbTzDoufy3GWMe0YHXhZOmJeXCac kUQCwqV9bUnC1/+xzTOQHM7dtHs/OsFlwzx9p1jAP8DpGQ4rRkMZcrEV7S+7X8KqX0mv /4dtfgSxdwW/KwmBUC0czjeYeYpGqJ+m9AQuMUtDePita1crSlNA43EQ/pbjjc9s78Uc n63w== X-Gm-Message-State: AOAM533Z+BUsLt3frszq9GETDhyAzszjXSD3w2ugEvJfUrU5Uufe+nno NA2xFUe745ZOnjrc3HUhDyqauW7u775unQ== X-Google-Smtp-Source: ABdhPJyCIl2//S1sme32PHVoesqNPnzRJdjlq9iLxNofGGl6XXcxT0a6Km984/SoLWkOuqzFmxGuyw== X-Received: by 2002:aa7:96b0:: with SMTP id g16mr1875113pfk.46.1598890038007; Mon, 31 Aug 2020 09:07:18 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 55/76] target/microblaze: Move bimm to BIMM_FLAG Date: Mon, 31 Aug 2020 09:05:40 -0700 Message-Id: <20200831160601.833692-56-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831160601.833692-1-richard.henderson@linaro.org> References: <20200831160601.833692-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42f.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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Edgar E . Iglesias" , peter.maydell@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" It makes sense to keep BIMM with D_FLAG, as they can be written back to iflags at the same time. BIMM_FLAG does not need to be added to IFLAGS_TB_MASK because it does not affect the next TB, only the exception path out of the current TB. Renumber IMM_FLAG, as the value 4 holds no particular significance; pack these two flags at the bottom of the bitfield. Tested-by: Edgar E. Iglesias Reviewed-by: Edgar E. Iglesias Signed-off-by: Richard Henderson --- target/microblaze/cpu.h | 4 ++-- target/microblaze/helper.c | 2 +- target/microblaze/translate.c | 12 +++++------- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index 2fc7cf26f1..a5df1fa28f 100644 --- a/target/microblaze/cpu.h +++ b/target/microblaze/cpu.h @@ -231,7 +231,6 @@ typedef struct CPUMBState CPUMBState; struct CPUMBState { uint32_t btaken; uint32_t btarget; - uint32_t bimm; =20 uint32_t imm; uint32_t regs[32]; @@ -253,7 +252,8 @@ struct CPUMBState { uint32_t res_val; =20 /* Internal flags. */ -#define IMM_FLAG 4 +#define IMM_FLAG (1 << 0) +#define BIMM_FLAG (1 << 1) /* MSR_EE (1 << 8) */ /* MSR_UM (1 << 11) */ /* MSR_VM (1 << 13) */ diff --git a/target/microblaze/helper.c b/target/microblaze/helper.c index f8e2ca12a9..06f4322e09 100644 --- a/target/microblaze/helper.c +++ b/target/microblaze/helper.c @@ -166,7 +166,7 @@ void mb_cpu_do_interrupt(CPUState *cs) /* Reexecute the branch. */ env->regs[17] -=3D 4; /* was the branch immprefixed?. */ - if (env->bimm) { + if (env->iflags & BIMM_FLAG) { env->regs[17] -=3D 4; log_cpu_state_mask(CPU_LOG_INT, cs, 0); } diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index d2baa7db0e..97a436c8d5 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -1351,13 +1351,11 @@ static void eval_cond_jmp(DisasContext *dc, TCGv_i3= 2 pc_true, TCGv_i32 pc_false) =20 static void dec_setup_dslot(DisasContext *dc) { - TCGv_i32 tmp =3D tcg_const_i32(dc->type_b && (dc->tb_flags & IMM_F= LAG)); - - dc->delayed_branch =3D 2; - dc->tb_flags |=3D D_FLAG; - - tcg_gen_st_i32(tmp, cpu_env, offsetof(CPUMBState, bimm)); - tcg_temp_free_i32(tmp); + dc->delayed_branch =3D 2; + dc->tb_flags |=3D D_FLAG; + if (dc->type_b && (dc->tb_flags & IMM_FLAG)) { + dc->tb_flags |=3D BIMM_FLAG; + } } =20 static void dec_bcc(DisasContext *dc) --=20 2.25.1