From patchwork Mon Oct 24 13:24:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 617871 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2738654pvb; Mon, 24 Oct 2022 06:57:41 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Is3vkhxnMDQ81ACpOs0JRcKlshD4R0KCoVTVANIS8PcXXezd6zV1x/zOTWk6e/QDhlL0V X-Received: by 2002:a05:620a:44cd:b0:6ce:d887:d448 with SMTP id y13-20020a05620a44cd00b006ced887d448mr23222660qkp.31.1666619861161; Mon, 24 Oct 2022 06:57:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666619861; cv=none; d=google.com; s=arc-20160816; b=fF1nud2kpwiMLqdEKBbb7+5wZ0VZksGop03OTfSdhU/JYjTVvy6CDim6AQqRIQTGoe avkvK3ZOrvul36q/s1EW/XVr+XUgbv12j7yuiKz1ZYMS5MrgfHnQn2KDJHZWH4pNX9Hu Pv8zJeXNfMzEjX43TizIXhQhH914w8UzmYDQMlLeh0LQyxVWfSrHUI2pGaHcZDxNpknC NTM1IhwzNhaq8eWrKSAQ5bubJaokhHHDU8guP6PTdHjk4//B6yHH+E/wPAljrWia10xv qYAc0XU6liOyWt1WkBALg+oRWnf+0JUakxRR/8v740XcyZHBb1HC4oG1AFppiQxo1HII sWyg== 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=Bd4nOs5cndwUPUkE6wb4N+9NYguPemV5ztELXhebcaM=; b=b6JHznQthpHlfgeahgRo6PBM7ugWNy4041EbnMT3xf7uTdpS8TOVm1j9rrcF+Qk7Yh lFAEiRtID/iDcYTsUEUNGAyqc+kdogumCWCGjSkggFZ9uHb34CPY6/7WARzqdUSLj8fT wzN8q5fF4BBwXxbtlZz4M4mFHhRP6YMi4jQLU7kVdB7R4MCID5gaJx6eWpWTP5FVVsZ8 aaDTOuwWhiE+toFL5kbqctx5wgdNfpsRXVcVZPAX8YEeKr2iD2NgUUrSxk+PVn2smYx6 OZUbSfJVzxdMiRkCy3bZd8nN7Os27o1Vhi9XSHf7Qur+jU4LnwWcc4jTSHXt6yPsxbf3 ME2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bI54Be1e; 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 bl40-20020a05620a1aa800b006ec59e188e2si17485069qkb.554.2022.10.24.06.57.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Oct 2022 06:57:41 -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=bI54Be1e; 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 1omxTG-0003cJ-0S; Mon, 24 Oct 2022 09:26:26 -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 1omxSu-0003Rn-UL for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:06 -0400 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxSt-0003s1-E1 for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:04 -0400 Received: by mail-pg1-x52a.google.com with SMTP id f9so4280778pgj.2 for ; Mon, 24 Oct 2022 06:26:02 -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=Bd4nOs5cndwUPUkE6wb4N+9NYguPemV5ztELXhebcaM=; b=bI54Be1eClS5XTixCR8MX4uST3sWSPzfIjIOTDnQ1x4rA+1MeGIw3N8VPjAdBBA9By Xv/C0+mxsclptUEw7JHttAcxsA5/jXccuETOJ3NUSg0KVR/tIoHqV8w50MvkIy/lJohh 1TXLowBqtH6FEV/hiIMyrsU/ZNxuOAGpro9uVasgMfSwr77pdrbrp7+8oOlxtKr/ZKeG nQnZ7b7+Q3JkMKIsIZ5YuzppyK4CoRSoANpqZMFsNBROpMWCy2/tB+O1z3OXG4XO6lmY +cf2OmryLzb1/zVeAz5dLk1uETkKrKFyljuwguThnSKuoktPHAr/47HgpEwWJ6uPq8lJ mZaQ== 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=Bd4nOs5cndwUPUkE6wb4N+9NYguPemV5ztELXhebcaM=; b=5nKxuSMirNwzG9R4/Dug2F7aGq6emUsgzEDlmiQmFGjBLkSu8ZPjxlVEyd7ULw4BMD Dj3NZ7XIiKoJPj0BFyT/WSAWBy7w1fJ32DrpP6Ldef3IdVvtehOfOuzu8iFTJJRji4Xa EtDkECrPHkpEuxUpqpJg9FHpcCLmxtNoni8Ui3Zt2da/urf4WLUeKkHZDXd8UILB1Hd2 NMWJLd0ekZDgyYXx6u7P7wPcRM0CCWZcRucmZcvnMverXxSGynLfKuR+nVg+lvvmy5yC 8vMEi62D63nsu5Ai4HMWYqoP6WaVoNSm2mgChbTXRxkHylbK8CIgNxgWSxeArpj6E0SI 8/3w== X-Gm-Message-State: ACrzQf3TDFUUiUgYtGLJVkF9HUcgAvOsS6R+mce8fKiZ2IpllqdLGZGe vOpHmzT/2tUFP7cG4m0TOjaXUiUn4+Iaeg== X-Received: by 2002:a05:6a00:114c:b0:528:2c7a:630e with SMTP id b12-20020a056a00114c00b005282c7a630emr33132032pfm.86.1666617962560; Mon, 24 Oct 2022 06:26:02 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.26.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:26:02 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 21/29] target/tricore: Convert to tcg_ops restore_state_to_opc Date: Mon, 24 Oct 2022 23:24:51 +1000 Message-Id: <20221024132459.3229709-23-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::52a; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52a.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/tricore/cpu.c | 11 +++++++++++ target/tricore/translate.c | 6 ------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c index ab7a1e3a6d..2c54a2825f 100644 --- a/target/tricore/cpu.c +++ b/target/tricore/cpu.c @@ -58,6 +58,16 @@ static void tricore_cpu_synchronize_from_tb(CPUState *cs, env->PC = tb_pc(tb); } +static void tricore_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) +{ + TriCoreCPU *cpu = TRICORE_CPU(cs); + CPUTriCoreState *env = &cpu->env; + + env->PC = data[0]; +} + static void tricore_cpu_reset(DeviceState *dev) { CPUState *s = CPU(dev); @@ -161,6 +171,7 @@ static const struct SysemuCPUOps tricore_sysemu_ops = { static const struct TCGCPUOps tricore_tcg_ops = { .initialize = tricore_tcg_init, .synchronize_from_tb = tricore_cpu_synchronize_from_tb, + .restore_state_to_opc = tricore_restore_state_to_opc, .tlb_fill = tricore_cpu_tlb_fill, }; diff --git a/target/tricore/translate.c b/target/tricore/translate.c index a0558ead71..c5b7bfbf20 100644 --- a/target/tricore/translate.c +++ b/target/tricore/translate.c @@ -8886,12 +8886,6 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_insns, &tricore_tr_ops, &ctx.base); } -void -restore_state_to_opc(CPUTriCoreState *env, TranslationBlock *tb, - target_ulong *data) -{ - env->PC = data[0]; -} /* * * Initialization