From patchwork Sun Mar 14 17:58:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 400100 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp2836431jai; Sun, 14 Mar 2021 11:09:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtOhAiL870E46qjXCOSTPHGUhHbcmpw1ngG3qG30DHZgCOC9YKGKlklUB0FLyV6L2Gi+xS X-Received: by 2002:a6b:6e06:: with SMTP id d6mr5095311ioh.116.1615745347704; Sun, 14 Mar 2021 11:09:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615745347; cv=none; d=google.com; s=arc-20160816; b=zB5MuQ/OdMs5Q9Wq18HrybzDVe6oNoD5It77ohDK1rGq0UkteAn6IIgojvA94eFcTI CrWyqRiN22kUplA33nIKI1buW3l0OwEb4lnUtnQORZbX74pE5tM334+REiGKqr3xAq0i LaGL4k61QMtElWiQMTjynz/gG/FK9BiipREJBtg2TznMu7EydVdgB0lltkVE11761pjq s55HUbMbFKdGGsOxlDWZY4dj7WhSjhpBkEvhHbplaIXcMPl0UZZ4hNutRh6t591jVa7f WJsSXIyyhDmCb2907BCn+pW/5P42nOF9iB9j3JibZzOTXDSln3Px8cxg/YjmT5XaJfDg nUxQ== 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=/W2WFobHDD4oLw5DS+3Y+2H+mE4fKJy/+HfV/Ly0jXA=; b=gjjzHWjUsqvaMmRq1hL1BJflBup9b/GQu5f5eYQX+j+Xr8Bca5/tcvCs/MsV2RtS0b a2inJRI7QeVGemgbxqZOJeuejn+rrqAS5tTm6armFpYwkabmF5Jy5TFCe33ZHkI+FgQ5 Y8SLuJIiEDjeYCnzcU//FqZltg8UsZHow2kA6wYKlCpMrYzo/69iML6LA4rmayKGjeKc QA+Glb70EO92ZAr5LG9m7hKwBCreg737sOtbU1FXMB7QHr4BOUJzNuu5kgpXjCu+hrnA bkbgsRiG163EuzH9WSQX+zd1amFy+wmwelawB9Nmw1ZotX6PvdPvG0xozbtvgZJXWxBL L/TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=alFHopLV; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o18si9163610jat.92.2021.03.14.11.09.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 14 Mar 2021 11:09:07 -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=fail header.i=@linaro.org header.s=google header.b=alFHopLV; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:55256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLVAp-0001oG-4M for patch@linaro.org; Sun, 14 Mar 2021 14:09:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLV1Z-0002P2-Ie for qemu-devel@nongnu.org; Sun, 14 Mar 2021 13:59:33 -0400 Received: from mail-qv1-xf2f.google.com ([2607:f8b0:4864:20::f2f]:45975) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lLV1S-00029i-Re for qemu-devel@nongnu.org; Sun, 14 Mar 2021 13:59:33 -0400 Received: by mail-qv1-xf2f.google.com with SMTP id t16so6733242qvr.12 for ; Sun, 14 Mar 2021 10:59:18 -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=/W2WFobHDD4oLw5DS+3Y+2H+mE4fKJy/+HfV/Ly0jXA=; b=alFHopLVEKxq26J+vRxd1mQcS4GyHPp9Zka57dPHHaVIogBVyq0tTrLeQQ8klO4can gt6/JWdaB3vR1T9rLgDr1W5n7vAzSuJWoxPzpyegIIzy9EZbON/UfpV4tfKjY79ZsXgc QsZgOpU61aB9eOByXPneScnTKN43iIvMNpXWYSNCb2rD+0uR6BRVdmdP9aAZ4c33C6BT 6THBBh35h1ZJGpmvJjfOn715PcxBUZeCv43YwyuGlx4jGsX+ZDCZihwmPoJ39SEsmybx ypV69QRX++DR29AQiTn4898xDJo7s1sVo5GinVBAxadii+qr+rFpGSAhhH92olACIuJ9 UGjg== 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=/W2WFobHDD4oLw5DS+3Y+2H+mE4fKJy/+HfV/Ly0jXA=; b=FXt0OByRb5Al1hy7NEwvvtFxrNkXynCSJJ9aRJjytktT9TQjTuZPfxXBormV4Olyy8 0fqYzefOuR9k1lfAlB1G4cv/tCLcZQ/ZIYxUZGxE3wGQXUf0lIOgGrE5/Bq6DbOyYD45 dfqa3iSVpxaVmd3lxx5HwiE9wsigoWrfbx3PjzzH9mGbzvZUe3W/6QtO69yS67eH0lCT ouhFUp0V4eMSkVaxvL0DDxShQxliJG7iP8cxg1pOceGgIUsUeaSHXtUe8wBsZ1qnJJwl p6EgfJ6qcwR7n4h12z3QoTCOXiXj7uP6XnO1JQ1IY0DtI5ka1vG0nko67p0gFep1/mWz VIFg== X-Gm-Message-State: AOAM533iZ8t82r5Za+hhksbL2JTd5e9HP4ImNc9SjzKCxryrIjAXgT1z p6PjRYMRB6cX5suc2hBqIC7boVHiN5rwIk51 X-Received: by 2002:a05:6214:18d2:: with SMTP id cy18mr21305948qvb.50.1615744758233; Sun, 14 Mar 2021 10:59:18 -0700 (PDT) Received: from localhost.localdomain (fixed-187-189-51-144.totalplay.net. [187.189.51.144]) by smtp.gmail.com with ESMTPSA id c127sm10216240qkd.87.2021.03.14.10.59.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Mar 2021 10:59:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 08/16] target/ppc: Reduce env->hflags to uint32_t Date: Sun, 14 Mar 2021 11:58:58 -0600 Message-Id: <20210314175906.1733746-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210314175906.1733746-1-richard.henderson@linaro.org> References: <20210314175906.1733746-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::f2f; envelope-from=richard.henderson@linaro.org; helo=mail-qv1-xf2f.google.com 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=unavailable 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: ivan@vmfacility.fr, qemu-ppc@nongnu.org, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" It will be stored in tb->flags, which is also uint32_t, so let's use the correct size. Signed-off-by: Richard Henderson --- target/ppc/cpu.h | 4 ++-- target/ppc/misc_helper.c | 2 +- target/ppc/translate.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) -- 2.25.1 diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 39f35b570c..2abaf56869 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -1128,8 +1128,8 @@ struct CPUPPCState { bool resume_as_sreset; #endif - /* These resources are used only in QEMU core */ - target_ulong hflags; + /* These resources are used only in TCG */ + uint32_t hflags; target_ulong hflags_compat_nmsr; /* for migration compatibility */ int immu_idx; /* precomputed MMU index to speed up insn accesses */ int dmmu_idx; /* precomputed MMU index to speed up data accesses */ diff --git a/target/ppc/misc_helper.c b/target/ppc/misc_helper.c index 63e3147eb4..b04b4d7c6e 100644 --- a/target/ppc/misc_helper.c +++ b/target/ppc/misc_helper.c @@ -199,7 +199,7 @@ void helper_store_hid0_601(CPUPPCState *env, target_ulong val) if ((val ^ hid0) & 0x00000008) { /* Change current endianness */ hreg_compute_hflags(env); - qemu_log("%s: set endianness to %c => " TARGET_FMT_lx "\n", __func__, + qemu_log("%s: set endianness to %c => %08x\n", __func__, val & 0x8 ? 'l' : 'b', env->hflags); } } diff --git a/target/ppc/translate.c b/target/ppc/translate.c index a9325a12e5..a85b890bb0 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -7657,7 +7657,7 @@ void ppc_cpu_dump_state(CPUState *cs, FILE *f, int flags) env->nip, env->lr, env->ctr, cpu_read_xer(env), cs->cpu_index); qemu_fprintf(f, "MSR " TARGET_FMT_lx " HID0 " TARGET_FMT_lx " HF " - TARGET_FMT_lx " iidx %d didx %d\n", + "%08x iidx %d didx %d\n", env->msr, env->spr[SPR_HID0], env->hflags, env->immu_idx, env->dmmu_idx); #if !defined(NO_TIMER_DUMP)