From patchwork Fri Oct 4 16:30:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 832741 Delivered-To: patch@linaro.org Received: by 2002:adf:8b52:0:b0:367:895a:4699 with SMTP id v18csp868472wra; Fri, 4 Oct 2024 09:32:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVqiEIzBL3eoovPm8dPZOKJoTQwvuqqccfODJNoDbd5srP1uPKLmjv6h8DpUV6C6mxzNCEE0g==@linaro.org X-Google-Smtp-Source: AGHT+IGgr5ddicdiUBMsMLIN56tlWhcNsrqKfPGWnd4jwnkXwKolX4zmmIGFtQ1FK9B7ywPBgEv4 X-Received: by 2002:a05:6902:72d:b0:e22:5ede:3f29 with SMTP id 3f1490d57ef6-e28936c7b32mr2422227276.2.1728059533082; Fri, 04 Oct 2024 09:32:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728059533; cv=none; d=google.com; s=arc-20240605; b=d9EkBTWRal4x+x8jc09buod/FzydxFFMSGjHwASVLb8AjlngJ0er6bAZKiZiNR/NhN BA9L70A5YLu+lf0FBdD6w/6dW9LmRh13tZkHsvZCfkVgO8ylYgPb+mYn98JZT4cnIePt UBEhduh/T8+xBJ+YnBfCHLiEFjO+hbwDUZZoa1Sldm1khdKVSVleBJish7ycA9vuuZck G4IOLH6m1aXrkK8tDEdP1dtv9O3p5NbBLjbNrMDMIXXda0LM18wP2W3xJ7mtKNEPs0fw FqlFqUTmOzW/rAGjhXJtra3G1mBcH3EPzFLqphy4NpRB07f9KyCEVnNyYixLTycj1d/0 lvDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=oAoM1TIG4dq1VUGRtKg0GSKBpc95w16YyE/RovaDYeo=; fh=Cyx8393Oz+CWhBBtvLnsw/Ha6TQ3OyuB9akIVJXTJlY=; b=UyHLXlPgCsWKl70Q2zpT0VWwDYjnA9lwxcBVVm3n9+b53WtnGQ6K94dJRP6GA4yhuo jy6vi4obO15i3/VTHRPliPH1x/nl4QT0be+b50GfcSUdHE3MlgbTU7XPCWYojd0RF6CF jHqDzt4lZyFnL78xPKGPkSd1kjPk8Dxex4QScgUXuTrStFJh0nzVeo4Bpy1ac3Dxanse 3/+ddq9GQNPXSOKITWUrTG8i/faIMv+bgUf6yMGv3vYmkZq6TOHCOCkuQbyslgfdsTLp fFNi10dynIhFpMgPTnoX9RpI7DJDQ7J1UWt1IfDz2bi01YoLTWyM51N8qwc0ouW/jbXK pmAQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=czLUMgmZ; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6cba475a7dbsi1474276d6.258.2024.10.04.09.32.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 Oct 2024 09:32:13 -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=czLUMgmZ; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1swlDJ-0004Fb-3d; Fri, 04 Oct 2024 12:31:35 -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 1swlDD-0004CT-AS for qemu-devel@nongnu.org; Fri, 04 Oct 2024 12:31:28 -0400 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1swlDA-0005ZR-La for qemu-devel@nongnu.org; Fri, 04 Oct 2024 12:31:27 -0400 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-539908f238fso2742510e87.2 for ; Fri, 04 Oct 2024 09:31:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728059483; x=1728664283; 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=oAoM1TIG4dq1VUGRtKg0GSKBpc95w16YyE/RovaDYeo=; b=czLUMgmZg/WkeTEEMbGyhaKZYmhPUsGqIccstZ9kB0xk5mcfGu0povwpqMqZNC/8pa PQDvP2CiiYVdPCDJmX6xjCiKCpiy7fyqXaNot1yELmXR/sX5xv5vFQWrZ1UKZkG/Tt6K gPBqIRal3rAXeq0DhSRlMnlGRvNeVYBBhExcjtbJr0sLwhoJDOfZ5Fk7AxI1V23AgZJc O5+VtNs6yQqV+LFvdkmmZwEYRFE9/+Hhu8MbR+8Dmb8XO1zkDy9yo4vlgbV9UXJQyPXZ InxsWje2AmrttMi2mb5jgDJ+D6nzApmg0zjKS14RzCi3n4eWN5tIRyskAhvou/pRSlg2 cYKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728059483; x=1728664283; 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=oAoM1TIG4dq1VUGRtKg0GSKBpc95w16YyE/RovaDYeo=; b=GJ+H76jbs/OxLqaRWEwxgevvDGeNvikDsNqLUafHeXaBo+mdM9GcSm20fhKek1EKsL AQkI6pXOYvmV+zgdte5HM7BkbjsV+O7gQ7wSf6Ob5+uHTNVoEY4+59X2XrjSrN63/KUa fGzNA8X8hFGBlK6ZFaFnbDx75OLoST1Q1KZ8l0LQSb8PDHiK9r4JPjTWPp02ZiDQPZBK NHRdM07iwbPe5sfSFPXCSVShCAvoFUMd1iUGRBm8FN25tbwtXHAdmIX3n7Kt9w/fIIAU uA2CMD8VgNg7068LlgzlPH5bVwY5NVa9cJDliLUMcaqP/YZbYtyD++jcLxflUcV7XIwe M9fA== X-Gm-Message-State: AOJu0Yw0yTy52N00BucUXQ1PLvkHs2JdUwluzu1MCjqztG9jTVt3Us+J TPMPH0hEh0fvldp+Nk3W3S5u8p4YHfeQy+3lPOfHHaUJinUgSnONRWG6QEN0E+GidHrudPmoB6t Wo8svpQ== X-Received: by 2002:a05:6512:4007:b0:530:d088:233f with SMTP id 2adb3069b0e04-539ab9eadeamr2111073e87.40.1728059482649; Fri, 04 Oct 2024 09:31:22 -0700 (PDT) Received: from localhost.localdomain ([91.223.100.150]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-539aff23456sm408e87.228.2024.10.04.09.31.16 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 04 Oct 2024 09:31:22 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, Thomas Huth , Richard Henderson , Pierrick Bouvier , qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 02/25] target/hexagon: Replace ldtul_p() -> ldl_p() Date: Fri, 4 Oct 2024 13:30:18 -0300 Message-ID: <20241004163042.85922-3-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241004163042.85922-1-philmd@linaro.org> References: <20241004163042.85922-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::129; envelope-from=philmd@linaro.org; helo=mail-lf1-x129.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=unavailable 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 The Hexagon target is only built for 64-bit. Using ldtul_p() is pointless, replace by ldl_p(). Mechanical change doing: $ sed -i -e 's/ldtul_p/ldl_p/' \ $(git grep -wl ldtul_p target/hexagon/) Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/hexagon/gdbstub.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/hexagon/gdbstub.c b/target/hexagon/gdbstub.c index 94e1db8ef8d..557b3029785 100644 --- a/target/hexagon/gdbstub.c +++ b/target/hexagon/gdbstub.c @@ -52,7 +52,7 @@ int hexagon_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) CPUHexagonState *env = cpu_env(cs); if (n == HEX_REG_P3_0_ALIASED) { - uint32_t p3_0 = ldtul_p(mem_buf); + uint32_t p3_0 = ldl_p(mem_buf); for (int i = 0; i < NUM_PREGS; i++) { env->pred[i] = extract32(p3_0, i * 8, 8); } @@ -60,14 +60,14 @@ int hexagon_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) } if (n < TOTAL_PER_THREAD_REGS) { - env->gpr[n] = ldtul_p(mem_buf); + env->gpr[n] = ldl_p(mem_buf); return sizeof(target_ulong); } n -= TOTAL_PER_THREAD_REGS; if (n < NUM_PREGS) { - env->pred[n] = ldtul_p(mem_buf) & 0xff; + env->pred[n] = ldl_p(mem_buf) & 0xff; return sizeof(uint8_t); } @@ -117,7 +117,7 @@ static int gdb_put_vreg(CPUHexagonState *env, uint8_t *mem_buf, int n) { int i; for (i = 0; i < ARRAY_SIZE(env->VRegs[n].uw); i++) { - env->VRegs[n].uw[i] = ldtul_p(mem_buf); + env->VRegs[n].uw[i] = ldl_p(mem_buf); mem_buf += 4; } return MAX_VEC_SIZE_BYTES; @@ -127,7 +127,7 @@ static int gdb_put_qreg(CPUHexagonState *env, uint8_t *mem_buf, int n) { int i; for (i = 0; i < ARRAY_SIZE(env->QRegs[n].uw); i++) { - env->QRegs[n].uw[i] = ldtul_p(mem_buf); + env->QRegs[n].uw[i] = ldl_p(mem_buf); mem_buf += 4; } return MAX_VEC_SIZE_BYTES / 8;