From patchwork Mon Oct 24 13:24:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 617889 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2796028pvb; Mon, 24 Oct 2022 08:26:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6EMFla3RrqUZ7RRv3yI0XnXLinpoGf/V2ZtJgcgNhzCz0+VRQGa1ZFJyxaTCqB+7tbIN8D X-Received: by 2002:a05:620a:2218:b0:6ee:1e01:b189 with SMTP id m24-20020a05620a221800b006ee1e01b189mr23408589qkh.478.1666625203240; Mon, 24 Oct 2022 08:26:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666625203; cv=none; d=google.com; s=arc-20160816; b=PdA4fGM6G1geMLMwO7lK6xVCfkmSLdIjvas44tL+q0tGa+3z8IISz5ZrBrXllYVIg/ agRIrLkwpc3dxbrn8j6t56IrJh2ueLukJlzt0tipUn7xXjaqk0CEFGPGidzXnIFhcBv1 rsFxfXj+s/qQk7w2vU0c4XY8Xd6Kb0Eeq7bbkLBaoXl1capBYaUP06yOdgbLfzS6drkM 8Pp1Wpwl1NkGMsodMuJGtInGuTjIZW+Zz7PsYipuf5gVAq1ZayW7xhmI/DPd/3V95c0x E3gs3QwvgJuD59cO1Gls9HfDISlM/dZFpD2BtLZlfz7h5mYAmCDIPXa6C0ylIHyonbBm IKEg== 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:to:from :dkim-signature; bh=y2RA5owL+HBevavrSq2dUhrDaSLUH9n3FIrHtT1lBI0=; b=aIqdK+4pydMA8VjBgHDfYsDX8iDmsHegs+B8ZFjzAdynqa0xE5YgF4nkq/7VkPCSyF GgUwtXw228CkI9vWz5+G6PquAI4JfU3jCSQhSH6guteZIISV0Eg/covV8z8jLjR5la9K THI5+ssBswBMede3o2rhiBpr2sA9MSUjK8ctmHTle93aKSiKe0CmTIQp4xA+zdaUgW/+ JHvu7a7sg2b2IgqCXJgJ85J8v7sAI79S+xITP3O+Jyv227r5ryJ7ayGHZswOIhL9u1CI ZG/6OauvOjkRARcyfnB2RtvMIBtFHcW4kTcY7O7yQqGZaaJJD2kpj1LB8Vm8cCI3Kvm4 BVDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vfAaecPc; 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 fw12-20020a056214238c00b004afb62a7941si133538qvb.262.2022.10.24.08.26.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Oct 2022 08:26:43 -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=vfAaecPc; 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 1omxTH-0003cp-Fl; Mon, 24 Oct 2022 09:26:27 -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 1omxT1-0003S9-RA for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:13 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxSx-00048y-Lw for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:10 -0400 Received: by mail-pf1-x42c.google.com with SMTP id y13so4398473pfp.7 for ; Mon, 24 Oct 2022 06:26:05 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=y2RA5owL+HBevavrSq2dUhrDaSLUH9n3FIrHtT1lBI0=; b=vfAaecPcAnoxMHKL5SKOEsoFuUwYQBo0dx5OrBp8mtvtM5EXWUETUIHrtYTuzbEePp CWnf2cS9ss82tgFctmDAVReddZjRTQt0zzapkin7uzXDjlJ57f15qjYWQte7jukoIHd6 oV7UdZVgfx5bjrW2Duu5XY9griuJMIVqsV4c91l0/bYx4iz34J0u8yRzAKCiehuaPXv9 IJv/26UdGGHTMKVVWyLWXdqv5ISmHZy1enWERe+CN/3vZHJciWbUnKjnSuVYkZm+q+UB EwO5SvjPsce5KYoV1cL+wlINUtGfPON7m88Tx57MGnAC867nCp/k3xsF28f21InyXMgQ Jt6Q== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y2RA5owL+HBevavrSq2dUhrDaSLUH9n3FIrHtT1lBI0=; b=pIWgkM8UZ1/rffoRQ/ztIUwFtVpS/NDa+SOFISs/gLKdiElqycBeVcD362tqyPuqaJ xSm3Gob16po+emAREvj7u9A3xkY21L60aFVssDC7zQOK/2yoNXVefTVIvvJwBqHGIzt9 dDmDBL1M70kGA9eMq87hcgJl0IzW8tRsisG/VPld4eXlvmUBWfHC3cRSMQQYQGj2Z1DM 9QhTUcop2quqye7SUVcTfhgbSJfycDl2NBvsHEgFr/gelYSnz9yjKmfW2vyASz5r0Mb/ F+fwxvhwr06SOoGddJkLyPVt35SfCaCGBGPIPprbAXffPJUkCwr3qna9BdN4H/djVv/X lSBA== X-Gm-Message-State: ACrzQf0FpezjTwFrGI80uR0ra2FAH2GNVcEU9A+6uA2gT6CuAoAeDrD4 nFITGCgpBaFNvZDVd07il63duwOAixeJaQ== X-Received: by 2002:a65:5605:0:b0:46f:1e8d:ece9 with SMTP id l5-20020a655605000000b0046f1e8dece9mr1580371pgs.249.1666617964895; Mon, 24 Oct 2022 06:26:04 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.26.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:26:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 22/29] target/xtensa: Convert to tcg_ops restore_state_to_opc Date: Mon, 24 Oct 2022 23:24:52 +1000 Message-Id: <20221024132459.3229709-24-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221024132459.3229709-1-richard.henderson@linaro.org> References: <20221024132459.3229709-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.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 Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- target/xtensa/cpu.c | 10 ++++++++++ target/xtensa/translate.c | 6 ------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index cbbe0e84a2..09923301c4 100644 --- a/target/xtensa/cpu.c +++ b/target/xtensa/cpu.c @@ -51,6 +51,15 @@ static vaddr xtensa_cpu_get_pc(CPUState *cs) return cpu->env.pc; } +static void xtensa_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) +{ + XtensaCPU *cpu = XTENSA_CPU(cs); + + cpu->env.pc = data[0]; +} + static bool xtensa_cpu_has_work(CPUState *cs) { #ifndef CONFIG_USER_ONLY @@ -215,6 +224,7 @@ static const struct SysemuCPUOps xtensa_sysemu_ops = { static const struct TCGCPUOps xtensa_tcg_ops = { .initialize = xtensa_translate_init, .debug_excp_handler = xtensa_breakpoint_handler, + .restore_state_to_opc = xtensa_restore_state_to_opc, #ifndef CONFIG_USER_ONLY .tlb_fill = xtensa_cpu_tlb_fill, diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index bdd4690a5c..77bcd71030 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -1355,12 +1355,6 @@ void xtensa_cpu_dump_state(CPUState *cs, FILE *f, int flags) } } -void restore_state_to_opc(CPUXtensaState *env, TranslationBlock *tb, - target_ulong *data) -{ - env->pc = data[0]; -} - static void translate_abs(DisasContext *dc, const OpcodeArg arg[], const uint32_t par[]) {