From patchwork Wed Oct 26 02:10:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 618760 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp112803pvb; Tue, 25 Oct 2022 19:18:34 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6C3UGp3v8P4ivmF7hsRG1AktG2IupdQ+VR4K8ppmF2rHWCJD0GzRfypLJjf36acMaXTdTL X-Received: by 2002:a05:620a:31a5:b0:6ee:b0c2:f54 with SMTP id bi37-20020a05620a31a500b006eeb0c20f54mr29361177qkb.69.1666750714819; Tue, 25 Oct 2022 19:18:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666750714; cv=none; d=google.com; s=arc-20160816; b=zNaWSCzW9D2UX1J6ZLcx/7j7ifYasKSeHx4GxEpxP/RfBIl70yTHUVc/TVGJdRI27V WXW9kjeuk5I0pXf/Jm8cuFIR8qH+rqnQh9TsQ1ZfhafgfQHty+jayj8rNVHgiFW6W6ZA tXXrEYe5hpuX2Ur/E9MHiMt9kPkwOwW+8m7De79D+/da5iTEtCge/yGki0Q/LSXXXojD yWu4Y439EF2HXe2PI+VrNQIDAi6hAz5a/d6lajHK6HU/7sgQhHmFczOgsVu94ofl2vMI Tmx2FOJFXq6mxL8HpxNJcuEzDkeKnsryJ+YBENMQG8pYgZLJqiyqhbW4FJDmbSQSQKKW bXuA== 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=4pnG9nOOACtBusrxYRYQuNOIosZyxdgNQde/unc31MM=; b=EOHz2LyFKaSYTRmW1mPL+shQl7ePcCzuFHV+C5bhGuw3DBLnzEWKt5unEmoC8E7Ia1 YjpEGUqp+f4ACgEjeCZZUyYmjV42hjRf9UQBQm0pLOAqFzCbva8ezmzaqaIjw2pdkPD0 tlbliLy3nMreZjqa5dJWotE/pZDAIsgCZOxGd55dNy0WwcibHR+MWUNNh+kKZxZJcLKb 3sOmnkdgVW2bvxwUXS+mnVmuJ42JQ9W0w9io4AmnMb2ab1N20qomMSkCpAoU1O4AOeia RniGu3gG8hQdPvwEafh1hdSEV+uwD+YACzvC25A1KRnB1hNkN1bQgtnKa+AZMQYWwAEX +S7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=brrLRU6S; 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 c9-20020a37e109000000b006bb15b4bb57si2646865qkm.64.2022.10.25.19.18.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Oct 2022 19:18:34 -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=brrLRU6S; 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 1onVuT-0005Jb-1E; Tue, 25 Oct 2022 22:12:49 -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 1onVuR-0005JJ-Ca for qemu-devel@nongnu.org; Tue, 25 Oct 2022 22:12:47 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onVuP-0001H5-OD for qemu-devel@nongnu.org; Tue, 25 Oct 2022 22:12:47 -0400 Received: by mail-pf1-x42f.google.com with SMTP id b29so9472464pfp.13 for ; Tue, 25 Oct 2022 19:12:45 -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=4pnG9nOOACtBusrxYRYQuNOIosZyxdgNQde/unc31MM=; b=brrLRU6SxVkIXxiMhygDlEsebZ26z5l0UDjLL8oKrsqmJVQA61YjQ4v85bj+YoGOh2 NlFVp2XdvmFk9ZDivGQBx46ocNeFvGR92rjW2inUdOl0WpxoFRcBiKYcIXUmS/h68Nlx lNuGTuwHFDEJAJ8mFd4eejuPKE1WgHs9R90lXWeuWjjIx3cL04Zc7qzyBk1ltM7CIsbn kf/a1qcK5A3wlHroZVXapnRftjT7RBxF5VJXQk8MLKR7oiXLk8JZoSs/N6DFgnwaerrF r+wJP2pFf04E6hxZ5ZxF0Y3NjpdCdD4JYpys65JHXPZXr/NuDWyYPoR35uIuzqUp2wiV 8icg== 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=4pnG9nOOACtBusrxYRYQuNOIosZyxdgNQde/unc31MM=; b=gqYXPmjspUUGFGdrnK9ZzI5PkEiMduSlKYwJQUOzuQ2p18Qjou0akWMgujUwAMqOt6 wRgpWvfXfJWjwyn+dHOJljlUiqxRH6eJuu/pSYpZJA07KmEBqrMWEUQ95CBJRf3ksuaL Ll/qlLC9Alp99+8DZuNRy9qAHD4K5YtryJNw+9c0f4IFmAwXvUMuHP4tEFkhRNA/shpJ rEVV2V8paZT4LRq/TlrIpj4Q13KBvG8wH1m6cWP5SBSyq4lEXqb069yJDBTlErpt/R74 u1JXDpwCL2wf40IL//943Q5pm+/oJGnGpBR7m3mVz1F0vTAw5TbfBbzvt1TdJjdFDeTg Ie2Q== X-Gm-Message-State: ACrzQf1smYIFUgQdR6kXZAfxoezcyJNgmnrGkZV3oTnFmI7Orf0st4XI fwm4IIA0N2olf+CLZdaqxjiZuDFYXqSY6ssF X-Received: by 2002:a65:6849:0:b0:461:8779:2452 with SMTP id q9-20020a656849000000b0046187792452mr34181323pgt.383.1666750364356; Tue, 25 Oct 2022 19:12:44 -0700 (PDT) Received: from stoup.hotspotlogin.services ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id o29-20020a635d5d000000b0043c9da02729sm1897833pgm.6.2022.10.25.19.12.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Oct 2022 19:12:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 29/47] target/cris: Convert to tcg_ops restore_state_to_opc Date: Wed, 26 Oct 2022 12:10:58 +1000 Message-Id: <20221026021116.1988449-30-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::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42f.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/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]; -}