From patchwork Fri Oct 4 16:30:16 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: 832743 Delivered-To: patch@linaro.org Received: by 2002:adf:8b52:0:b0:367:895a:4699 with SMTP id v18csp868677wra; Fri, 4 Oct 2024 09:32:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXEByi0oKZubZvQfD23WWYHQEaewt3a1GeCDZYJ3UchBcQxT4ZEx2R09Or7xptaBTbaEyv5wg==@linaro.org X-Google-Smtp-Source: AGHT+IFmN6++TUW94QaeEWsEu4W54XJvLDHzu6GGZARksKdVZrkXmUYNtsVh7HNQIOU8Yv8XgvWT X-Received: by 2002:a05:620a:2a09:b0:7a9:9a64:cdc5 with SMTP id af79cd13be357-7ae6f48694emr467109185a.48.1728059552757; Fri, 04 Oct 2024 09:32:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728059552; cv=none; d=google.com; s=arc-20240605; b=SVScrP1stq9cpw/xBspQfpCNX9pydYW7aM+Dlg0vKpKlrKsLAqkccw7JCmTrFfY+Bp tpYGowOi5pk5+UChc5SSV0OQXvdzbflRdv0zfyYbjdg1L5pmFz63/QYLOOXI8/7lys8E kpZ6ydn7afeZWz/RMozC3jLlvV+25G4C3r2duG7lBwQu5RPCUwEEs3antnhggdDKzGCl wBWVQumLimJhGGjI/ZXJdYxgWT4RuPqPI3eQOQuRTjgpW/F41sbUQlD6qkwQ/1NSvFx+ CreuS2o9DWsa0UPm/ocO8MzCRYbJA8yJYiw/XvdeNCA1wXoO6uAvyvvlOkR80qWSsz2N 0Mcw== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=5nyIdscBf9eExt1kzAJJIA/rxjuPVcdO2ELN/HXgCsA=; fh=Cyx8393Oz+CWhBBtvLnsw/Ha6TQ3OyuB9akIVJXTJlY=; b=P5TYbJIdnPeI04EXdkKT/kKBHpw+nGHimYlRgP1ULLjd7twvFob9Epo8ZjRhtneNED ZJj6pg7usdQ/dn59vbU00zlKNruqznnYjfpQKm4DxZZ0QeQHNdgznju7Wg5IZQIFTqeY UrfLMqfKZJXF9LbgWRGFihp8cZVy+m96RPEyDNRe3eNyfxbpdBGidjqD3pUsqV9FZU/P fmclvK8LyQ6/+ynJKrbTjK/mZYH6ekxijzdxTFhEV/FvBpnIBPbzHO7HXxEucrWOaCkz 8i6xyL+2brHtwNVlqP29Vqc6pOCWZ7k/Jy+n7kzx6+RLFwIvoI+bKxqjc1nEaV+2Dx/x I13Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nxA9KIXY; 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 af79cd13be357-7ae6bb66b4asi394259985a.755.2024.10.04.09.32.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 Oct 2024 09:32:32 -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=nxA9KIXY; 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 1swlCp-00043w-8V; Fri, 04 Oct 2024 12:31:03 -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 1swlCm-00042U-LH for qemu-devel@nongnu.org; Fri, 04 Oct 2024 12:31:00 -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 1swlCj-0005VP-Ll for qemu-devel@nongnu.org; Fri, 04 Oct 2024 12:31:00 -0400 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-5398a26b64fso2383044e87.3 for ; Fri, 04 Oct 2024 09:30:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728059455; x=1728664255; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=5nyIdscBf9eExt1kzAJJIA/rxjuPVcdO2ELN/HXgCsA=; b=nxA9KIXYqC19s8kcDB1MZPLC5n5M7wDvXRaLCGZws4KNByrh/gLWmNVu3Rcmuh/+VQ WOKS0NKx3Ij6a8BGC2gIhj500792alM2/ve1XPbNfV/UKhFpqI9QDra27l7Os42mCEa1 8QEPfqh+35U8z8wr5R8lDoLlVxzsQI8fFOvt2M1sX7e/8VgMKDnx3lNlGwxstlN/fCo1 fw56/sGzUHDrGqYBtp2+QL5QehL9V2FX6Ys7K2YFZO2QmHIBlCcgsNzBNzJDKmCZlLC+ LiHenaaM2A0Azh9HF+LnwmYWSfZDS+2d6Sxp2jeQrSzuVyci5hmtkqOS3ujNNZibqTOJ Naag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728059455; x=1728664255; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5nyIdscBf9eExt1kzAJJIA/rxjuPVcdO2ELN/HXgCsA=; b=KZjVAFla4dCpuMdsKJStmaykD8j4ttgq9dm6ukWektDjr67k2LulBpl4HsVJJtKOpW nsHxLDE8JHWu2ReHbdWqafXSvBXmCwuqycPl2I6GTHOUUy1qFaYdbzV4VskyJh47hK17 xx33/vY+1E0be4KkQy/drxCmLc3md6D29frt57mLS2cl1fNXjc5huCC2H2VSsoHbOf9I oCxd16DRF1JkWLNja8ieERp6r8/GQp/pEK+POLcJDsc1e+1OLmxF2zMlKMVr8KOe1EyP zyZ7yERyl4KFVEiPUegyPLTMhWTsUPwjSLMcBlsgZ0eFFhccF4uLPuvm4HnMP5c475hL Q9Ag== X-Gm-Message-State: AOJu0YybUuTa6Hd5f6EbuoLS7QGu3VYG3yFwG8xZpL+gBMFQQsR63+E0 gxNEBpnMMi4tUdGTjvoOi9NFBRxnFAGQkmtW5pjQi+p99f0apGLM+7ZWgNGdvhkEWGp7ziRfzAJ 9qEeKyA== X-Received: by 2002:a05:6512:a8f:b0:536:a50a:3c25 with SMTP id 2adb3069b0e04-539ab8625dbmr2108527e87.12.1728059454912; Fri, 04 Oct 2024 09:30:54 -0700 (PDT) Received: from localhost.localdomain ([91.223.100.150]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-539aff281aasm305e87.256.2024.10.04.09.30.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 04 Oct 2024 09:30:54 -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 00/25] misc: Use explicit endian LD/ST API Date: Fri, 4 Oct 2024 13:30:16 -0300 Message-ID: <20241004163042.85922-1-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 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 For targets (or HW) which are only built for a particular endianness, the generic LD/ST helpers are defined as the target endianness variant. For example, on big-endian targets, stl_p() is equivalent of stl_be_p(). This series replaces in bulk these LD/ST calls. This is helpful for the single binary project where we want to build a single binary for multiple targets of different endianness. Philippe Mathieu-Daudé (25): gdbstub/helpers: Have ldtul_p() definition use ldn_p() target/hexagon: Replace ldtul_p() -> ldl_p() target/alpha: Replace ldtul_p() -> ldq_p() target/s390x: Replace ldtul_p() -> ldq_p() gdbstub/helpers: Introduce ldtul_$endian_p() helpers target/alpha: Use explicit little-endian LD/ST API target/hexagon: Use explicit little-endian LD/ST API hw/i386: Use explicit little-endian LD/ST API target/i386: Use explicit little-endian LD/ST API target/avr: Use explicit little-endian LD/ST API linux-user/i386: Use explicit little-endian LD/ST API target/loongarch: Use explicit little-endian LD/ST API target/sh4: Use explicit little-endian LD/ST API target/tricore: Use explicit little-endian LD/ST API target/rx: Use explicit little-endian LD/ST API target/riscv: Use explicit little-endian LD/ST API hw/m68k: Use explicit big-endian LD/ST API target/m68k: Use explicit big-endian LD/ST API hw/sparc: Use explicit big-endian LD/ST API target/sparc: Use explicit big-endian LD/ST API target/hppa: Use explicit big-endian LD/ST API hw/s390x: Use explicit big-endian LD/ST API target/s390x: Use explicit big-endian LD/ST API target/openrisc: Use explicit big-endian LD/ST API hw/ppc/e500: Use explicit big-endian LD/ST API hw/m68k/bootinfo.h | 28 ++--- include/gdbstub/helpers.h | 6 +- hw/i386/multiboot.c | 36 +++--- hw/i386/x86-common.c | 26 ++--- hw/m68k/mcf5208.c | 2 +- hw/m68k/next-cube.c | 2 +- hw/m68k/q800.c | 4 +- hw/ppc/ppce500_spin.c | 24 ++-- hw/s390x/ipl.c | 4 +- hw/s390x/s390-pci-inst.c | 166 +++++++++++++-------------- hw/sparc/leon3.c | 42 +++---- hw/sparc/sun4m.c | 6 +- hw/sparc64/sun4u.c | 6 +- linux-user/i386/signal.c | 4 +- target/alpha/gdbstub.c | 2 +- target/avr/gdbstub.c | 4 +- target/hexagon/gdbstub.c | 10 +- target/hppa/gdbstub.c | 2 +- target/i386/gdbstub.c | 30 ++--- target/i386/tcg/sysemu/excp_helper.c | 4 +- target/i386/xsave_helper.c | 32 +++--- target/loongarch/gdbstub.c | 8 +- target/m68k/gdbstub.c | 2 +- target/m68k/helper.c | 10 +- target/openrisc/gdbstub.c | 2 +- target/riscv/gdbstub.c | 14 +-- target/rx/cpu.c | 2 +- target/rx/gdbstub.c | 24 ++-- target/s390x/gdbstub.c | 34 +++--- target/s390x/ioinst.c | 2 +- target/sh4/gdbstub.c | 36 +++--- target/sparc/gdbstub.c | 6 +- target/tricore/gdbstub.c | 2 +- 33 files changed, 292 insertions(+), 290 deletions(-)