From patchwork Wed Oct 26 02:11:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 618796 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp117578pvb; Tue, 25 Oct 2022 19:30:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4EqKZgYSQOlwjbyhbYuKJ7Elekehxltxd+ghiNkcAqEU4GutOBD76d8QdpDR3ZVxloYNQX X-Received: by 2002:ac8:5dc6:0:b0:39c:de18:b4cd with SMTP id e6-20020ac85dc6000000b0039cde18b4cdmr34605762qtx.145.1666751418231; Tue, 25 Oct 2022 19:30:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666751418; cv=none; d=google.com; s=arc-20160816; b=HDpYAqX/3gzXjL2CqSiXq22SuOL+e1xu/WJh4JGjxM/4QZP6WhsZSrMwYQ5a63tB2W zSUNGnpRiA/ui0X7tf/xQrTM7Jk4UkVxH7AlNivQyC5GZ+sEOUHxWEJ9uRAxno54V8N0 3IjQIrb6BpccYc/W1Wan804H9UrSTgkweGGGkK6yLOghHO3oeV3wCOB9pUEdleNQL0Pt MP5Dc9b2/M5wl6HUMbMIOC9fVIPyDtEIJ9pvx3rYzpLAOdeVVTJGp7w9WCLKO6wfzKRw To0WkbiLxNjLis5e6a13xVM1Hg3Yp9olCYa/HQ+h46VHLlaeJdUy6LvPvtVU+6VrA0zT HU1w== 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=nWBF5zhKRiXyn9OVB8QHNYB94/Bgwx0Q3fh3y9juC7M=; b=QBlKc+aLMj1qPKOkPIn/5iiom1n2lLPgQAlnxBj7ARElXbhBRFxnARSg1vwicFhhl/ 9jjJXNsSi069uw7kBe7VgIYUdH1r6jFgGjyCYUV98pFR0C5uiW/ZYcMIaYKcRiUXTgNe VnoeisfDmVB5pA2xbprHQy6+Gi2q8TSmmF8yt+D3R7jV3/WBq5lx0P+vpIfdmtus6Lw7 dzh1ZvcPIFfOubYTg76lObkb+zfLcY4WvgndWXehZC6oHid53u7eDBhNOxiGYontsbg9 1H599bfr085XEwZwAdbEL7msmRm70tDE4uN89xyeBY49y6wQ8LZO8/dVt09Y+3WtwaBO e0uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UeBSWv3O; 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 ew3-20020a05622a514300b00342f6523c39si2708809qtb.369.2022.10.25.19.30.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Oct 2022 19:30:18 -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=UeBSWv3O; 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 1onVul-0005O5-5b; Tue, 25 Oct 2022 22:13:07 -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 1onVuj-0005NS-On for qemu-devel@nongnu.org; Tue, 25 Oct 2022 22:13:05 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onVui-0001Ja-7v for qemu-devel@nongnu.org; Tue, 25 Oct 2022 22:13:05 -0400 Received: by mail-pl1-x634.google.com with SMTP id u6so12668124plq.12 for ; Tue, 25 Oct 2022 19:13:03 -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=nWBF5zhKRiXyn9OVB8QHNYB94/Bgwx0Q3fh3y9juC7M=; b=UeBSWv3ObyL4/hrShsrQTQ6FM/f1u9NltLcVFD5ODfWmBS6pYl5hWKftiPGj0JR2t0 5uMlbmNptmD70zGeLN8BZR/nMS6KYVq5mc18yiPVHI+/+npgQVv4jOAOBuAwZNuKJ0cZ M6fJr1xqTtIiis0SQdrXQpkxLITgr6KGhLD00Nq2s9mEZJf83vWB0fhuTt/KePPuKS7E rhS8ElWGS9/49u3Ks8sCpEITUo3LtXEAfp21M+F2nkofUlx62yFvcjtrA8H/T+WdXo5g EF7zY+PVIUG3FKnN7nx7POiBymyIaAgtSlet47D57IqdicZu+dBxQh8y1Hp1eV4z+4hA Tr7g== 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=nWBF5zhKRiXyn9OVB8QHNYB94/Bgwx0Q3fh3y9juC7M=; b=odnapIZIn7+Hv3mxuWA/9GolRTPs0NMaNVVvSry2rPVFvQs87+6PXNpTVWUwIPrFXr 9L98xFUayfTCZvpq/Icy7+7Mg4r81uLhcde6v8/l+ofVdk+/USA3EFW9kNKGwltGuj4Q tNFN7gdbUEjGxJrqII7//cWpMmm1Up5JPFaeXZqa4/0I7pqKR9V+W1/eKDfWCMnPqbj8 Nx+zuCbENzxbu3uhch+AmPVm4femIqfA9OUsrUUPZvFcg8HMd1SKwYcuZIQNz+P4jxjn eaFZbYREVSafIqPvrqEb0B/dbG0oZoVr0UsEq8ryAFBTtn6qnsHBTrYaqnWjtWRGDwQ8 pC0w== X-Gm-Message-State: ACrzQf2NKEo6ceBNnssWYD3YP99RNeljznlP2LesaqvR0wXwF97G10L6 CaDgrXdDWTX9ka3rGsW8otqIarEIvVSOaoyo X-Received: by 2002:a17:90b:1643:b0:20c:c7c7:d598 with SMTP id il3-20020a17090b164300b0020cc7c7d598mr1505017pjb.97.1666750382948; Tue, 25 Oct 2022 19:13:02 -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.13.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Oct 2022 19:13:02 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 36/47] target/mips: Convert to tcg_ops restore_state_to_opc Date: Wed, 26 Oct 2022 12:11:05 +1000 Message-Id: <20221026021116.1988449-37-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::634; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x634.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/mips/tcg/tcg-internal.h | 3 +++ target/mips/cpu.c | 1 + target/mips/tcg/translate.c | 8 ++++++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/target/mips/tcg/tcg-internal.h b/target/mips/tcg/tcg-internal.h index 1d27fa2ff9..aef032c48d 100644 --- a/target/mips/tcg/tcg-internal.h +++ b/target/mips/tcg/tcg-internal.h @@ -21,6 +21,9 @@ void mips_cpu_synchronize_from_tb(CPUState *cs, const TranslationBlock *tb); G_NORETURN void mips_cpu_do_unaligned_access(CPUState *cpu, vaddr addr, MMUAccessType access_type, int mmu_idx, uintptr_t retaddr); +void mips_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data); const char *mips_exception_name(int32_t exception); diff --git a/target/mips/cpu.c b/target/mips/cpu.c index da58eb8892..e997c1b9cb 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -538,6 +538,7 @@ static const struct SysemuCPUOps mips_sysemu_ops = { static const struct TCGCPUOps mips_tcg_ops = { .initialize = mips_tcg_init, .synchronize_from_tb = mips_cpu_synchronize_from_tb, + .restore_state_to_opc = mips_restore_state_to_opc, #if !defined(CONFIG_USER_ONLY) .tlb_fill = mips_cpu_tlb_fill, diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c index c3f92ea652..2f2d707a12 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -16229,9 +16229,13 @@ void mips_tcg_init(void) } } -void restore_state_to_opc(CPUMIPSState *env, TranslationBlock *tb, - target_ulong *data) +void mips_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) { + MIPSCPU *cpu = MIPS_CPU(cs); + CPUMIPSState *env = &cpu->env; + env->active_tc.PC = data[0]; env->hflags &= ~MIPS_HFLAG_BMASK; env->hflags |= data[1];