From patchwork Wed Jan 11 16:31:41 2023 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: 641254 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp3347908pvb; Wed, 11 Jan 2023 08:32:07 -0800 (PST) X-Google-Smtp-Source: AMrXdXuaBmpg4RhRS5z5PQKCu/Of8+vhn/gjgcXeZNzoHxk9s+4zRPXjGTJmKFS0hxOT7IbfsZ3o X-Received: by 2002:ac8:67d5:0:b0:3ae:7b4b:fb32 with SMTP id r21-20020ac867d5000000b003ae7b4bfb32mr13168146qtp.48.1673454727712; Wed, 11 Jan 2023 08:32:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673454727; cv=none; d=google.com; s=arc-20160816; b=zSQPoJsqDFWGM1d7K4/MSQvUVOdKAWdAG3B2MWmZrMBFr2qAbmEVhwHYnKjFmlbSNt x83Gyty125iJdxDwpBQMyeOW2SPddlPsU4FqbeWNkqYpJGmkbMTCQo8z4HaiziQh52FM F/Pgw2zvMP3VfvhBgL4AQRQ0IyAOeiScQukY37tqCcucj2SDdt0CMeC+o2rXHcHATC7Q D+NnnYohOwG8eX2XF3DFbQsbB0FfjgUX+0A6lbIefyvDSzu5kJNZK9rcvhs+w9JACthv /yuK2Ek9QuliG9TaZeYUpLHxNWNBZ9rbus/EDzadslVJt6TCWwV/q6IyBnTrO8g89s3P YTkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=27tan1Xzmz+ELGbfmDtcVgnvcz3dakW07o8994uvbHg=; b=uCuTNo+0XKvX4kMUFgg7nR1/HhjGid246zl0P1QanQhA4Idn4XpnKk9mcj5KfVY002 5g19/LdzW0nd0H4MSI7BmZzu0AyX/UUy8hCYVmcp9bFQIhgezr7LRUO4UdAqnDStguP3 CYZWK5DuoMRT3vv2dCUlLXnnd36ChH8sWm/h9iG49964hNUIdiLfmACr37B+oWDxOcA+ DTZdSb7+imtmlnccNBV8lut/YvdqTT8M/kkLdkfYEziLrK/syvRSFSbm4m9UJjIIO3jZ ZTgTEJjz3Y5zQnVB3TKKI8XvCbJ6eCRP92LNK2+X8uRQ/JZxBgoE79NtCqaNP+5FR0eS +jpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pydYCKwZ; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b24-20020ac86bd8000000b003a4f188a5fbsi8411790qtt.618.2023.01.11.08.32.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Jan 2023 08:32:07 -0800 (PST) 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=pydYCKwZ; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFe15-0001Ei-Jm; Wed, 11 Jan 2023 11:31:55 -0500 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 1pFe13-0001EW-R0 for qemu-devel@nongnu.org; Wed, 11 Jan 2023 11:31:53 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pFe12-0006Ax-2L for qemu-devel@nongnu.org; Wed, 11 Jan 2023 11:31:53 -0500 Received: by mail-wr1-x42e.google.com with SMTP id t5so11220416wrq.1 for ; Wed, 11 Jan 2023 08:31:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=27tan1Xzmz+ELGbfmDtcVgnvcz3dakW07o8994uvbHg=; b=pydYCKwZlcuQWzjiTDSF8dwbQbNxUG7W7RnG0gpQG1I438lHst368JqfVyB+GB8Bek DnnWpUvGSqF+TC4mJS78zkpfDxjdU+NNgxxTEJ9amImC0UbqJhdyc7YGv7AuGpFLh+TQ m0Ijah76rNo6TOtTocorWPJvs2l6HqNW30lNwGVO6O/dTS8EutlUVEbaJTehfrexjuw1 x6+ziNIEEqrN6PCptW1qWuzegsXfVRLqtqrbhfxChAveiNN0S2/3SaQrNbNGixi7jVw5 9Ejkf5Zp8RMc7sdzoH//p9Otpsi4hUl7uhMRrOzRJoYVEB3ImMdydj1QTPBxOaF7Rylj Y89Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=27tan1Xzmz+ELGbfmDtcVgnvcz3dakW07o8994uvbHg=; b=kZOPTO7yWbOOtsJ/zuwv7qyMCiBVuPuIvbTgg8NJXm65aCxx/7zImgiqnjM2wF+El+ zmgHhuGgu5nnZKXTLYfq80e9gRTENZineDxPUlCyuaM5SAqoSEoTIBsbXHaYeX1aJTMO Zvios2VUcOEUw+BBi2QTMdIBXKjfj7LLrpNgkQRQ3D2MZCgym5GA70ioiUkSzNyZZ+q4 0im8sbaJTwteq1KvBoYoKBgvkwSnpPreiwMqyLFQJb2VCNlJx9S3cI+yByg5Dv4OZ9Js rRIUIX8rTLPRdYO3k95EFvbR/R7Urvvgz1aSlNLSu2qRQEI7HjBWLiSjQ3UdbiRfJDQ6 bhsw== X-Gm-Message-State: AFqh2koQchnvP44oKfV74OS6G3Qn00s+bc6076lZ6f/5bSoiNlUCQJLo /ZS4biQ1x4xokhIF4ij0E4JASTioW8xQ+ptD X-Received: by 2002:a5d:404c:0:b0:2bb:ea1d:e36e with SMTP id w12-20020a5d404c000000b002bbea1de36emr8776566wrp.15.1673454709988; Wed, 11 Jan 2023 08:31:49 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id z18-20020a5d44d2000000b002368f6b56desm17074485wrr.18.2023.01.11.08.31.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 11 Jan 2023 08:31:49 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Ryo ONODERA , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , Ira Weiny , Paolo Bonzini , Kamil Rytarowski , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Reinoud Zandijk , Jonathan Cameron Subject: [PATCH v3 0/6] qemu/bswap: Use compiler __builtin_bswap() Date: Wed, 11 Jan 2023 17:31:41 +0100 Message-Id: <20230111163147.71761-1-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.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 Implement Richard's suggestion to use __builtin_bswap(). Convert to __builtin_bswap() one patch per OS to simplify maintainers review. Since v2: - Rebased adapting ./configure changes to meson Since v1: - Remove the Haiku/BSD ifdef'ry (Peter) - Include the Haiku VM image from Alexander Philippe Mathieu-Daudé (6): qemu/bswap: Replace bswapXX() by compiler __builtin_bswap() qemu/bswap: Replace bswapXXs() by compiler __builtin_bswap() qemu/bswap: Remove dependency qemu/bswap: Use compiler __builtin_bswap() on Haiku qemu/bswap: Use compiler __builtin_bswap() on FreeBSD qemu/bswap: Use compiler __builtin_bswap() on NetBSD include/qemu/bswap.h | 83 ++++++++------------------------------------ meson.build | 6 ---- 2 files changed, 15 insertions(+), 74 deletions(-) Reviewed-by: Richard Henderson