From patchwork Thu Oct 3 23:42:07 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: 832437 Delivered-To: patch@linaro.org Received: by 2002:adf:8b52:0:b0:367:895a:4699 with SMTP id v18csp529215wra; Thu, 3 Oct 2024 16:44:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWF5ngqGxMTBehnNSLueyNBSZ1fYxgGN3Pf+ZxFMU1CMWQBqtyyyNTp6qg/lFiAG9INKymC8A==@linaro.org X-Google-Smtp-Source: AGHT+IFnnSY8Unqx+0sZgFeddc5dO2GHjWG51k8w3V2Ff5fK0fpvQ2EhFT5fYSM5f2JcW9S0d0Rx X-Received: by 2002:a0c:f207:0:b0:6c5:1f00:502f with SMTP id 6a1803df08f44-6cb9ad3a692mr15915046d6.2.1727999062750; Thu, 03 Oct 2024 16:44:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727999062; cv=none; d=google.com; s=arc-20240605; b=YdztVg9fHm3XnMH39ijNGMAik/X5vZcRmAnxufMum8Kgdq/MUTdGbdWX9y5EZ+vhxf JBzUAX3vduX57wGKuqUxe2eaVDtOp18T418zWbZR/YMBethqyyHpikrhQhks+AEHTPx1 15nkU88/txQqPodcNqscqi+W52tsNgZnS3wJVBE/ESYGi6mBf0dMo5kmeqFHDarfluga asKADM+ULypOZZ3Med5Qis1N4Eo8asPetpVgw2+pN14ARCFkl4wMURgUrUCHRU68cS7h FcPVaaMh4vpKoORn1EELBqe+4lKhGF6y/bYPQWTQ4JwpVkU2kZE3HR+gB5TfWdoQq+O4 0PUA== 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=hZGu7nup/MOBwt2x+hZAsnAeVSIrLImHXyaQQxWjE7s=; fh=nW81HitAWvlF9bIdfU4jFbnEE30qf0mnop6z+LPTekQ=; b=Rp7WexUHeChtfM9VchFv/IUVVjmpCDInbpM4+6tXZC0fJcdk39hMvC4hYLusNhkW/T NAzr/SV2uYI29evoBoWHYrl4ropZ0dlXjOeNV/90OmTp8OEHLVYSCvS/hryVMJOXBWMa 7KRq+cZpl6Fn3qEzleHBmzAVzFSPu25PT4lmpkJ0SRdU5Dk442fwibYmchutLzk8nYJ6 wbdZmgx4Jxw36RqeFoEhW4CxZn2HZ7g/nZOCWAkI1edys/YUZUFwEv+BOM13Gujcqe5x eiwIPzQAr1WSZy6QugLEdpXeB6JFzoXPDd95RjpMy6t2q53ZL1MGZ3ZgrGm6nAQ/bXEF iYaw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sQf7EUhX; 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-6cb9385f665si23776106d6.547.2024.10.03.16.44.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 Oct 2024 16:44:22 -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=sQf7EUhX; 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 1swVUI-0001Pa-0H; Thu, 03 Oct 2024 19:44:02 -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 1swVUD-0000qm-Jh for qemu-devel@nongnu.org; Thu, 03 Oct 2024 19:43:57 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1swVUB-0004AF-EV for qemu-devel@nongnu.org; Thu, 03 Oct 2024 19:43:57 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-42cb60aff1eso14421255e9.0 for ; Thu, 03 Oct 2024 16:43:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1727999033; x=1728603833; 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=hZGu7nup/MOBwt2x+hZAsnAeVSIrLImHXyaQQxWjE7s=; b=sQf7EUhX5ddXa8eMxf3nYJzVadNaaE0TBlruAv+FebAaS1iMqaHFqys7s3WbG5bk1p TDB12bEiqBCvnnDIxMT2+t6i+swu8Qir30heMDqPui09JnkNLak9VvZYW8McRGBFJjp/ uWEQEK0nL6p+7tD0KYvy7J2vgWcuB8NVpOUfjh6stUNf+PqQ3IbGaZYr47lG0R/tGW3w w7DryKtb7/o270Q36jYGSDk4LG3+J7Vx/YjKra3bVzPtQXhDdp8fxP2sUxQ2O2xMmg69 GvYLsmAKcK7FBYorzvHkwqRDgFxKBspoMDh4x5TEtCo5M5lU7l86A84nR+Zdm+u3m68r ApEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727999033; x=1728603833; 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=hZGu7nup/MOBwt2x+hZAsnAeVSIrLImHXyaQQxWjE7s=; b=JCEXqEjaWtoHm1YD/jjlgXUrmPEYXXVcX8C3g/dYLsl2iJupVBrqCKxuBwKTSWR1wc 8Fs4xG3WSqh8QRS5G1fZmBXaLQhsKhvEnD5WAM+hJYU+q9nrJtvsmPlCdwWySz5FGJ6x 7rSWm2b4Vs1YbDXb+DHcNTcf0Npf/Ql2bSp92/QgbKJN4ulVwqEz68LRDZoEid+cP+qS xLCoFXSU7yAycU/SdQh5qzUP+w64n0D2NoG/4rU9yBx7Nbw4HbOIZbvO780onNV9iirx tZq8FwaqaIlZJ9Y5CkCrbUjzCZEI0tRhWX+yxGuRvA/g1I8WCFHRsSwD421PciJzAzA7 4GMA== X-Gm-Message-State: AOJu0YxizrddrLe9KnkgngA/arU0aP3tiuBY6YAtKK1TWTR6D+e5OrNa tUlttd5ayV4+HDGIMG7qaFUS6txrI5gomNDVjiOk4SPmUFew13UgWWxWXhMsSzBGW5Tbymp/usc O2NU= X-Received: by 2002:a05:600c:350c:b0:42c:b55f:f7c with SMTP id 5b1f17b1804b1-42f85ab7b35mr3906955e9.15.1727999033469; Thu, 03 Oct 2024 16:43:53 -0700 (PDT) Received: from localhost.localdomain (45.red-88-29-191.dynamicip.rima-tde.net. [88.29.191.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d082a6a2esm2138210f8f.66.2024.10.03.16.43.49 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 03 Oct 2024 16:43:52 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Michael Rolnik , Halil Pasic , Christian Borntraeger , Mark Cave-Ayland , Frederic Konrad , Artyom Tarasenko , Matthew Rosato , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , David Hildenbrand , Peter Xu , Ilya Leoshkevich , Song Gao , Thomas Huth , Marcel Apfelbaum , Eduardo Habkost , qemu-s390x@nongnu.org, Laurent Vivier , Eric Farman , =?utf-8?q?Cl=C3=A9ment_Chigot?= , Paolo Bonzini , "Michael S. Tsirkin" , Thomas Huth , Bastian Koppelmann , Richard Henderson , Pierrick Bouvier Subject: [PATCH 12/16] target/sparc: Use explicit big-endian LD/ST API Date: Fri, 4 Oct 2024 01:42:07 +0200 Message-ID: <20241003234211.53644-13-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241003234211.53644-1-philmd@linaro.org> References: <20241003234211.53644-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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 SPARC architecture uses big endianness. Directly use the big-endian LD/ST API. Signed-off-by: Philippe Mathieu-Daudé --- target/sparc/gdbstub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/sparc/gdbstub.c b/target/sparc/gdbstub.c index ec0036e9ef6..da72a7d3f69 100644 --- a/target/sparc/gdbstub.c +++ b/target/sparc/gdbstub.c @@ -110,7 +110,7 @@ int sparc_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) #if defined(TARGET_ABI32) uint32_t tmp; - tmp = ldl_p(mem_buf); + tmp = ldl_be_p(mem_buf); #else target_ulong tmp; @@ -165,7 +165,7 @@ int sparc_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) #else else if (n < 64) { /* f0-f31 */ - tmp = ldl_p(mem_buf); + tmp = ldl_be_p(mem_buf); if (n & 1) { env->fpr[(n - 32) / 2].l.lower = tmp; } else {