From patchwork Tue Mar 19 15:42:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1913648 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ZVbjAZg3; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TzbfY2c2Jz1yWs for ; Wed, 20 Mar 2024 02:45:57 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmbeP-0001Hu-OR; Tue, 19 Mar 2024 11:45:18 -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 1rmbeO-0001BO-Dd for qemu-ppc@nongnu.org; Tue, 19 Mar 2024 11:45:16 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmbe5-0005R4-P6 for qemu-ppc@nongnu.org; Tue, 19 Mar 2024 11:45:16 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-41468f6d584so2242745e9.0 for ; Tue, 19 Mar 2024 08:44:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710863096; x=1711467896; 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=hwhHMygx0mLENqv0dOkZHirx9fre16Z9mIHYSdz8fsE=; b=ZVbjAZg3IT4dLTFQEn9z+KNAMhyeL1YMm274oUPff629OaFDbtEqUAdXzB/O4ggtLq KkLzetDMwZIoqio5Y0qCvrfKziorPTkyLP1kjfpVRIR3qmxUGP4sp7hmIEAC+QSxfNKc B2BD1gfhPLRszkSseY/Ww5YGMBmrX+RKl4GLEuhi+QkNfBT2dIIiXvp750kzBYDyXDzv gSyjOeeo6nWK5aL7c1do6/612hsEtmisVSVsEaYP55/4HlMSS3YO/fdH9ZBuA2iWFpM0 otZgzCTPAxWlxvE82dUhqD09ZbkWdlq8Hgqe1BNwyUWK2b2yPmUyJ89mNDlBgZ2JuCfi kbjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710863096; x=1711467896; 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=hwhHMygx0mLENqv0dOkZHirx9fre16Z9mIHYSdz8fsE=; b=D2E3nuJlDYjs1LGfQCMw7Vi7sACqTgPJZNZMvN4N3NYS7VwqUZxtTDLyA6GlEAuezE 10V3EXmRO8fU+qkYWKUsjBPuza41aap4JoTHaMMinKLf0GpR+Ja3PnRXqyeJwd4uLgt/ SaTv9b1mZsd5/VqQysTQ6Kh1hEzW7BPR+m0pewufTWPbCCZk4bTZDjjQhMHioIaL3sG2 9PN90y6c0xNWRsiZrGQPpe8DJsdMec2LQUDWMdJkLd29eEcWU1njANG4ELQ5+Xh8d+Ta ln0l2EKTqcjPJiQ6MZGDRlKv5JuGpo78aukoTZeXWECpEW1gfJ6rKGZAoeYPQ4iEbSBS hIBw== X-Forwarded-Encrypted: i=1; AJvYcCVoUNO2Q/Ikdtvh9qYvSQQx8Rq4P7/gom1J20iR8c7ZKbRpKoj/8KRqU8XiR2BqelFzg2BRzOsBpj00s7sYAXmnQTtD X-Gm-Message-State: AOJu0YwYGudQdCmWPcWFoRCC3c0GLl3O9/QBAJhYmMLOPnK7UHT7MngL mtGGuYmZa/nctfeR5Iw8Un0N+wvkHdU7tAZXuC6xObawWX32JgKk5oX+Cp3RSOo= X-Google-Smtp-Source: AGHT+IHkjBKpGTnD9xGvDLnsbpHdmwJ5rXo3GW/dIYSKuVupjs6xCFKUVD0+6LiHJf4pkYi3w7g9pA== X-Received: by 2002:adf:ed4f:0:b0:33d:c217:e8a4 with SMTP id u15-20020adfed4f000000b0033dc217e8a4mr11113184wro.14.1710863096299; Tue, 19 Mar 2024 08:44:56 -0700 (PDT) Received: from m1x-phil.lan ([176.176.166.129]) by smtp.gmail.com with ESMTPSA id i18-20020adffc12000000b0033e786abf84sm12655011wrr.54.2024.03.19.08.44.55 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 19 Mar 2024 08:44:55 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-riscv@nongnu.org, Anton Johansson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Yoshinori Sato Subject: [PATCH-for-9.1 20/27] target/rx: Convert to TCGCPUOps::get_cpu_state() Date: Tue, 19 Mar 2024 16:42:49 +0100 Message-ID: <20240319154258.71206-21-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240319154258.71206-1-philmd@linaro.org> References: <20240319154258.71206-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-ppc@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-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org Convert cpu_get_tb_cpu_state() to TCGCPUOps::get_cpu_state(). Signed-off-by: Philippe Mathieu-Daudé --- target/rx/cpu.h | 11 ----------- target/rx/cpu.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/target/rx/cpu.h b/target/rx/cpu.h index 996f121bcd..dcda762212 100644 --- a/target/rx/cpu.h +++ b/target/rx/cpu.h @@ -149,17 +149,6 @@ void rx_cpu_unpack_psw(CPURXState *env, uint32_t psw, int rte); #define RX_CPU_IRQ 0 #define RX_CPU_FIR 1 -#define TARGET_HAS_CPU_GET_TB_CPU_STATE - -static inline void cpu_get_tb_cpu_state(CPURXState *env, vaddr *pc, - uint64_t *cs_base, uint32_t *flags) -{ - *pc = env->pc; - *cs_base = 0; - *flags = FIELD_DP32(0, PSW, PM, env->psw_pm); - *flags = FIELD_DP32(*flags, PSW, U, env->psw_u); -} - static inline uint32_t rx_cpu_pack_psw(CPURXState *env) { uint32_t psw = 0; diff --git a/target/rx/cpu.c b/target/rx/cpu.c index da673a595d..3b55b09e64 100644 --- a/target/rx/cpu.c +++ b/target/rx/cpu.c @@ -58,6 +58,15 @@ static void rx_restore_state_to_opc(CPUState *cs, cpu->env.pc = data[0]; } +static void rx_get_cpu_state(CPURXState *env, vaddr *pc, + uint64_t *cs_base, uint32_t *flags) +{ + *pc = env->pc; + *cs_base = 0; + *flags = FIELD_DP32(0, PSW, PM, env->psw_pm); + *flags = FIELD_DP32(*flags, PSW, U, env->psw_u); +} + static bool rx_cpu_has_work(CPUState *cs) { return cs->interrupt_request & @@ -187,6 +196,7 @@ static const TCGCPUOps rx_tcg_ops = { .initialize = rx_translate_init, .synchronize_from_tb = rx_cpu_synchronize_from_tb, .restore_state_to_opc = rx_restore_state_to_opc, + .get_cpu_state = rx_get_cpu_state, .tlb_fill = rx_cpu_tlb_fill, #ifndef CONFIG_USER_ONLY