From patchwork Fri Oct 4 16:30:40 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: 832764 Delivered-To: patch@linaro.org Received: by 2002:adf:8b52:0:b0:367:895a:4699 with SMTP id v18csp873084wra; Fri, 4 Oct 2024 09:42:03 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX3JqT2ZAVsOQUHX5MN2NYEfozeVijxp24ohz06/utHg2G5crsQLvigdeVGpaW+dVH9KxObCg==@linaro.org X-Google-Smtp-Source: AGHT+IEM3Q6xOepI88ecibAGzDuhlDCWSaayGx620eDeFECLdFUN+WNJ8tYH/8ust05MsA0H8wDX X-Received: by 2002:a05:651c:2110:b0:2fa:d75b:2ef5 with SMTP id 38308e7fff4ca-2faf3d70252mr27778651fa.32.1728060123059; Fri, 04 Oct 2024 09:42:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728060123; cv=none; d=google.com; s=arc-20240605; b=BYoPWPHb+UjmmYhuLHT4YSlGNB11vflmAMRl7d8EAsrmx3jY2HYzN6Gul0/1QZ+2DT 3XgC+uisla98BzIrC/RcYtoW5T1Z/5Y0dWQ9La6zRJgs6frlBq2NHS2qFpf/2958mgDQ XyVWgqt9kTIparCOBZrukRbea8xRB4+qUfxSLQihWt4qu3439Gtwb/W773MYuy5bd5Gl LA1G1Z1OpJGXSbcXHLKcmyrXyuOanm2NbtNinsXkM5flPim4eOTI7+Hc/zoipmZy66eO kXq3phf89OOI4fpFi5sgAEI5gGxUa0VWloygqbZDjatneEKpeHiatuPTy6ojhMak6Qi9 OZcQ== 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=0KcWyV0l74Ltt00k0SuMNwX9PI5KG07PSsGD0S0u9KA=; fh=Cyx8393Oz+CWhBBtvLnsw/Ha6TQ3OyuB9akIVJXTJlY=; b=HhONSmO1QwbMTlSXwmFr2JuGovpiqak1uRh+Mozc77PS0ZDZQd0AFPGDfK4hRYk6eg J8y3suyK4pxOzQCP/kO2v4Hkp7epi37J3YC4JKGEriyTVEi3J4fth8k3eX1nK3WU9NqX PBHh4yrAPbyhF+UeafQxuvV42GM5QfUzL2NriJkbBRf42xkEIrHhZfKzG6TOXfn7HHyd l/AeqK2lu7Vfe+scn/LJX7DTiHgnB6ohJHGFrKPYoHfxXx9KcRTzZV4QZOs4Q5+ipcne 2pBelKq/HqliWPPzvkDq3L/KsUeowOOLqa+OYWD3Qau6UWwBrtLk346zKxsBcD87iFY6 A1Ag==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="gf2/F9Qb"; 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 4fb4d7f45d1cf-5c8e060cd13si58061a12.633.2024.10.04.09.42.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 Oct 2024 09:42:03 -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="gf2/F9Qb"; 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 1swlKB-0008BP-2h; Fri, 04 Oct 2024 12:38:40 -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 1swlIV-0002Dq-MA for qemu-devel@nongnu.org; Fri, 04 Oct 2024 12:36:56 -0400 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1swlIT-0006iU-2X for qemu-devel@nongnu.org; Fri, 04 Oct 2024 12:36:55 -0400 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2fad100dd9fso36948121fa.3 for ; Fri, 04 Oct 2024 09:36:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728059802; x=1728664602; 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=0KcWyV0l74Ltt00k0SuMNwX9PI5KG07PSsGD0S0u9KA=; b=gf2/F9QbraxPaiXc1wQaBI1zwl4PbxhGiq4sIt+XqH4xA8fGrezjxjAL7zC3f9Ai+k psmiODmZV3aCRRIZW7MLfwukv/bHeqID4P8EHi3ErHb1xMSL3BIcdmBZIxx8Hp7sDQ2/ /19VjHW0RTYXdyUujLHGNYI9lKzuDhgtsW2tXku5d0j/DNCfMkyrUPnWKq01o06mjwD8 cic9kir4yO9o5oKr3dQ82zINlWZ1pxp0m6JGIWqaNxywQ67eOZNgjFCbhCK2fwJN6F0F X22sp2OnjkNV2WKi2YpCswQdAP7jkgiVf8Qwbv1Eh6r7zy/8dIsEhY4AYMDRWFX4r2f1 y+xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728059802; x=1728664602; 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=0KcWyV0l74Ltt00k0SuMNwX9PI5KG07PSsGD0S0u9KA=; b=WnjRdPngoJ3L/es/taMzPUNI8L8NW0QvSo51DUjejIbJMzQCwi7mZoO/iypUbV0Hs9 WyPOESc4S2wV0sBAHnWfFbEpppqkuA4aV3pOjZqOhOc3UJUXq95utrupQXS5onIb1oOL qclbef/4UvAYFllnBuRwZWFpKfQ5+/4oinKs7xDYaJhP+eIUOBuFyGYcrkXVx6g0s2NG /e9SPE0I7o88cWGtNDtj25l8jDoUSUxBZWzj4bFt8Tok25uRvTHWDDdDTDl7a3GVnSGy QOfu00rV0dadBJGTTAdaD62gRxPix0T26xSGhGYD6xbeNJNJqWi+AYTuaBhyvR+im33Z JhIQ== X-Gm-Message-State: AOJu0YzjBXhUe907eCmPlL64WFHHgkvWVN5wNcvIhh1Y2rAx736UZ+hj /a03jSF+q1f+/0vtXScyEY5feINuA/xujVc/A05CM+zYoUXzBB7ZjeVaamEf+bxoR50CFo+b9qD IZk3wuQ== X-Received: by 2002:a05:651c:1545:b0:2f7:712d:d08 with SMTP id 38308e7fff4ca-2faf3c2978amr28480481fa.23.1728059802212; Fri, 04 Oct 2024 09:36:42 -0700 (PDT) Received: from localhost.localdomain ([91.223.100.150]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2faf9b248b3sm208721fa.75.2024.10.04.09.36.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 04 Oct 2024 09:36:40 -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 24/25] target/openrisc: Use explicit big-endian LD/ST API Date: Fri, 4 Oct 2024 13:30:40 -0300 Message-ID: <20241004163042.85922-25-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::231; envelope-from=philmd@linaro.org; helo=mail-lj1-x231.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 OpenRISC architecture uses big endianness. Directly use the big-endian LD/ST API. Mechanical change using: $ end=be; \ for acc in uw w l q tul; do \ sed -i -e "s/ld${acc}_p(/ld${acc}_${end}_p(/" \ -e "s/st${acc}_p(/st${acc}_${end}_p(/" \ $(git grep -wlE '(ld|st)t?u?[wlq]_p' target/openrisc/); \ done Signed-off-by: Philippe Mathieu-Daudé --- target/openrisc/gdbstub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/openrisc/gdbstub.c b/target/openrisc/gdbstub.c index c2a77d5d4d5..11f5c50423b 100644 --- a/target/openrisc/gdbstub.c +++ b/target/openrisc/gdbstub.c @@ -55,7 +55,7 @@ int openrisc_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) return 0; } - tmp = ldl_p(mem_buf); + tmp = ldl_be_p(mem_buf); if (n < 32) { cpu_set_gpr(env, n, tmp);