From patchwork Mon May 13 07:46:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 796545 Delivered-To: patch@linaro.org Received: by 2002:a5d:452e:0:b0:34e:ceec:bfcd with SMTP id j14csp1884839wra; Mon, 13 May 2024 00:54:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVIvqdKkhqlj3xu0K3sEQ0f2sN0vYnbjBCIZR67Nqg8PloASdK6VWY6inbQsKOCbSpgZ02jaKOGaxuXqTebjI8W X-Google-Smtp-Source: AGHT+IGi3Y1aEXnxRUiTdK5KXiQVHfkos3jHR8oeJzauHAng6BoGXcJM0JALOE3PD0gE+p83tbnh X-Received: by 2002:a05:622a:13ce:b0:43e:1ae6:dcec with SMTP id d75a77b69052e-43e1ae6def1mr19954781cf.55.1715586894637; Mon, 13 May 2024 00:54:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1715586894; cv=none; d=google.com; s=arc-20160816; b=hi3/DLFXHiU3zLonsUpTMr0uHKIko0SrvsC8PVMrgoZJiswa3MSfC4ml9kBqAfcQkv +DAqtWeDoaXrLDf7VtorCly2kGhw0ynPmGpb2h3CRsMKFPuQusgANhMPp38FfWRIt0af XjkzlHqd1zvZV4cm1GkaaQ9/TKuliFJhff2JLqM1Krbe8mSs0Ky8LdxLRpvio0Rk1+q1 0BmLunppe5zjUEcqY0RBQ15hZeEjYtwXtVnc3cdSzYMzu0lse6oBfSyqLNEQoLecQdJT CBIwu5llrCOLUSoMiEb23jua71WAYkmTmpfBL3A1P4YbxJz4EK+nJ8OhJQVSCBSth7RO AH7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=+9boudcCOGEVYkNrscgu8HWtkLEddppv4wDb4lWwH3M=; fh=f2WZoDMBYjCKWIIOoPI+rQtxlv4fmOm4u+dLdQLqpOk=; b=R0OFBosH33AvdKaHuE3v7KH5Jc24V3QlhBFRAKr4fJ9Flzc3IumVGsx2cW9WenpGn8 NdZgTsYG3htknwQrJz2OZ9ZKT2KtqBFHQOkoJ2jYzsnCocPm1kpRL4hVwi0AzIOYyf5l ef6B/wUlPBCfCFSNi70ZVaFEIjw54MsEIKqFl4V8z6HxaUNC3+9LDrZeUsNJFUuKLh2e IRMcDWwuEL/loMVzWFjDIwa2M/o8EiqHg5xehqWkyVfRDZiKdbLUgDD+v0Lf1DL7jyyL tAH3CLWFWZnMJ/3AY73ugSgMg7fXF7Y6c/1r5bXPCZsidlwe0w+zt1qdLuJN6OkmR8WW zo2Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="THxqmqN/"; 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: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-43df566f377si89037801cf.383.2024.05.13.00.54.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 May 2024 00:54:54 -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="THxqmqN/"; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s6QPU-0002v3-4k; Mon, 13 May 2024 03:47:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s6QPE-0002nE-AL for qemu-devel@nongnu.org; Mon, 13 May 2024 03:47:33 -0400 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s6QP4-0001Jm-J7 for qemu-devel@nongnu.org; Mon, 13 May 2024 03:47:32 -0400 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2e43c481b53so50102431fa.2 for ; Mon, 13 May 2024 00:47:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715586441; x=1716191241; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+9boudcCOGEVYkNrscgu8HWtkLEddppv4wDb4lWwH3M=; b=THxqmqN/EmdmzAsZggy5Yy5EsG3gfyPi4QfcDX+iOWx8fX/+SwXCaU7WlyYh3CsQ15 B8TCM+Phly6xRjuOUIhWMebqEKdA4UdJ0Syf+ZEEEUCY7KQgWLcfuDm57hDR84kDvtxj f7sXmuQ60gyeiTCiPd/nAV8PvW5/zbNB+5tZi2vTnxc/Ms286txvQ2z6xsyAMuteJ4kb xP4g2UOLmrm3TowuA/LYQXLsV6M9p3Nr0cEvDHjNSFLnCX3Foty8FhMonB4Hs4ma5FTW ItAVM+5qZgsr1ZelRKttrkJweNuk5Zl5TPEKKsmAfBR3gfvVDpEwmhs9TyuWTFupEgjF yKCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715586441; x=1716191241; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+9boudcCOGEVYkNrscgu8HWtkLEddppv4wDb4lWwH3M=; b=wZb2TQSloOOIU/2E22cMbQchtVxdUna7jTW1e0krhLOLZO+toydC0XFRIRNcVE99JY QmHXDoxwV3eo71EkCoj1EUZ+i2zudZmkChmUdfMjQ26JkcovEtRrfIq8XoPWsx2v1ML5 M7hm4klVz5NOdBdisABdnFg7+WP/Mo9rKfL2xTtEhAXUfvLsVHwYxp4MMxzJTCee5/6a e3l8tf/3jYvFzMG6lb8nCssL+8oja4dZs5ymXmmhYMAhy+LxippG6iFrS4knSijLezAB hQGzDlMIdRn+C9Incarp7M/cswnB8wazeHI1YRIoC8Z7y3zN7zhfYs4otamKWnTqfs7Y 2Fag== X-Gm-Message-State: AOJu0Yz4uLX3O/n30j2pFBnj60VJosbcbGlILgCvkt1aT8aa8P+ppvW7 vqufOPeD/uDrAFWhl15kEfecqQj+9qliEpD38alb4wlYCwo1K877J3u5+sPzDEY0UTGsydJDef2 UKyY= X-Received: by 2002:a2e:8748:0:b0:2d8:a921:dfc1 with SMTP id 38308e7fff4ca-2e51fd4b3c2mr56017951fa.20.1715586440666; Mon, 13 May 2024 00:47:20 -0700 (PDT) Received: from stoup.. (12.red-213-97-13.staticip.rima-tde.net. [213.97.13.12]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41fccee9318sm148204765e9.30.2024.05.13.00.47.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 00:47:20 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH v2 02/45] target/hppa: Use hppa_form_gva_psw in hppa_cpu_get_pc Date: Mon, 13 May 2024 09:46:34 +0200 Message-Id: <20240513074717.130949-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240513074717.130949-1-richard.henderson@linaro.org> References: <20240513074717.130949-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::231; envelope-from=richard.henderson@linaro.org; helo=mail-lj1-x231.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, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This function is for log_pc(), which needs to produce a similar result to cpu_get_tb_cpu_state(). Signed-off-by: Richard Henderson Reviewed-by: Helge Deller --- target/hppa/cpu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 582036b31e..be8c558014 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -38,9 +38,10 @@ static void hppa_cpu_set_pc(CPUState *cs, vaddr value) static vaddr hppa_cpu_get_pc(CPUState *cs) { - HPPACPU *cpu = HPPA_CPU(cs); + CPUHPPAState *env = cpu_env(cs); - return cpu->env.iaoq_f; + return hppa_form_gva_psw(env->psw, (env->psw & PSW_C ? env->iasq_f : 0), + env->iaoq_f & -4); } void cpu_get_tb_cpu_state(CPUHPPAState *env, vaddr *pc, @@ -61,8 +62,7 @@ void cpu_get_tb_cpu_state(CPUHPPAState *env, vaddr *pc, flags |= env->psw & (PSW_W | PSW_C | PSW_D | PSW_P); flags |= (env->iaoq_f & 3) << TB_FLAG_PRIV_SHIFT; - *pc = hppa_form_gva_psw(env->psw, (env->psw & PSW_C ? env->iasq_f : 0), - env->iaoq_f & -4); + *pc = hppa_cpu_get_pc(env_cpu(env)); *cs_base = env->iasq_f; /* Insert a difference between IAOQ_B and IAOQ_F within the otherwise zero