From patchwork Tue Mar 19 15:42:36 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: 781109 Delivered-To: patch@linaro.org Received: by 2002:a5d:46c1:0:b0:33e:7753:30bd with SMTP id g1csp1995795wrs; Tue, 19 Mar 2024 08:45:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV8OR8RGVCgR9T432EOVCyPN+IKvfRVXxj6bM+B1hBO1FBe3KHOdi+MgNM9GVeQZC02uGTtNy0JTc/frHCFKkoI X-Google-Smtp-Source: AGHT+IEYmFqEXlt4MzU3BC/TB27/kCRam4M+0jRseXk77icsRE9fM/92JqlZUTxcKYAQkV7kI1ll X-Received: by 2002:a05:622a:1a1a:b0:430:d2b8:5753 with SMTP id f26-20020a05622a1a1a00b00430d2b85753mr3285544qtb.28.1710863113940; Tue, 19 Mar 2024 08:45:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710863113; cv=none; d=google.com; s=arc-20160816; b=YR1xAuZQ8pbzaz0DVQ5e8cO8EUSlnWU4q7pIWgokDBRSaspA/2PM/mJvmozJsoB9IQ BSmPgvvhReKeapEt53XqtS0g950ADL3L3bVplB7JEcZ60bO1CpDgUhC1lsrbincrN2uH QeRgAKkV2l06g4Iw+aAFnjIJy+KGWBjTHGt8jV0V/XEYRQF2wgWO13eGDeYpTrp8ECQz h7oBjv70mnFjW6ur1C4U/itlu27hb968/lStZU2sM/HO8+f8fybrxc7a9hMuaMWtIqXu bUX+z8qpbXN6JBLXjOAnMCpv8YktqKqI4pyr8S0e0mv/b5D18uSa+5mNAGWUz9g0uhqP 3CKw== 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=wt+1/nVbm4UwUNrHtwVfJccIMKB4kkx/gPc6B1UnmDE=; fh=8Pzz7K/FQo1q7xIq/JV6RYDisF54mivkmBc3zg+OmUM=; b=QC6/fAXr/hJsYYQcrYZixV9w9FabSqPj8dU26dz3sRHa2Wu6f5Mv4r+x+BxTPdRTDY mBiqbDqhfKN8dBZA+HUkUFmGCQA6h+8bG2RBdM32b1wEkZXi6pVg/LWjLF4LUK+cLFAg pjdeL27y2vosjcQmkRk5vdeNPFZlmovTSdR3mCnNQC1Yq5YzmwWO3kYPCwHmLLNIRPBb I8FX+JoWBtBbK3CtfYcNWKhvxER+rWXO0TpbHlHuCaq9GTXintwWgbIK0nZzY3+RSYP7 sxNzaBxL2mSq+wMCbJIVzQcqMuCPPG7idHY9dgi2snI/m9kTz7qDRq3WF1xab+m8gE5L q1iw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M+xLodN6; 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 b11-20020a05622a020b00b00430cad99fa6si5114976qtx.773.2024.03.19.08.45.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Mar 2024 08:45:13 -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=M+xLodN6; 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 1rmbd0-0005aO-7n; Tue, 19 Mar 2024 11:43:50 -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 1rmbcy-0005Zk-Uz for qemu-devel@nongnu.org; Tue, 19 Mar 2024 11:43:48 -0400 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmbcu-0004tc-UR for qemu-devel@nongnu.org; Tue, 19 Mar 2024 11:43:48 -0400 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2d2505352e6so64679001fa.3 for ; Tue, 19 Mar 2024 08:43:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710863023; x=1711467823; 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=wt+1/nVbm4UwUNrHtwVfJccIMKB4kkx/gPc6B1UnmDE=; b=M+xLodN6o4YytlQ0BuvMaMGvZHAc4IcZDYBgEDDHXEFUS44nQZFSjkqpDYr4DHfcEs 29EgGNGLkO6rvEpMO7dCBrx6OB5m8tyMBx7V+xvpvLPSDYIM7Ux171sNGs07EwFJDFMh Y2TI9jRMctvbh6VmepB/xOfm06Um/OYbDrsSlkvcJ2KMqOm8dUfcIe6K4TBSXYvnaoAm 5dktWuUHwZsh58Ob4dmVSFoP8yrHVZD171OlK8FdoLbdZCL6DRT5/+BvzCybVm1Ubaxw T45xUKDv9fniInOmNzHQzWAqbR3lOLQ2G+BfVUh9FRU/XuA+CVdEPaaToMMxnQ7tv4I2 3u2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710863023; x=1711467823; 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=wt+1/nVbm4UwUNrHtwVfJccIMKB4kkx/gPc6B1UnmDE=; b=ESTRv4UFVRN/c5MaoAsiizsz6qsoiin6IL7hVxHnSec1QdM+vizRE+mNuLqSCYOhB0 S0gx16jZA/7/mdUZFqQIyaUx5TQ1gJfZGs1mKXxT5tGEZAmCp18GWMH+q6vKuLqL/Wfo 2yrHu7/woF2KKhr6b9dzGJNyBR/zcWw2mcA9ilu27lw49ZCipiVTGpRr32sIVWhzjAsQ n9sP53uj+GgiMNmcVzMeGh4maPxU4GepE/RRy1azKQlrG1NgGS7BzmAdnQFnDGgQ+9bO SCL/6U5hPYrF1+IgFdzmjys4HUKKlULxO3y//jdX0dGEwFrikcWFdXhxEvPhEbly7PBs 5frQ== X-Gm-Message-State: AOJu0YySFkaAuxWhSJ+oi6SyvmZbFzYRKMdwdMazaBeuHPI2i3vYRITz 8/uYZn2gabikAoQYJqnh8pmNjuyMC8Yvl/gR7WNWM+HzIjuF+bZbJfskNIPxYW6EjjFQ7Evz78Z g X-Received: by 2002:a2e:6d02:0:b0:2d2:e44e:a5cc with SMTP id i2-20020a2e6d02000000b002d2e44ea5ccmr10123039ljc.46.1710863022845; Tue, 19 Mar 2024 08:43:42 -0700 (PDT) Received: from m1x-phil.lan ([176.176.166.129]) by smtp.gmail.com with ESMTPSA id fm24-20020a05600c0c1800b00414650448a7sm2379716wmb.11.2024.03.19.08.43.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 19 Mar 2024 08:43:42 -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?= , "Edgar E. Iglesias" Subject: [PATCH-for-9.1 07/27] target/cris: Convert to TCGCPUOps::get_cpu_state() Date: Tue, 19 Mar 2024 16:42:36 +0100 Message-ID: <20240319154258.71206-8-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::22b; envelope-from=philmd@linaro.org; helo=mail-lj1-x22b.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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 Convert cpu_get_tb_cpu_state() to TCGCPUOps::get_cpu_state(). Signed-off-by: Philippe Mathieu-Daudé --- target/cris/cpu.h | 12 ------------ target/cris/cpu.c | 11 +++++++++++ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/target/cris/cpu.h b/target/cris/cpu.h index dbd6fb05f0..6df53f49c4 100644 --- a/target/cris/cpu.h +++ b/target/cris/cpu.h @@ -273,16 +273,4 @@ enum { #include "exec/cpu-all.h" -#define TARGET_HAS_CPU_GET_TB_CPU_STATE - -static inline void cpu_get_tb_cpu_state(CPUCRISState *env, vaddr *pc, - uint64_t *cs_base, uint32_t *flags) -{ - *pc = env->pc; - *cs_base = 0; - *flags = env->dslot | - (env->pregs[PR_CCS] & (S_FLAG | P_FLAG | U_FLAG - | X_FLAG | PFIX_FLAG)); -} - #endif diff --git a/target/cris/cpu.c b/target/cris/cpu.c index eb4bddcb7e..8d0b92b96d 100644 --- a/target/cris/cpu.c +++ b/target/cris/cpu.c @@ -51,6 +51,15 @@ static void cris_restore_state_to_opc(CPUState *cs, cpu->env.pc = data[0]; } +static void cris_get_cpu_state(CPUCRISState *env, vaddr *pc, + uint64_t *cs_base, uint32_t *flags) +{ + *pc = env->pc; + *cs_base = 0; + *flags = env->dslot | + (env->pregs[PR_CCS] & (S_FLAG | P_FLAG | U_FLAG | X_FLAG | PFIX_FLAG)); +} + static bool cris_cpu_has_work(CPUState *cs) { return cs->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI); @@ -182,6 +191,7 @@ static const struct SysemuCPUOps cris_sysemu_ops = { static const TCGCPUOps crisv10_tcg_ops = { .initialize = cris_initialize_crisv10_tcg, .restore_state_to_opc = cris_restore_state_to_opc, + .get_cpu_state = cris_get_cpu_state, #ifndef CONFIG_USER_ONLY .tlb_fill = cris_cpu_tlb_fill, @@ -193,6 +203,7 @@ static const TCGCPUOps crisv10_tcg_ops = { static const TCGCPUOps crisv32_tcg_ops = { .initialize = cris_initialize_tcg, .restore_state_to_opc = cris_restore_state_to_opc, + .get_cpu_state = cris_get_cpu_state, #ifndef CONFIG_USER_ONLY .tlb_fill = cris_cpu_tlb_fill,