From patchwork Wed Apr 24 23:31:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 791607 Delivered-To: patch@linaro.org Received: by 2002:a5d:4884:0:b0:346:15ad:a2a with SMTP id g4csp1107526wrq; Wed, 24 Apr 2024 16:36:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV9U2IiQ/LuuMYrJ6VOl/o1ztyNgcJBnivnCKSId2A+BV6SQr19piM0qrXwhzBMW87sYbFXrj5ow7Se+MmDDx8A X-Google-Smtp-Source: AGHT+IFua9xRzAgxZKUenakqWKwZrcj6bgpUx9dIrKmrP+RmydDrKRTdRCYr74eH4L3uqv1U5uaY X-Received: by 2002:a05:620a:28d2:b0:790:9bd7:1a6b with SMTP id l18-20020a05620a28d200b007909bd71a6bmr173479qkp.6.1714001792958; Wed, 24 Apr 2024 16:36:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714001792; cv=none; d=google.com; s=arc-20160816; b=npFses8uhCpl3w84DlH+rcGy3TS5HtNB2LAGfMdcsE/20/ji0+MEYqjF4nKM2jXw+O sXgl1Fef21Hcq7qwj77ot628r5yy8RuKaj6GRvNpouf5GXDftLEUCb+HnXDslD1yRCfX 4KAIFIlAWzuVSzUMXiG3PgZ6I5ykeVPD9OE4FwrmCTlH8GGzZuSjWklbFvYLSERGHqNI OpfzAczpFnE17L6R611uHZXT7zOD9AAIeh7U0MDIIlYBEt/6rR5O0RVtIF0AiA+fuwzC gg+6b5X1XdsusYRYhG07t4ZTuQFtxIyfNKD4mcROlVLjSf469tGtKmjSH3NYlLBmafy0 aNog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=Vkb1QXWH8K0P/RdBZMhJSWyNsEh7cNmhz4uSK4oxloU=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=QJcY4R184Fm7XbSJp4MxOc8yCSmMpFbaP+ckV3CWOFETXqILYPvcDHhmmbisHFGWzO uNr3GFkGr7/eXiPcCeB0DHwTpnvDyE4eOxB7no37bNBLLqxpUteJ6HBqj0XJ8bs+14Ud iMzKm/Edn4dGRz9Xz6BMsrmIPt9RR3TSm3wxaVpSE9Z8GT0g11FeYwijFKotG8eqIzyt TpVJG1QnTHtPgfB0GA0w9CTGDh8njP1bU9rO2y4RRq+uXE45GafoWkzGWRw110GmJxPv ITmMbAyALyiIYjmt8uXzqoAmpLf2qMD6dvD0PK4IQ+hIbolKl4X7BstRbciooAcEeWrg HMlQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N1KX8GXZ; 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 u7-20020a05620a0c4700b007907319a9ffsi9954031qki.732.2024.04.24.16.36.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Apr 2024 16:36:32 -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=N1KX8GXZ; 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 1rzm61-00063D-5D; Wed, 24 Apr 2024 19:32:13 -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 1rzm5p-00060g-GW for qemu-devel@nongnu.org; Wed, 24 Apr 2024 19:32:01 -0400 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rzm5n-0003pf-Pm for qemu-devel@nongnu.org; Wed, 24 Apr 2024 19:32:01 -0400 Received: by mail-pj1-x102d.google.com with SMTP id 98e67ed59e1d1-2a2d248a2e1so1154364a91.0 for ; Wed, 24 Apr 2024 16:31:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714001518; x=1714606318; darn=nongnu.org; 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=Vkb1QXWH8K0P/RdBZMhJSWyNsEh7cNmhz4uSK4oxloU=; b=N1KX8GXZcYsDWXX/p48uQ+T/wxBr5w0Vau1w1+emWoW/ZcUoYjwRgit0bW0DP0BHNL pzwp/1R9BH2aXpFg2JFLawMil3a6n+90TEgqzauMoCVarWupXm1Nx/M9QUcGea+I9A7o EXE1viX5jAZq7Y7MVy4BmJ9er4L2JW4/vZVTPz16tva9a0e9mFwyAdg9DQTX4Pbhb/XX q4qpIFPSRTt3ST0xUCdtEQ40Btjbw/FLfv+5NyAiOomqUt7sUVoRPy1TehjSkBgZT4Bb BCP9uPeBoX9Mjs8GATn93TLMJqCV85+S/vzQJFRqrFSB2Kbx8674SM45tN9w+OoMNMct 61CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714001518; x=1714606318; 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=Vkb1QXWH8K0P/RdBZMhJSWyNsEh7cNmhz4uSK4oxloU=; b=c01iXSLiSl5g9mUraXkKqud4YHvWnTZCTdSC1Bkdl+Hh83cxnEcwrih3lGVlXuhrEa Zk0jMPB+E+KmUOPX5c6dgcWt49xby4G7B0Ik5Jppt/cRrPxckb7GXDKHyNLJvAuCpn/P rHamQGm1zmbCeDdZlUoENADDFtnYDw+gEyC710CGDnGprfrijRVROx/u2oI0l62QayWc TN2EPfEr6OYewgb/+wbdTQENER3bey97poYg3HCC+53nkBc9hTucrv0sVB6K5AiDwU3+ xpdiKuc/gAQnNRUgUZ8NH3M2dBHkH1xW7NKpZEGufyxIxTP6yCQz7QC8u7i/iuviLjYN tLnw== X-Gm-Message-State: AOJu0Yy3Rz04/YqKx6ynFV/r7Vemw94H6ZncCvQ1XZv3xLpu4KWx6IVh zKI5eoZhltXHFqg9Kb0ZVcuDdn2IYDlG39UPmtMVrhpo6ys4p3IPtvQdDJMeyB+6nlk6mcTCPfS S X-Received: by 2002:a17:90b:1d0d:b0:2aa:d88d:d706 with SMTP id on13-20020a17090b1d0d00b002aad88dd706mr1695037pjb.4.1714001518476; Wed, 24 Apr 2024 16:31:58 -0700 (PDT) Received: from stoup.. ([156.19.246.23]) by smtp.gmail.com with ESMTPSA id z24-20020a17090abd9800b002a56b3931dfsm11737859pjr.49.2024.04.24.16.31.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 16:31:58 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 29/33] target/riscv: Use translator_ld* for everything Date: Wed, 24 Apr 2024 16:31:27 -0700 Message-Id: <20240424233131.988727-30-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240424233131.988727-1-richard.henderson@linaro.org> References: <20240424233131.988727-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102d.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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis --- target/riscv/translate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index c999e942e1..2c27fd4ce1 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -20,7 +20,6 @@ #include "qemu/log.h" #include "cpu.h" #include "tcg/tcg-op.h" -#include "exec/cpu_ldst.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" #include "exec/helper-gen.h" @@ -1082,7 +1081,7 @@ static uint32_t opcode_at(DisasContextBase *dcbase, target_ulong pc) CPUState *cpu = ctx->cs; CPURISCVState *env = cpu_env(cpu); - return cpu_ldl_code(env, pc); + return translator_ldl(env, &ctx->base, pc); } /* Include insn module translation function */ @@ -1243,7 +1242,8 @@ static void riscv_tr_translate_insn(DisasContextBase *dcbase, CPUState *cpu) unsigned page_ofs = ctx->base.pc_next & ~TARGET_PAGE_MASK; if (page_ofs > TARGET_PAGE_SIZE - MAX_INSN_LEN) { - uint16_t next_insn = cpu_lduw_code(env, ctx->base.pc_next); + uint16_t next_insn = + translator_lduw(env, &ctx->base, ctx->base.pc_next); int len = insn_len(next_insn); if (!is_same_page(&ctx->base, ctx->base.pc_next + len - 1)) {