From patchwork Thu Oct 3 23:41:55 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: 832435 Delivered-To: patch@linaro.org Received: by 2002:adf:8b52:0:b0:367:895a:4699 with SMTP id v18csp529193wra; Thu, 3 Oct 2024 16:44:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX7INbINZMcs0jkIjRQTwXmslUlmeR+hnlsf+HitDtcKms29JVrv40+gh5+kZ7oZoYpmvYbNw==@linaro.org X-Google-Smtp-Source: AGHT+IHqsFoJ8reketMAColO2+vWEO42kGFPctgcJXvQ1q/K4thDsLHBBBiLIapGJsfQM2KZ2v7J X-Received: by 2002:a05:620a:468a:b0:7ae:5c67:e19c with SMTP id af79cd13be357-7ae6f49d636mr155792585a.55.1727999057025; Thu, 03 Oct 2024 16:44:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727999057; cv=none; d=google.com; s=arc-20240605; b=MDqG3c8TUicVMKmlrN5IkuEQgl8dyxCNW0HTCcwxRyPpXocsSUmhxu1V+RkeEb8iix bgldQDy8EJzRK20JOGkg5XQqd2BLrJ5lFqzaJws0gbhlkmDGNoKcl6I6y6bmd0qCWnB5 nBH13J2qj6XHoPL9ZzA59PnUvmB/SPuoJyd5l0OWvcNIRSKPAhUYvmS/+H+3uXZ7aHd4 otOBuChHHFIP3FB1g0q6/CFcrqzLiw6AZ89X74izZA7cYDgASrn3X5vjP31fKHHYpxui iEIMpyhmkH8oixIAwoKA1SkVNIjq0lxGW7VH/pDjldCiiJ+aCkoXuTdvwOQtdPPYJSGC InSg== 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=Oi+Nd0fKgFyor+xTImivGQKXTHkB761wIWp1Jw+5YTQ=; fh=nW81HitAWvlF9bIdfU4jFbnEE30qf0mnop6z+LPTekQ=; b=BfLjyC1iS9oZ+U1y/Cg6nZBvjzVBwLDEQ+Jwo7tgEkFRxQoaCTfXIqgL8Nv8slZUrm u1GAnGUbS6R9Fei6jpx4+3wSyibmmVSQdSFdy48tGeL6Ikr4mj7NENYY7J+ncMelFmy7 oo41mWGgDAj6stWhDWEWzRvzraxiGk0nL7pPm00kaJ1SxDutRPwgz6F8JW+OF3nPqkXu J1eGPbpWA2DQHjjQS6kdZrIVg4jdAZ5rTHEsdAFPsv4ztXimznpeexuNTMu4mCPCoczt mrfPwbfaaCTMXwNi3tyCPzZTmu49rR+H7YVfBTguulLyXZAa5zno/EkcaJDRf3C56TO/ pyuw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=R7OwxPxY; 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-7ae6b76346dsi228556685a.188.2024.10.03.16.44.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 Oct 2024 16:44:17 -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=R7OwxPxY; 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 1swVSi-0007Hu-6m; Thu, 03 Oct 2024 19:42:24 -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 1swVSf-0007Gj-QQ for qemu-devel@nongnu.org; Thu, 03 Oct 2024 19:42:21 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1swVSe-0003KB-AZ for qemu-devel@nongnu.org; Thu, 03 Oct 2024 19:42:21 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-42cae102702so12304275e9.0 for ; Thu, 03 Oct 2024 16:42:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1727998938; x=1728603738; 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=Oi+Nd0fKgFyor+xTImivGQKXTHkB761wIWp1Jw+5YTQ=; b=R7OwxPxYjolpQqftGUAL2EMrChhRjFufowp6Z6AnvkkHmiHLPvj/lDw9FCaaYQ1Nv0 oVqDMe+x11HzTiMBGJG2sTHkLWC6TZV/E/zKlN7M8HWwSaFAfsyDeT/QgU1C9nzHXK1p pG+PQgG9Yi511ymFGb69TrJMydxX8hWnCLkPdDcCJf0t0/Yzx08L7N99OE85lc36+IFQ iVLwkXqGeCablPOaVfADGFr0CIXYkDP2KwuW3PrThKkfpN3lHtHqCQU1n4wgY5BFUdU8 yCDIFUtPd58UEMz9UZrotxR2glu2eC23PC0OPOMayNs3BYG4NTcQ5MDiPpa+cKF7Lul8 922A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727998938; x=1728603738; 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=Oi+Nd0fKgFyor+xTImivGQKXTHkB761wIWp1Jw+5YTQ=; b=RZskEdrV/8uFEtZO7H7ziL3wvm803L2Rjqen8sYHIhqeJ9/elJrU6Goh+DNZmCasRQ safoFGmHq/VlulmKFHbScriBxrxkzUCl/krQK+FctpI5n97V4qpuXDME93/62ScAghPh 7mMohsXVOWZXgbdYTN6LCkEvZzQO5NcGS6YTDtzRG07wF9eXREuRfeDALlZPLCnh4vCy wUW2QSpXdS9K1yhZ0xzDDv70avAbcAERDDRtHQRTxuX53bneVw/Lsgp9zPIPxlieplbG JuHsrLvGw3nFaskb+fcE2NQ6bYdD+GQd4IYKK9CrHAJHQzJoRvmeMyrYDHqgthZCNpRV Yvfw== X-Gm-Message-State: AOJu0YxqZHhBUSjoSZ84AoPoqXC4/16WJ8lNiFKlksSQ0oJL6x7kMsw/ DYFhFKanNHIvyvrrqBszWQAGIfpIoJVZE0madvwiJRGkIhPKM0wx7lomkQqF5K/Ma9rZGxc7rlj yD0I= X-Received: by 2002:a05:600c:4f86:b0:42a:a6d2:3270 with SMTP id 5b1f17b1804b1-42f85ac0c07mr3543565e9.21.1727998938003; Thu, 03 Oct 2024 16:42:18 -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 5b1f17b1804b1-42f86a1f74fsm1320275e9.2.2024.10.03.16.42.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 03 Oct 2024 16:42:16 -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 00/16] misc: Use explicit endian LD/ST API Date: Fri, 4 Oct 2024 01:41:55 +0200 Message-ID: <20241003234211.53644-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::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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=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 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é (16): qemu/bswap: Undefine CPU_CONVERT() once done exec/memop: Remove unused memop_big_endian() helper linux-user/i386: 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 hw/m68k: Use explicit big-endian LD/ST API target/m68k: Use explicit big-endian LD/ST API hw/ppc/e500: 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 hw/sparc: Use explicit big-endian LD/ST API target/sparc: Use explicit big-endian LD/ST API target/avr: Use explicit little-endian LD/ST API target/hppa: Use explicit big-endian LD/ST API target/loongarch: Use explicit little-endian LD/ST API target/tricore: Use explicit big-endian LD/ST API hw/m68k/bootinfo.h | 28 ++--- include/exec/memop.h | 6 - include/qemu/bswap.h | 2 + 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/avr/gdbstub.c | 4 +- target/hppa/gdbstub.c | 2 +- target/i386/gdbstub.c | 26 ++--- 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/s390x/gdbstub.c | 4 +- target/s390x/ioinst.c | 2 +- target/sparc/gdbstub.c | 4 +- target/tricore/gdbstub.c | 2 +- 27 files changed, 227 insertions(+), 231 deletions(-)