From patchwork Wed Oct 26 02:11:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 618784 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp115750pvb; Tue, 25 Oct 2022 19:25:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7QEV3XEsybmw7VWK3YOKD/mPFCOI8+Zns60S7rJeqTfoOkdqthK7zPoOJspMfzv/PXMM4k X-Received: by 2002:ac8:4e8d:0:b0:39c:cbbd:d6fd with SMTP id 13-20020ac84e8d000000b0039ccbbdd6fdmr34700628qtp.377.1666751151004; Tue, 25 Oct 2022 19:25:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666751151; cv=none; d=google.com; s=arc-20160816; b=OCCnJWRSisuu2GIPKbsANeQx2gLx0sRa/UyJDz7CZKTIW6flubbY5AGds7btizVyOB XopGf5C0V5QcKmx6fUERUb54CVT5YujmGIYwintumRfE0LiAvUVq9AIeg7sGrD3JtyNI YeoQbV7rOY+2IWIgyolBg5aUNwQPyGfpTqCre1vZ+aGYksekZqBXuYf6bJGV4a8E4FFu mfKgGkoVvvNVObIdY4wSMINZqNIa3ADcje93WF8uNVFxCSiMi7jXLSwfBJRTUZ5563Nu 43WhQgpN9HrWm7cvGKmqZ2EeAcIYJ0TBCdVXyl8Bm5LGyyl5VXcfGKtzaMOcSNyWFgvK Bd/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender: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=OoTrhOW+FgyqAL5tOpJBBH0wKZwhc1ALSUhVIqbqWFk=; b=XDYYtvEtRybh56wr8BdixXTyn19rqzBESUxwyWFAclBEBegkoIcEe7N7PSjiT/JGnT +2aNnxSGMhOb2zHD7D4qrAi5FYh/0vVeayQ9KN3GWP3lPpZjQ9RkUsAIbMbFxo1Zi9b7 2pSIDCHUfFEe6Io6Yo5vC4WuTGjw47ZXG9x7mm/wOKhiJveJLBD2XtW7nER0RohM5IoW IO5PSeAJFqwWX1BGISj2k8WMhKfa7dG5Vh82IIVMtHEgwbZWB3g40Lz7yyINU7fPoV/y qgrsHZMZhLqT45/NgFCn34t+p+aInycEh/rcJpEmIWH4e25YU0uQLjcurlmSsowzBZum QWeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ifM1s71O; 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 g20-20020ac87754000000b00396e37a4c7bsi2555877qtu.504.2022.10.25.19.25.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Oct 2022 19:25:50 -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=ifM1s71O; 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 1onVyh-00085e-To; Tue, 25 Oct 2022 22:17:12 -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 1onVy6-0007pF-36 for qemu-devel@nongnu.org; Tue, 25 Oct 2022 22:16:34 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onVy2-0001sx-W0 for qemu-devel@nongnu.org; Tue, 25 Oct 2022 22:16:32 -0400 Received: by mail-pj1-x1035.google.com with SMTP id l6so9114541pjj.0 for ; Tue, 25 Oct 2022 19:16:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=OoTrhOW+FgyqAL5tOpJBBH0wKZwhc1ALSUhVIqbqWFk=; b=ifM1s71OUGJ1BqD5n6gaPyBtJO/VbwERZTg9C5IN0m5JAkJC3se1gH3n2zKAbRxgzL 6FWuaXAWriDS5ttnOJZFgQBBulHyQEygEBVpDTWPNXyBpHkhv3fcUN9H+DKgML8Fu++I TiFtb7aspRY0V+oDi57BuvyB1bpjR1mfiMH846xtJ5p2+oVfiQWTjldN0sncZokV0vlh TngsB8csK6LPhirb/U3TAnU4tD0sdmDKGDd5XOSWqQZ0MAJaWnJYi/vnFoZ8DX+7W5jt AbdHnkCkd5ChOhzYMTqOEX3m2zWmr17stiDU4QX1KHffmhQrVJdhg1aSQZ7nISJjHnHX DlcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=OoTrhOW+FgyqAL5tOpJBBH0wKZwhc1ALSUhVIqbqWFk=; b=lZ4XOEV2zWiiKHqffOk3Onc+8cQjeilM5ZIYFnX/T/piOdqvcLQ3ZdPTs4e4hSwIr3 pcIx3tiHZGhYGIRAcKTu9HTvWRFb1vgbgfbGR+L4Gma1okoWTEXgJyJxyNaL5Mm0s/gE TkcBpN1XkfkuU6ZQspcojJmlgS+1i9wx5JY2bzkVrHbBZuovVf8kL3sKwL5Cfi5PZlFX SqF43mjyW2t8o5wvF2khULgPqjyG+TRhZB0xSZHRyUyuNUg95d8OuejQxN4NsbPdQgzr QU7ZGoNS3sS9LRWMnb4BqqZ3uMSMid8ltyr+hJqZXr77L6GWOK+T4py1bpkLbXvxitak qQqQ== X-Gm-Message-State: ACrzQf0T5SGsnxdtakIMWifyAHnVMhPzdfLZiJl1lCINMzlzNEL1j9pb xAD5TlzG6jDRZHnAZsw1Wp4oFV5Tig7WWEJH X-Received: by 2002:a17:902:e9c2:b0:186:79dc:7d87 with SMTP id 2-20020a170902e9c200b0018679dc7d87mr25204153plk.59.1666750588174; Tue, 25 Oct 2022 19:16:28 -0700 (PDT) Received: from stoup.hotspotlogin.services ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id q18-20020a17090311d200b0018123556931sm1819732plh.204.2022.10.25.19.16.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Oct 2022 19:16:27 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 44/47] target/sparc: Convert to tcg_ops restore_state_to_opc Date: Wed, 26 Oct 2022 12:11:13 +1000 Message-Id: <20221026021116.1988449-45-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221026021116.1988449-1-richard.henderson@linaro.org> References: <20221026021116.1988449-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1035.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: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/sparc/cpu.h | 3 +++ target/sparc/cpu.c | 1 + target/sparc/translate.c | 7 +++++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index f80ea2e8cf..e478c5eb16 100644 --- a/target/sparc/cpu.h +++ b/target/sparc/cpu.h @@ -600,6 +600,9 @@ int sparc_cpu_memory_rw_debug(CPUState *cpu, vaddr addr, /* translate.c */ void sparc_tcg_init(void); +void sparc_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data); /* cpu-exec.c */ diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index 1f9ef7afd8..4c3d08a875 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -872,6 +872,7 @@ static const struct SysemuCPUOps sparc_sysemu_ops = { static const struct TCGCPUOps sparc_tcg_ops = { .initialize = sparc_tcg_init, .synchronize_from_tb = sparc_cpu_synchronize_from_tb, + .restore_state_to_opc = sparc_restore_state_to_opc, #ifndef CONFIG_USER_ONLY .tlb_fill = sparc_cpu_tlb_fill, diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 2cbbe2396a..34858eb95f 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -6011,9 +6011,12 @@ void sparc_tcg_init(void) } } -void restore_state_to_opc(CPUSPARCState *env, TranslationBlock *tb, - target_ulong *data) +void sparc_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) { + SPARCCPU *cpu = SPARC_CPU(cs); + CPUSPARCState *env = &cpu->env; target_ulong pc = data[0]; target_ulong npc = data[1];