From patchwork Fri Apr 5 10:24:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 786227 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:1101:b0:343:f27d:c44e with SMTP id z1csp93216wrw; Fri, 5 Apr 2024 03:27:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXgb2v+rYCGSMM326hWYgH751MaXIMQJTm8eclhwHZmhdJGDaSc0CoVDYlL1+MmMrlbCXzq/YC2FKV6OHBOdIOW X-Google-Smtp-Source: AGHT+IGNfM0FNWYsJJ56UfOK3tfjBeytdqBJRGhye8EDi4s7/FgielsRItgykoIRJcx89/MQbhMD X-Received: by 2002:ae9:f710:0:b0:78d:4a2d:2baa with SMTP id s16-20020ae9f710000000b0078d4a2d2baamr973085qkg.72.1712312866481; Fri, 05 Apr 2024 03:27:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712312866; cv=none; d=google.com; s=arc-20160816; b=eWfMiBZxX2cirOqdnvveHOcEEadO/fe0e1Q5iEIDJiZQgriw5ToOBID4AhIWRDB19e Jp7Huey6bM59yJZzPmuwy1ttW40D8wmUGOttu/Zm96Tu3dAH9jObEghJu+FydnC1/CIP 2DAzeLIidbvYaAmqu5wbBwt/GDP5cQSLO6IubKwV+HrwsB8svZoiRu3pP3r2UuGR4I3O On1zb7QEtVAnIoQrrIp1PySQoK8qdECb6pyqdC05KH1YykJ6Enu7FX/Yz1jsWzCcVfpY XJ8SDr6pa43sl149DRMCpbGYcipdPW3F2u07x4FHJ/LBBW0ZUe+dPo7DA1GQ/QKloX7w wFpA== 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:cc:to :from:dkim-signature; bh=oWAgZQ2Av7FDttaOMf2pMnb78RnsfEKN51tfHvsHtMU=; fh=um37n3oR08jEMPPSS229I5aQ76zCoOurJ5utfPrEC3o=; b=SuP2r7trHNx0bjBS/q5ly0gPtYWC3ovYTKSxC3CyZwDUs9wNyj2SRmiOK1TAilr3KX 0RQjneAOc517dkD67O6oKih/4UeyUULcq6+K9kIJevxP1zmiMVia0v/NIn9ICshrQFts EUPoAhsqlSUQPoGUxea7xWOaYRIrHUqX7r4LhTUC1kZXdelGVqbO2mbqIoJ8ZDSPrvS6 3ATrCYb/QOdUzA+1Wpxuej6Msw/LrJOU2DQKoFZ/Z6JpmB2gG9mczduU52WjVS58ggCh p5YW7ea6eqf73H3SyhsBiiFIvspq50m+spkDlNNf6x7/ziHXs0mVcHzS+UD2J2OqhU6E 031w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Jh96cOya; 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 y3-20020a05620a44c300b0078d4de3f8a7si480284qkp.149.2024.04.05.03.27.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Apr 2024 03:27:46 -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=Jh96cOya; 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 1rsgm4-0006Wf-PM; Fri, 05 Apr 2024 06:26:21 -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 1rsglT-0006BF-AJ for qemu-devel@nongnu.org; Fri, 05 Apr 2024 06:25:43 -0400 Received: from mail-oa1-x29.google.com ([2001:4860:4864:20::29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rsglQ-0004pd-Hr for qemu-devel@nongnu.org; Fri, 05 Apr 2024 06:25:41 -0400 Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-22ed72b0082so188991fac.3 for ; Fri, 05 Apr 2024 03:25:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712312739; x=1712917539; darn=nongnu.org; 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=oWAgZQ2Av7FDttaOMf2pMnb78RnsfEKN51tfHvsHtMU=; b=Jh96cOyaUYr9+888YUF9hEhiGr0hOwqr5XxYvDfBzFoqTu2NFM4EPmgxXS2WUOadIJ MHDW6n+6G0G9gCoRDr/x20XaoSlhk9uJYUili1gidNl2wIAl68M4CXTOaLak4S9WDwCd QX/B+GkS4UP2fLd/6ilqc+LWDYcYXA0Zx7Nu02/A+nMsbtpkL/jTTRLaLZM5cVdPZ6NI Tk2dGXvSgYFeiRMUFf/ur2SHQJ0Uj36fld/gqbQyqx+CheYKKXhli0NP1f3tsNwMjWes fYLhLCfql1+ESW9co331Ojz5g2lnAnWXLSCg+yFn+5tnKMNe7wYgc1n7EQr6lF1mB/kn H7CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712312739; x=1712917539; 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=oWAgZQ2Av7FDttaOMf2pMnb78RnsfEKN51tfHvsHtMU=; b=KtLG4gVDpfE8pLzMUYkmPa2r392wqxsgIoqHStyKgQhgdre8vNeYb8U2WxtJ214N1Y wlg21SGNuhfqJOdH55mu/mIPujNrFt/Py/7HCdukljTywK+GnVt4wcWf2QpuKv0MtFub iS1p2dbwQOvHvVzsSE+4NxDlQBO3/+EF6pCjd43krJ4fbDxoGIOV5UV+F1dJywiurxsF qZzeV0hhcP+vXydwxxHvap50xBSph29krZ15y2EW/DR3uADfYswuZkZLAix9l8gpMWDZ P8wlJYS7ey6/a4uicrWz+ApZntDqC2Aj+H4MDUqShJO0yVCREoZBGcfqX4hy0fou40+V sKjw== X-Gm-Message-State: AOJu0YzeCEjRjIYcFAM1461PUFwsnok/GwiYWvv/xwkCbw7Vik8vV1h+ sPcl1tguR0XIgFsDi0l5oFc3XMlKa9ElYV9lbKj6yPhxXureHL0R+17FWcRoLy4bgevfiRkySDY s X-Received: by 2002:a05:6870:5b07:b0:221:8a03:6de7 with SMTP id ds7-20020a0568705b0700b002218a036de7mr937273oab.32.1712312739483; Fri, 05 Apr 2024 03:25:39 -0700 (PDT) Received: from stoup.. (098-147-007-212.res.spectrum.com. [98.147.7.212]) by smtp.gmail.com with ESMTPSA id h10-20020a63f90a000000b005e438fe702dsm1104304pgi.65.2024.04.05.03.25.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 03:25:39 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org Subject: [PATCH 29/32] target/riscv: Use translator_ld* for everything Date: Fri, 5 Apr 2024 00:24:56 -1000 Message-Id: <20240405102459.462551-30-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240405102459.462551-1-richard.henderson@linaro.org> References: <20240405102459.462551-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2001:4860:4864:20::29; envelope-from=richard.henderson@linaro.org; helo=mail-oa1-x29.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 Cc: qemu-riscv@nongnu.org Signed-off-by: Richard Henderson --- 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 9fd1ac1d60..9a4a68b955 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" @@ -1083,7 +1082,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 */ @@ -1244,7 +1243,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)) {