From patchwork Tue May 2 16:08:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 678428 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp596145wrs; Tue, 2 May 2023 09:11:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7EkZsO9GmHOrZocrgJ/srFRRV6UOdDNYtzLwMpfUmBPPUfkdSPIyuknVK/u5lDmtzlysjV X-Received: by 2002:a05:6214:1c45:b0:616:54c7:316a with SMTP id if5-20020a0562141c4500b0061654c7316amr6313886qvb.8.1683043884746; Tue, 02 May 2023 09:11:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683043884; cv=none; d=google.com; s=arc-20160816; b=P5+vMDP/jOCIhc9CX/0sMCRqf0+47W84Z6ahgkS0POiP8hm7SP9rAtQ5gVc3KfKSx9 f1/ZD8YftPRjEFxaKsjyGPolaNTgCywm2WpuvJmYjcN8Lukkmte+zbYFy1qkhne1E6gL bLCGTesX1KUFQYLNK/vckdI3eoCRfmSgVzxeCXF9itQXUvxWTNbxtOAoPXrobD6q91NN 5qyXWWPUtkl11GZ68R2J2jQBmT50x/M9igDbueynC+0u4U9zf4RulczvHK7SsXL+gD3/ w40GgZdDFgbjQhoZigHK41MApHyRXtUySfl6rJ0jZ/RETIcTVxMI5gn51ggdqhAFSEZy T7bQ== 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=ZCshE9IafXKgT2vV4eAlemBF7e2BqlY02AfvfYW7tmM=; b=vLKle0K8mTwlhUysSv2XXEL8MsRSxMh9VkPVV2E40GFNY10UU+Rr0lUYoDT11j410x Or76nwHDt7ZaUxbcocGBZP5HngQq4JE20JkLqu+mGl7Hpar0PhpedFTstmEoJyUky5A0 JoHU4c1RCzk80tbagySmDR32Abr3OLJMYAmU5IS7Lx7QqeTSaehA9I4ULdir4aJvbEkX H5FpVH13mxDadKYK9TuamVJq3Tk1ulLDwlrP1hZJumbK98S2QTWcYUO7t4iFp81KjYzF SvU0bBOK5ZtJzRuJ/gu2boSY69gEzdjT0G99qebGaQiZaUPI6V+h9zV+GczMJSCet/kd b/7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="CT/VUoNq"; 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 s40-20020a05622a1aa800b003ef5b5c070esi16102643qtc.237.2023.05.02.09.11.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 May 2023 09:11:24 -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="CT/VUoNq"; 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 1ptsZ3-0002u9-HD; Tue, 02 May 2023 12:09:17 -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 1ptsYr-0002ow-Pn for qemu-devel@nongnu.org; Tue, 02 May 2023 12:09:07 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ptsYn-0000lJ-JM for qemu-devel@nongnu.org; Tue, 02 May 2023 12:09:05 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-30639daee76so605356f8f.1 for ; Tue, 02 May 2023 09:08:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683043737; x=1685635737; 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=ZCshE9IafXKgT2vV4eAlemBF7e2BqlY02AfvfYW7tmM=; b=CT/VUoNq1F9GVkXN0bN4HQIBPxrRwjbbgkqSpCxXny61zy03jgsJM0sUfsVsvlwaiT iqqXQGW/oIN0pqOUogKy/wLfFOmidEBzBzPLyMz+0vLkVXj0pBq2RFP+nZS71c1brtaB rczH8ZmajREHAsGrKSGy/dVy8T0WfwS3XbXAyOQWclMn8jWTzEKMdYcpO56v3pBAqIzm ha0gKLZWRhhXrxanvr3XlyIhiEgflVSCcurTY+4/RuFvRpAqwZzikmwGHIiwVcx6lr3I ub6sAhGRxPQmcPoqV/XHcNuR/KCghbEIqF6vrldb+d/arblx5PIcnspklN5G8EhfQ9rM N4IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683043737; x=1685635737; 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=ZCshE9IafXKgT2vV4eAlemBF7e2BqlY02AfvfYW7tmM=; b=Sk3RVZFXKiajE1jBOGgJktc9TPOe+c6+X2yXA1wRTw2whTmsaBEAqYd94AC46BUe58 AmndMSXWcF0tFGimcBpG1gA/mS08zfRjqm/RiIQgVU6Y2CQO01esNiGShmKQ2/JdT4CO ONzq/mmZ4rDysQr9UjtcmS9c5bYqgYR762HhrflLJ0PjZTxJ4HdhZHGVtl177yghV+o4 GxXHSeHt657pK5Y19i4DSTiI+VTa5ObVYMVFMnvhK/BCwNuIuUeOdz3h7Put/JZd6XaI QSf8k16vo1pvsxNhCA6EgjAYp4hKOjq2NO+pzPBV7+2ySoSrer+ioWub0sLTuWwTy5dT RWTA== X-Gm-Message-State: AC+VfDzsHXdl6X1fVBdxSllR35zoM2nwITpf41K/OuPNGr6M5TPL29RL HwcmOPC42lLIo5HoGHTe2vwgaylxb8X64nKum0M81Q== X-Received: by 2002:a5d:6d47:0:b0:306:339b:684 with SMTP id k7-20020a5d6d47000000b00306339b0684mr3311452wri.65.1683043737406; Tue, 02 May 2023 09:08:57 -0700 (PDT) Received: from stoup.Home ([2a02:c7c:74db:8d00:ad29:f02c:48a2:269c]) by smtp.gmail.com with ESMTPSA id v16-20020a05600c471000b003ede3f5c81fsm39918471wmo.41.2023.05.02.09.08.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 09:08:57 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: philmd@linaro.org, jiaxun.yang@flygoat.com, crwulff@gmail.com, marex@denx.de, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk Subject: [PATCH 14/16] target/sparc: Use cpu_ld*_code_mmu Date: Tue, 2 May 2023 17:08:44 +0100 Message-Id: <20230502160846.1289975-15-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230502160846.1289975-1-richard.henderson@linaro.org> References: <20230502160846.1289975-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=richard.henderson@linaro.org; helo=mail-wr1-x434.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, T_SCC_BODY_TEXT_LINE=-0.01 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 This passes on the memop as given as argument to helper_ld_asi to the ultimate load primitive. Signed-off-by: Richard Henderson Reviewed-by: Mark Cave-Ayland --- target/sparc/ldst_helper.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c index a53580d9e4..7972d56a72 100644 --- a/target/sparc/ldst_helper.c +++ b/target/sparc/ldst_helper.c @@ -593,6 +593,7 @@ uint64_t helper_ld_asi(CPUSPARCState *env, target_ulong addr, #if defined(DEBUG_MXCC) || defined(DEBUG_ASI) uint32_t last_addr = addr; #endif + MemOpIdx oi; do_check_align(env, addr, size - 1, GETPC()); switch (asi) { @@ -692,19 +693,20 @@ uint64_t helper_ld_asi(CPUSPARCState *env, target_ulong addr, case ASI_M_IODIAG: /* Turbosparc IOTLB Diagnostic */ break; case ASI_KERNELTXT: /* Supervisor code access */ + oi = make_memop_idx(memop, cpu_mmu_index(env, true)); switch (size) { case 1: - ret = cpu_ldub_code(env, addr); + ret = cpu_ldb_code_mmu(env, addr, oi, GETPC()); break; case 2: - ret = cpu_lduw_code(env, addr); + ret = cpu_ldw_code_mmu(env, addr, oi, GETPC()); break; default: case 4: - ret = cpu_ldl_code(env, addr); + ret = cpu_ldl_code_mmu(env, addr, oi, GETPC()); break; case 8: - ret = cpu_ldq_code(env, addr); + ret = cpu_ldq_code_mmu(env, addr, oi, GETPC()); break; } break;