From patchwork Mon Oct 24 13:24:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 617885 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2764054pvb; Mon, 24 Oct 2022 07:37:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7jz5TY20Dstoq6D5Bgx9Dbtqq6YvtaB40hOG4mdHuQVajjWZsYaV5VQv7S4Mvpm3Gf6gID X-Received: by 2002:a05:620a:3720:b0:6dd:beba:b3a1 with SMTP id de32-20020a05620a372000b006ddbebab3a1mr22293171qkb.138.1666622264597; Mon, 24 Oct 2022 07:37:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666622264; cv=none; d=google.com; s=arc-20160816; b=gcfPZquECP7UZ0bC/yOc6zlPQrG8B6pn9creMkbVYDTDmN+1VwR+vfzzAq3uBs8znA tdCK7l7uAM/CE1MScic3tNeM+fou0XmhUP5/q1Xe1s03MIYZxH8nHWGp5HpEUTVT42uB LKvcmQh1Ob1/x3QiMzzEBW9imod4ABcWXnyKMd5oaLZg37gY/tlEDa4q8cdseDekiXxr YwUezgHtqnwBb718bY+xTrbNNc9/5hqOGztQXZDHRo+gpBPtlwCqoMh6DQhHSlRddE+g kSq7tedtpt0jxYMtzs7CmLQPl/ycE+hOEsHerVjdew88JOB76tR/2ZEGWamPL0lKnIGw sUyQ== 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=g+JyoE/JLPQZeDvC/7V0SYveT535zxxz5m5s4NFje60=; b=fFpxlMddzpGVARlUaH2GQ2xxjVMRh2GBBSPZ0hgoUalPxK1/ktCEuk5MThivcE88fR aAjzptfR37nFRI8VA0mwdRmeYK7ViiYxEeA4KZBFPT5lkfBOICkt6X2n7AgUC4dLY0+j HM8VXEAgkg+cNNOkE2AgcSyJtoiSs4SRY1UKvRhHjML4bb8K+2aK5QjETX3ve90nTlnD v/40dOXPPai0DXrUHjuCtSAwqJKABOSKroAiZDEzjpZ5KbHlPg8c0Bz5ivkTFfTBVenP KcTLu9y1jlZeqdqtTPh8s39Wj8kJ3lgtujmkHwui+CGfFLb4nx+kbaiuseujzJT0nUBg OAxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gtIS7NPX; 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 bp19-20020a05620a459300b006eebf6f2e6asi67547qkb.409.2022.10.24.07.37.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Oct 2022 07:37:44 -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=gtIS7NPX; 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 1omxSS-0003HK-AS; Mon, 24 Oct 2022 09:25:36 -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 1omxSL-0003Fg-T5 for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:29 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxSI-0003yT-MY for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:29 -0400 Received: by mail-pg1-x530.google.com with SMTP id 78so8646386pgb.13 for ; Mon, 24 Oct 2022 06:25:25 -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=g+JyoE/JLPQZeDvC/7V0SYveT535zxxz5m5s4NFje60=; b=gtIS7NPX/CH5AArmdQ575TaDrS+TagyeuPxUGjWG9hjSWNnTXg49J2kMntCzXy8T23 YBYueKWt299AwLLQaI80jy5rtkOE/BMSd13r3fALo31VD1sTUf6sN0YjSApnAzjV+C9S Eu0n+fbo1jX9bb3v+ErW72Su1tLVAAuwfxpPGHC6Zz1364bAFYkbog51zQvwBLjH05/X 3iv/SaJJcQ6/EnT1dPhhuHdnQlUX27X+HdT+DemnooLyfbd81C1+4mnZK9u7NDvcy+vZ kJ1COG7CjbIfZlihXuP9oAYuz0Gfm9r+RkpkRPiBr4O+tGJI44wbtiEAF5fSl2s99oVh TrWg== 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=g+JyoE/JLPQZeDvC/7V0SYveT535zxxz5m5s4NFje60=; b=pC+dNsnvJTMHSLTYIjlhJ2zZoNBEPD+W5pe5C/Fv/9ffFXUOpvWOn3r9Lxv7YG3Np7 q2CAweryzGxScnoHUswseRn/sHPSJHP5O8RgXgHLNIF4LZp3hoMH5TQ7SbcFD4BeXWDz Cn/nB5P9Aq+4aZImmaBfPQZIGPdx+luW5nxtUqUmazkAjZqQe6TUqGesVZLSa3LQJQNT h112YY1GrrckeBPk9tnShYwWymCncu4S2s+j01SbWMLlK8c/6KPDvawG8vI1wlO3Ux5V orJWaC43GO+AgdcZJutw3yBtswaW/Tjyz8ZdZQ0I1v6cMR/li7+7/mg1jDDpA7uqNsmr saew== X-Gm-Message-State: ACrzQf0TaNDjYjBpsRXeGFq2QLmlNEDQFVqcEPI3QRWF4CRG5W6s2XsW gJK2u2N9DZgnv8o7cf+yWy4L/lNjmS89IA== X-Received: by 2002:a05:6a00:124e:b0:565:ba3c:58bf with SMTP id u14-20020a056a00124e00b00565ba3c58bfmr33565660pfi.82.1666617924717; Mon, 24 Oct 2022 06:25:24 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.25.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:25:24 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 05/29] target/cris: Convert to tcg_ops restore_state_to_opc Date: Mon, 24 Oct 2022 23:24:35 +1000 Message-Id: <20221024132459.3229709-7-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::530; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x530.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/cris/cpu.c | 11 +++++++++++ target/cris/translate.c | 6 ------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/target/cris/cpu.c b/target/cris/cpu.c index 22f5c70f39..fb05dc6f9a 100644 --- a/target/cris/cpu.c +++ b/target/cris/cpu.c @@ -42,6 +42,15 @@ static vaddr cris_cpu_get_pc(CPUState *cs) return cpu->env.pc; } +static void cris_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) +{ + CRISCPU *cpu = CRIS_CPU(cs); + + cpu->env.pc = data[0]; +} + static bool cris_cpu_has_work(CPUState *cs) { return cs->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI); @@ -212,6 +221,7 @@ static const struct SysemuCPUOps cris_sysemu_ops = { static const struct TCGCPUOps crisv10_tcg_ops = { .initialize = cris_initialize_crisv10_tcg, + .restore_state_to_opc = cris_restore_state_to_opc, #ifndef CONFIG_USER_ONLY .tlb_fill = cris_cpu_tlb_fill, @@ -222,6 +232,7 @@ static const struct TCGCPUOps crisv10_tcg_ops = { static const struct TCGCPUOps crisv32_tcg_ops = { .initialize = cris_initialize_tcg, + .restore_state_to_opc = cris_restore_state_to_opc, #ifndef CONFIG_USER_ONLY .tlb_fill = cris_cpu_tlb_fill, diff --git a/target/cris/translate.c b/target/cris/translate.c index 73385b0b3c..fbc3fd5865 100644 --- a/target/cris/translate.c +++ b/target/cris/translate.c @@ -3392,9 +3392,3 @@ void cris_initialize_tcg(void) pregnames_v32[i]); } } - -void restore_state_to_opc(CPUCRISState *env, TranslationBlock *tb, - target_ulong *data) -{ - env->pc = data[0]; -}