From nobody Sun Nov 16 16:26:01 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600855368; cv=none; d=zohomail.com; s=zohoarc; b=MBLgS/0TPma1Or3bpHScBaoplkx5DfW9BM0KYEUhBH9y0Bqi8kgjkT+Q9LThd7C/J6txbFpHtbIUBKvXs3vtdWmBEOegiK0J7NzrRlxB4AsPmYZmzZ4v/qqB2knGAciRqEOzKhSM6orP9Od9KCQrouVhnzudk/BVFHEmYwh0axM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600855368; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=iC4V1PEXAFDMxJmiZikknRbb4O4GLLtG0+6GroPagmU=; b=kVB3S80jRal/AGX7VjWQi9Nf4H0IHOkREbsGZjLOif225blu2sje8qtOnSSGp8rijzmL0X1N5+WDA5ipJe/Vz//6guyY5cPvENCAXwMX1s/pZ94W9bVhkqwWbR48Ssztagp0UGq2GE3H16uSn8K3mGloLSeHhkNJVaJiUir9Ls8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1600855368237224.08758815157273; Wed, 23 Sep 2020 03:02:48 -0700 (PDT) Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-116-3xQAUvjDNxOxBlrYNpw8LA-1; Wed, 23 Sep 2020 06:02:43 -0400 Received: by mail-wr1-f72.google.com with SMTP id f18so8632231wrv.19 for ; Wed, 23 Sep 2020 03:02:42 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (65.red-83-57-170.dynamicip.rima-tde.net. [83.57.170.65]) by smtp.gmail.com with ESMTPSA id d5sm31892640wrb.28.2020.09.23.03.02.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Sep 2020 03:02:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600855367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iC4V1PEXAFDMxJmiZikknRbb4O4GLLtG0+6GroPagmU=; b=BLzCxD/K+cqJSStP1dM24q5mDyIllQn1siG5y2W7/ZzjFDHc4IJMaWlaQUDwCYp6F9J3/2 HusJd9ENVz0d6bd/a/dF7o19UaPMbW4F2cjVx15UFy4NqjNSwkRgvkbsU+xLSBWpTiCP3b YqjzL0P5TC3ap4ZPOYpVhuzkX/9dKao= X-MC-Unique: 3xQAUvjDNxOxBlrYNpw8LA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iC4V1PEXAFDMxJmiZikknRbb4O4GLLtG0+6GroPagmU=; b=b8g5/HSlKbcrHx6whLdbg1ug0sq6xN02tqfZUgQwdAdHv7E12rk/weD0wm4K2c9syJ F4Xa685dfLaOh7y/UTsDQdugIsvRSDiXB3D/cdshNQMLyszYKAerGi/xavEQkn+hmqBV 9TbY7VotlnN274jwmJUYomdX35G4bGqfvB8EPH+pyHNh946b6nQhW8ZPXAQwHgHJhg5+ aPOzum07702LFE+8sN9+3RQCnNSNNQVYaI31nK7oec9WMBUvb8nTTlk2vB6//cGLTPD4 A5quVGgFqre+8yaun6S0XXr4Rvm2Hxq1jNODoPTsu5/H2A1IMpZ06Z4kNyWd5i1EP81K 46CQ== X-Gm-Message-State: AOAM530lOLg1xy/0O0L1p6UrJ4nqn4l4VHzgO9C4KbueG+5qmNY7Nbj9 JaDPpuzHuncU5IVy6rYbz2VFlZ9DuZar8KwqkHj640EM431H+9GMVRxGSQH1854sDPDLUPy5BFc QrfRJc7pOYxvZhg== X-Received: by 2002:adf:f190:: with SMTP id h16mr10400884wro.202.1600855361847; Wed, 23 Sep 2020 03:02:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUIwPj6O+U3sHYM/lPBsqJT2haHD47XIhumTZJ21A6kuR3lVIPUaxsGQGtiVtqI625zQGZqQ== X-Received: by 2002:adf:f190:: with SMTP id h16mr10400869wro.202.1600855361707; Wed, 23 Sep 2020 03:02:41 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 4/4] qemu/bswap: Remove dependency Date: Wed, 23 Sep 2020 12:02:20 +0200 Message-Id: <20200923100220.674903-5-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200923100220.674903-1-philmd@redhat.com> References: <20200923100220.674903-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) All our supported compilers provide the __builtin_bswap() functions. Drop the dependency. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- configure | 13 ------------- include/qemu/bswap.h | 17 ----------------- 2 files changed, 30 deletions(-) diff --git a/configure b/configure index e8e8e984f24..bff787daea7 100755 --- a/configure +++ b/configure @@ -4886,16 +4886,6 @@ if test "$docs" !=3D "no" ; then fi fi =20 -# Search for bswap_32 function -byteswap_h=3Dno -cat > $TMPC << EOF -#include -int main(void) { return bswap_32(0); } -EOF -if compile_prog "" "" ; then - byteswap_h=3Dyes -fi - # Search for bswap32 function bswap_h=3Dno cat > $TMPC << EOF @@ -6789,9 +6779,6 @@ fi if test "$st_atim" =3D "yes" ; then echo "HAVE_STRUCT_STAT_ST_ATIM=3Dy" >> $config_host_mak fi -if test "$byteswap_h" =3D "yes" ; then - echo "CONFIG_BYTESWAP_H=3Dy" >> $config_host_mak -fi if test "$bswap_h" =3D "yes" ; then echo "CONFIG_MACHINE_BSWAP_H=3Dy" >> $config_host_mak fi diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h index 6875e48d617..c192a6ad3e7 100644 --- a/include/qemu/bswap.h +++ b/include/qemu/bswap.h @@ -10,23 +10,6 @@ # include #elif defined(__HAIKU__) # include -#elif defined(CONFIG_BYTESWAP_H) -# include - -static inline uint16_t bswap16(uint16_t x) -{ - return bswap_16(x); -} - -static inline uint32_t bswap32(uint32_t x) -{ - return bswap_32(x); -} - -static inline uint64_t bswap64(uint64_t x) -{ - return bswap_64(x); -} #else # define bswap16(_x) __builtin_bswap16(_x) # define bswap32(_x) __builtin_bswap32(_x) --=20 2.26.2