From patchwork Wed May 15 09:40:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 796919 Delivered-To: patch@linaro.org Received: by 2002:a5d:452e:0:b0:34e:ceec:bfcd with SMTP id j14csp2890375wra; Wed, 15 May 2024 02:42:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVeS9nuMnhJv/8K+ZRnOdesJvM7FRBIFnddZ/Jfxxq3I+H5NGSLp9F+lJPFI0wKv0K4lqYVIbeEfBov2AunxLva X-Google-Smtp-Source: AGHT+IHpkYaDW2DcURJTiUGq8jkuqbLX/W15TU8+N6p2bcsJbmNqkXpdLkwREhAY/m9BFoDqhJjg X-Received: by 2002:a05:6102:b0d:b0:47e:f719:cbd2 with SMTP id ada2fe7eead31-48077db4ab1mr15757880137.7.1715766158240; Wed, 15 May 2024 02:42:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1715766158; cv=none; d=google.com; s=arc-20160816; b=j8C3fYH0UPxHFcQ9oLfC0W0lNTG9cY9BZOTUPSqFdfM1uKIPGEYnSphRxxIzTGeJOy DQOEuhUXH95H8Ck4m8m35RsxYOvSoRAznbEWkkF2DZq5jRX0aH0VdobqaFDHUykyFrp4 9wqJSbed6XekZBpbKO0SGUC0rdHAgK79VN0xnsGpIes5Lv418+ocIVKpFcrsn6FFMQSk ZWNBwMIzGbPriR4s8OByNL0BecIs9xjRBrucNxhGc6am/cEkRc7NSfieyCB+Ba+AYzwj aGeaw6NPxCwhkx66Z2v5Y2sQ2GG8kxO21MZRFAZvTcKTl1MD4SsLLM6+ozuswSMdPH75 B9tg== 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=uUppVIcVxulNFKmt5JKoE50UNp9B197FkQ2pGAAJJ2A=; fh=wDljmxUHXfz9MGj2//jPHYRc53BMWF157v8rVKELrf4=; b=pqijuIstQiusXQhMBbKRHeIeZOnM2wfjtAGjCsQKyGUB1rUP3051lgnfeZpgLgP5Lf 3XanJfN0lk8XWACXxzq1ev0yLe6ULslgDItZg+1uWi+VvwXeTwq4xfngLpcPmG3OCxTb UIdIaMRNRphg8ujmq4BRPnM08Ire8Ck6Hv7leltczqsn8MA8/UrnwDvY3tpJxGHwY3as LTGa00zw6foro5JM4o+3RRu0nByK2BMTAP+n5qaoauzimcwNVf++IBy7uiwgyQGCyezg cEBIuGQZDD2Z+6ui1IgoRwgFeu4c+pdPwImSHjYZxYhWEFLtLERdJxuDvMECFaIUXf9X MCpg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fR4FSPp2; 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-43e0425711csi108898241cf.40.2024.05.15.02.42.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 May 2024 02:42:38 -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=fR4FSPp2; 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 1s7B8F-0006B7-AB; Wed, 15 May 2024 05:41:07 -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 1s7B7y-0005hD-5E for qemu-devel@nongnu.org; Wed, 15 May 2024 05:40:50 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7B7v-0001br-HL for qemu-devel@nongnu.org; Wed, 15 May 2024 05:40:49 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-420104e5336so24071995e9.1 for ; Wed, 15 May 2024 02:40:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715766046; x=1716370846; 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=uUppVIcVxulNFKmt5JKoE50UNp9B197FkQ2pGAAJJ2A=; b=fR4FSPp2f+ol/8e7kkuPN+H1dBW5u6acizNnvHV8U8usHHX1RuboGu0uW2ND+djVhC WZN83JR8mhAIAoKLgBcAD85D2zx3uFlt8BnBETE+QZI/BIlqWxaZMP56Vi5IEkP6kxkN aBrPVDmhe9pCfPk+DD31R+4qJsUR48nspycCQkQcBSnmh53y2f4q6AIPQ9br8uR89faO Z99jXQx5WtB2HFAqnWlj6GTlGlyk0qydLQob/W2eedEjjKtlHJ7Xmi7trBX3Slk5XbRp uJWRjiB4JLsfiOR3zvAlvI6ktk/sVlHbNbmwNeDrxiuZ7aGoK3NcEdIjaf4KBfVaUnJf 0h+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715766046; x=1716370846; 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=uUppVIcVxulNFKmt5JKoE50UNp9B197FkQ2pGAAJJ2A=; b=wlBADTiWTyYgBRIAQyAT9w7W6O6G1CqE8aU/nEn0GpQgL/IDo69Ohli+YGJ2xzcRrK HGYRVXIMWEf1O1X6wIfUF/TTASWEp7guHBTwjrSSzkZOR/yn/HwdH2iep5jhFwVgSoz3 8W31IAL6yG2X2d52sUDSSnaq6+Px/gNG+j96lP+MJCPYZT65uIWeEO9Dw+P7U9iizG+5 9A8heV18mOBbkTPklH43m2uOfPByU9vkAndjnErpGfh6iztS/7VRBtWAb6En+8H2pDxR KKsOvLFMsKpRHGiyXBtaqVVA5Yj4lc+KU2Z7AUt3qQbwnij+cMu0siJvlc/WRWj4XdkY R2jQ== X-Gm-Message-State: AOJu0Yxn6fdM6k8k6mF0NDScyQTuovY8ei7v0a0gU4IVQavq/4yVGdby TB1XN0ZPblxxiE0iRK43QvW4TKjDFm/VWVc97DfjLXRR4TWZEOZegfizkAPePJn1UtSAPoot0BG cAUg= X-Received: by 2002:a05:600c:458f:b0:418:3d59:c13a with SMTP id 5b1f17b1804b1-41fbcb4fe53mr166209065e9.9.1715766046001; Wed, 15 May 2024 02:40:46 -0700 (PDT) Received: from stoup.. ([149.14.240.163]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502bbbbefdsm15897058f8f.94.2024.05.15.02.40.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 02:40:45 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Helge Deller Subject: [PULL 02/43] target/hppa: Use hppa_form_gva_psw in hppa_cpu_get_pc Date: Wed, 15 May 2024 11:40:02 +0200 Message-Id: <20240515094043.82850-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240515094043.82850-1-richard.henderson@linaro.org> References: <20240515094043.82850-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=richard.henderson@linaro.org; helo=mail-wm1-x332.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=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(). Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- 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