From patchwork Wed Oct 26 02:11:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 618780 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp115457pvb; Tue, 25 Oct 2022 19:24:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Y+ANCbHIZnsq3JfODBK5RtdDXlt7+i8dOTqL4dsF46yoRV4hjdQP0fnqVVO15b2MZdjxr X-Received: by 2002:a05:620a:1aaa:b0:6ee:95d0:dd8a with SMTP id bl42-20020a05620a1aaa00b006ee95d0dd8amr28794925qkb.279.1666751093259; Tue, 25 Oct 2022 19:24:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666751093; cv=none; d=google.com; s=arc-20160816; b=KNRHwuAMuXq2G4hCezt+hQS02jaDOmZIxQeeDf3WxA0wO0306dCSc4WTPD0nykWQcd 7Gn0dJ1wA+x6SCjh6tS11wWzuS9daDUsDZlTXWveht8y/hQfsDYt88OUQUkc/+qCrdg1 /sLwraSqQP4A6BivKVM2qow2UD2f5o9F1w/spKOqp8dpSHQN3ab4eIwfvYOLCU8oZlf4 cGfe8QYBNojXQxfvWRZukYO6Rzj3v96ODj+yHAY2TfFe3M0TcdP6w16HlweRz8EIaW+D xSbdgv+BPufhc0BNokjOjAn50yVuTcWRD0a2W7IIljescQkdi917MY3p8xF/x8nzML00 ocbQ== 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=VKbB7K0HwBJ/XftUm9+xrFi2M3poh8MvJJd+df6GbYo=; b=k5hgU9IzstwB8FNn+odZ2O4hW9x07gfiqEEPJZVmvjkkWxaTiFeKKuKbi1xR4WVJEd qHlMjTITQP+i1KuuKgr9RvdrCZM7HC6ZfaWASIlXgHvej/dgJqn2lqMDmt/oN9K3LHwL oJL3noM9mU1PB1L4GhRliH8LYkI0HfyWN7HoB+bCYGtlTt/y3prdW3gO79Nz5bHz0cXc /i+KAgCEmiy++ZkUDmV0teb2MofKnia1i/OzKWNfg3iT8GMDsH/+z4/n1+8yBbm0GHRC G3o3s9746VGEA7Q/gZPyVvPIVWtTBud6JrBKA5VgErilderDySPbQnZ9Zpq//y1oSiQv l3bA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ghebxw3a; 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 im12-20020a056214246c00b004bb68c1cf38si423125qvb.548.2022.10.25.19.24.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Oct 2022 19:24:53 -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=ghebxw3a; 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 1onVy1-0007bu-Nu; Tue, 25 Oct 2022 22:16:31 -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 1onVxx-0007b2-N2 for qemu-devel@nongnu.org; Tue, 25 Oct 2022 22:16:25 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onVxw-0001sV-4w for qemu-devel@nongnu.org; Tue, 25 Oct 2022 22:16:25 -0400 Received: by mail-pl1-x62b.google.com with SMTP id 4so6797537pli.0 for ; Tue, 25 Oct 2022 19:16:23 -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=VKbB7K0HwBJ/XftUm9+xrFi2M3poh8MvJJd+df6GbYo=; b=ghebxw3aMF/Vj2Mx5yKpFoADo/5jee7aQT9s68CWW2rWxjzbFGUc/1YnIfc083aGiV 7DUVnyR+q5lPoBW9VIYDVynNmEGnot9qQaHabcKz+fnQCeBGgSGv0oWwbdqK0eTLXYUq FlbdYBWEzL8mwZLEas232TFwvNbrBx/rbc5y27ZVZbQCH8eLg6N2BHgJ0J40A2yulE52 gdgMqrRKJJlNvtsc7xbjKfauV54bZLjupYcXHrtSCCDOTKaIq60yKgC5V1YmKizskyvY AwOB7pbkhLb6QDWAtJ3hFvwq1oMbD+IBsA39dSIKoTnrN26bDqjnqqQ0nGa71BjyX3ww Q84g== 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=VKbB7K0HwBJ/XftUm9+xrFi2M3poh8MvJJd+df6GbYo=; b=KZP0nCxRBSqq+1y/8DL5z3w8vBd/LeiOwSTgcp+O5UcW2M2aYPnYMIwMk1pheWs6tx sSTJQ4e6+sl2MFYh3cmRswzZK9jR39vZAGxwLXt+Wk5NomQoJqiVd7WMcf7uu2NN5e/2 lZ8DHydVqjPodZC1QMrJ5D7gFebiqBCmgeskR8YeWB4IkuAM48o4GFU2+1uj2CXu1Lgb FQF+YrK+Jjxu+nJs/Dg3suE+GgNVYCVnE8fm2I+O2BiDbROqLvQqt4G2j8QB9ZzPpqee pApqDF8J062U4o8KxdCpYFoIokk0w0As75bxGo6uf7zzVeAAPX7kSvzY/JDcO0ElzC8U 9/sA== X-Gm-Message-State: ACrzQf2KwNgJod2/wdnTKbBxsnQGU/9hlkzSPXmo7baMuaQwvyQF6ab7 72BBsNGgO+ak/JKGF9BDvM6vFnPIYF3QGZfK X-Received: by 2002:a17:90a:e7c4:b0:20d:451f:a988 with SMTP id kb4-20020a17090ae7c400b0020d451fa988mr1477442pjb.57.1666750582718; Tue, 25 Oct 2022 19:16:22 -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.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Oct 2022 19:16:22 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 42/47] target/s390x: Convert to tcg_ops restore_state_to_opc Date: Wed, 26 Oct 2022 12:11:11 +1000 Message-Id: <20221026021116.1988449-43-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::62b; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62b.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/s390x/s390x-internal.h | 4 +++- target/s390x/cpu.c | 1 + target/s390x/tcg/translate.c | 7 +++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/target/s390x/s390x-internal.h b/target/s390x/s390x-internal.h index b5ae0ae364..5d4361d35b 100644 --- a/target/s390x/s390x-internal.h +++ b/target/s390x/s390x-internal.h @@ -398,7 +398,9 @@ void handle_diag_308(CPUS390XState *env, uint64_t r1, uint64_t r3, /* translate.c */ void s390x_translate_init(void); - +void s390x_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data); /* sigp.c */ int handle_sigp(CPUS390XState *env, uint8_t order, uint64_t r1, uint64_t r3); diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index df00040e95..96562c516d 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -272,6 +272,7 @@ static void s390_cpu_reset_full(DeviceState *dev) static const struct TCGCPUOps s390_tcg_ops = { .initialize = s390x_translate_init, + .restore_state_to_opc = s390x_restore_state_to_opc, #ifdef CONFIG_USER_ONLY .record_sigsegv = s390_cpu_record_sigsegv, diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index 1d2dddab1c..5798928473 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -6691,9 +6691,12 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_insns, translator_loop(cs, tb, max_insns, pc, host_pc, &s390x_tr_ops, &dc.base); } -void restore_state_to_opc(CPUS390XState *env, TranslationBlock *tb, - target_ulong *data) +void s390x_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) { + S390CPU *cpu = S390_CPU(cs); + CPUS390XState *env = &cpu->env; int cc_op = data[1]; env->psw.addr = data[0];