From nobody Tue Feb 10 12:57:33 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1499991908748115.57275034890824; Thu, 13 Jul 2017 17:25:08 -0700 (PDT) Received: from localhost ([::1]:34778 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVoPr-0000h9-H0 for importer@patchew.org; Thu, 13 Jul 2017 20:25:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVoJe-0003ET-OR for qemu-devel@nongnu.org; Thu, 13 Jul 2017 20:18:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVoJa-00006z-Fh for qemu-devel@nongnu.org; Thu, 13 Jul 2017 20:18:42 -0400 Received: from mail-qk0-x241.google.com ([2607:f8b0:400d:c09::241]:33564) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dVoJa-00006k-BW for qemu-devel@nongnu.org; Thu, 13 Jul 2017 20:18:38 -0400 Received: by mail-qk0-x241.google.com with SMTP id a66so9258931qkb.0 for ; Thu, 13 Jul 2017 17:18:38 -0700 (PDT) Received: from bigtime.twiddle.net.com (rrcs-173-197-98-123.west.biz.rr.com. [173.197.98.123]) by smtp.gmail.com with ESMTPSA id v47sm5647206qtb.11.2017.07.13.17.18.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jul 2017 17:18:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=MyH/0nLWVXXNnRiPPKl2NPsm9zw2LjtvFxFSROkMM6g=; b=nqhXAQlqKMsudwx1JLOWtw8m4qOPsPNMmH14kgbR9A/MTXLNJ2p0KeuCII4ETQWCc0 S1QyQPKbkXnavXxBBZ2JtpEgYZZPDx97VvxRqac7oTKplp74i1oTTAVfcNTOprVIetGI Xl/FK4/UDsG/9thSocStdRTpbzcD2XdymVQ73V2SRHuiUBWdGma85oROkBT72hGRU7Wj QyPCZfxHWh45CKJVelhzNandM3XtmBNKoeQiQ/DDmldEu5GNGqPK24nK8omCiHBBYJQS JZKqdHvaVjquKOkRlH0WPCJJqKUG9/73DzQ0RLEJ4xKXaGpKcKqPy8OIBI4gMmzAD270 afTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=MyH/0nLWVXXNnRiPPKl2NPsm9zw2LjtvFxFSROkMM6g=; b=O7GDZ9wzx0NSKfNlAqkqdMDHElNRp5mP7Vv15Vf708zVFNaSLjN3+sJSTmdXKNCwZh 0k1pRgVUUUm4eL9Z/pL3eIXW0gaLrqwK4OFvTbiXJAeIKaxpLut1p6Rz8nEEFc1cQNE8 69u76P+yCIDeyu65xMECGLPLA7HJtlHAB/MVbauV2BAFwpb+9uZK7SwZ6Bt6zb76g4Ty 6Egv/Tom43dPigI35KEZqG/gkjQ8t2PEuXeG9g8w1rQPmyNzB7R+DOtQHnXzOCX7KWK4 8GLZNDWN9kXWpf71slfNEmDBiVyejLNX2ArZOaKRMjeFch7QbwogyDQHqWJvUBI1TCfX bRqw== X-Gm-Message-State: AIVw113ay7ShHNMtNebxYgdAWGMNp2pyxJqeAhC0IyoPWtG3xRxsWng9 xBwFbNqd1jRcdaJ80gU= X-Received: by 10.55.74.13 with SMTP id x13mr8443350qka.254.1499991517551; Thu, 13 Jul 2017 17:18:37 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 13 Jul 2017 14:18:13 -1000 Message-Id: <20170714001819.1660-3-rth@twiddle.net> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170714001819.1660-1-rth@twiddle.net> References: <20170714001819.1660-1-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::241 Subject: [Qemu-devel] [PATCH 2/8] target/alpha: Copy tb->flags into DisasContext 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson --- target/alpha/translate.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 4a627fc..48be19a 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -49,6 +49,7 @@ struct DisasContext { #ifndef CONFIG_USER_ONLY uint64_t palbr; #endif + uint32_t tbflags; int mem_idx; =20 /* implver and amask values for this CPU. */ @@ -452,7 +453,7 @@ static ExitStatus gen_store_conditional(DisasContext *c= tx, int ra, int rb, static bool in_superpage(DisasContext *ctx, int64_t addr) { #ifndef CONFIG_USER_ONLY - return ((ctx->tb->flags & TB_FLAGS_USER_MODE) =3D=3D 0 + return ((ctx->tbflags & TB_FLAGS_USER_MODE) =3D=3D 0 && addr >> TARGET_VIRT_ADDR_SPACE_BITS =3D=3D -1 && ((addr >> 41) & 3) =3D=3D 2); #else @@ -1167,7 +1168,7 @@ static ExitStatus gen_call_pal(DisasContext *ctx, int= palcode) =20 #ifndef CONFIG_USER_ONLY /* Privileged PAL code */ - if (palcode < 0x40 && (ctx->tb->flags & TB_FLAGS_USER_MODE) =3D=3D 0) { + if (palcode < 0x40 && (ctx->tbflags & TB_FLAGS_USER_MODE) =3D=3D 0) { TCGv tmp; switch (palcode) { case 0x01: @@ -1258,7 +1259,7 @@ static ExitStatus gen_call_pal(DisasContext *ctx, int= palcode) uint64_t exc_addr =3D ctx->pc; uint64_t entry =3D ctx->palbr; =20 - if (ctx->tb->flags & TB_FLAGS_PAL_MODE) { + if (ctx->tbflags & TB_FLAGS_PAL_MODE) { exc_addr |=3D 1; } else { tcg_gen_movi_i64(tmp, 1); @@ -1452,7 +1453,7 @@ static ExitStatus gen_mtpr(DisasContext *ctx, TCGv vb= , int regno) =20 #define REQUIRE_TB_FLAG(FLAG) \ do { \ - if ((ctx->tb->flags & (FLAG)) =3D=3D 0) { \ + if ((ctx->tbflags & (FLAG)) =3D=3D 0) { \ goto invalid_opc; \ } \ } while (0) @@ -2932,6 +2933,7 @@ void gen_intermediate_code(CPUAlphaState *env, struct= TranslationBlock *tb) =20 ctx.tb =3D tb; ctx.pc =3D pc_start; + ctx.tbflags =3D tb->flags; ctx.mem_idx =3D cpu_mmu_index(env, false); ctx.implver =3D env->implver; ctx.amask =3D env->amask; @@ -2941,7 +2943,7 @@ void gen_intermediate_code(CPUAlphaState *env, struct= TranslationBlock *tb) ctx.ir =3D cpu_std_ir; #else ctx.palbr =3D env->palbr; - ctx.ir =3D (tb->flags & TB_FLAGS_PAL_MODE ? cpu_pal_ir : cpu_std_ir); + ctx.ir =3D (ctx.tbflags & TB_FLAGS_PAL_MODE ? cpu_pal_ir : cpu_std_ir); #endif =20 /* ??? Every TB begins with unset rounding mode, to be initialized on --=20 2.9.4