From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD861C4361B for ; Thu, 10 Dec 2020 14:58:10 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 57E83206D5 for ; Thu, 10 Dec 2020 14:58:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 57E83206D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1knNOR-0007pv-9p for qemu-devel@archiver.kernel.org; Thu, 10 Dec 2020 09:58:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1knNMI-00064U-Lf for qemu-devel@nongnu.org; Thu, 10 Dec 2020 09:55:54 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:52613) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1knNMF-0000Qj-F9 for qemu-devel@nongnu.org; Thu, 10 Dec 2020 09:55:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607612150; 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=mBanhr1fgvfj3a2tbMQ3LSwkRYdL35LLpMiBdo5ibtY=; b=WxYd5U4Ff9tE+E073+5PX/y7CjGTSGkqQa/MJomiVGWC38tyMk6VW017HxFiHyxCbNC9S3 hk9ce+yqIT5If6L1C9lb1q9XfeWATuudf99kFuoAJ5DCl++ooRzYY1YzpNJXc17+cy05sa RH24YMveAp+nb6CDbrQhna7iJTXBMbY= Received: from mail-il1-f200.google.com (mail-il1-f200.google.com [209.85.166.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-444-1jVNkcP9PxKL6Zp7UYdyJw-1; Thu, 10 Dec 2020 09:55:47 -0500 X-MC-Unique: 1jVNkcP9PxKL6Zp7UYdyJw-1 Received: by mail-il1-f200.google.com with SMTP id b18so4636567ilr.7 for ; Thu, 10 Dec 2020 06:55:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=mBanhr1fgvfj3a2tbMQ3LSwkRYdL35LLpMiBdo5ibtY=; b=gCRx3OXJ+PLmOgmhZ1QxUehr1p4wmSE3jEqkIcpVQN8JIINbOOkgn6VYkQsOnrStCH SZUjpB3goA3nvw0enE9ZCJmBFS+Xutf5CLy2ZlyBv3L4iFB88LdEU6F+F2/uiHNZGgb+ FyYkkbk4AXVujgP0nfRwxXRatCo9+69DNF/Pwq7Uo4nGkNKk1ShXlwZU2MUV5Ny8R6Vl EvxpMy88dNUETGrDNGx1fV7pj6ELy2QN1rly9TVvHrsa0vHhyhC2T+htFmw0ZerSiOBO etfg8cQpdQ+lgPTA/HMDC5rTv7XjVdOLiCwOUGWPQOB1DkeAHx/6GnwPSaiNqWlgvE4G +m8g== X-Gm-Message-State: AOAM530auKN8m6IZMvpA7j5cUfGO8485DDZqdO/1WJzF3j8g40flhzw0 iwrGuRiw0tl/OTL2HKvqADVj4I2VXxHoGElWfeetfsnu2mNBn5MyHnSHdL/xA4NshQgkfQnS+FP rdooUYMTSyre+Keq6g0WlRaia/fSNawA= X-Received: by 2002:a6b:b5d2:: with SMTP id e201mr5227613iof.111.1607612146613; Thu, 10 Dec 2020 06:55:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+s9DW2PJte84KZQqjMa29hIrqXHSO4YD2VzYLlS+k4pC7kfrBaKl4ag4krI7jL31ahzBUBxRx9ZK+JFg018M= X-Received: by 2002:a6b:b5d2:: with SMTP id e201mr5227589iof.111.1607612146364; Thu, 10 Dec 2020 06:55:46 -0800 (PST) MIME-Version: 1.0 References: <20201210134752.780923-1-marcandre.lureau@redhat.com> <20201210134752.780923-4-marcandre.lureau@redhat.com> In-Reply-To: From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Date: Thu, 10 Dec 2020 18:55:35 +0400 Message-ID: Subject: Re: [PATCH v3 03/13] compiler.h: remove GCC < 3 __builtin_expect fallback To: Peter Maydell Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mlureau@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=63.128.21.124; envelope-from=mlureau@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Paul Durrant , Richard Henderson , QEMU Developers , Laurent Vivier , qemu-arm , Gerd Hoffmann , Stefan Hajnoczi , Paolo Bonzini , Anthony Perard , "open list:X86" , =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= , "Dr. David Alan Gilbert" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Hi On Thu, Dec 10, 2020 at 6:47 PM Peter Maydell wr= ote: > > On Thu, 10 Dec 2020 at 14:32, Philippe Mathieu-Daud=C3=A9 wrote: > > > > On 12/10/20 2:47 PM, marcandre.lureau@redhat.com wrote: > > > From: Marc-Andr=C3=A9 Lureau > > > > > > Since commit efc6c07 ("configure: Add a test for the minimum compiler > > > version"), QEMU explicitely depends on GCC >=3D 4.8. > > > > > > (clang >=3D 3.4 advertizes itself as GCC >=3D 4.2 compatible and supp= orts > > > __builtin_expect too) > > > > > > Signed-off-by: Marc-Andr=C3=A9 Lureau > > > Shouldn't it becleaner to test in the configure script or Meson that > > likely() and unlikely() are not defined, and define them here > > unconditionally? > > That sounds like way more infrastructure than we need if > just checking "is it already defined" is sufficient... > Eh, I am just removing dead-code "#if __GNUC__ < 3". Further cleanups can be done after. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E339AC4361B for ; Thu, 10 Dec 2020 14:56:03 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 701A1206D5 for ; Thu, 10 Dec 2020 14:56:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 701A1206D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.49395.87345 (Exim 4.92) (envelope-from ) id 1knNMG-0007ZE-BS; Thu, 10 Dec 2020 14:55:52 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 49395.87345; Thu, 10 Dec 2020 14:55:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1knNMG-0007Z7-8P; Thu, 10 Dec 2020 14:55:52 +0000 Received: by outflank-mailman (input) for mailman id 49395; Thu, 10 Dec 2020 14:55:51 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1knNMF-0007Z2-6k for xen-devel@lists.xenproject.org; Thu, 10 Dec 2020 14:55:51 +0000 Received: from us-smtp-delivery-124.mimecast.com (unknown [216.205.24.124]) by us1-rack-iad1.inumbo.com (Halon) with ESMTP id d87aaf62-12bf-4c04-9b8d-ae5bf7e756ca; Thu, 10 Dec 2020 14:55:50 +0000 (UTC) Received: from mail-io1-f69.google.com (mail-io1-f69.google.com [209.85.166.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-373--i1cTrN8Pvm7rMlPzp9C-w-1; Thu, 10 Dec 2020 09:55:47 -0500 Received: by mail-io1-f69.google.com with SMTP id 191so4064243iob.15 for ; Thu, 10 Dec 2020 06:55:47 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: d87aaf62-12bf-4c04-9b8d-ae5bf7e756ca DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607612150; 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=mBanhr1fgvfj3a2tbMQ3LSwkRYdL35LLpMiBdo5ibtY=; b=WxYd5U4Ff9tE+E073+5PX/y7CjGTSGkqQa/MJomiVGWC38tyMk6VW017HxFiHyxCbNC9S3 hk9ce+yqIT5If6L1C9lb1q9XfeWATuudf99kFuoAJ5DCl++ooRzYY1YzpNJXc17+cy05sa RH24YMveAp+nb6CDbrQhna7iJTXBMbY= X-MC-Unique: -i1cTrN8Pvm7rMlPzp9C-w-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=mBanhr1fgvfj3a2tbMQ3LSwkRYdL35LLpMiBdo5ibtY=; b=OL3Lk2jWFmfP6tg9RXBjRCPjhX0rbfWtWaeC2Td1saQkYLlYRtw3HhyjO9HHtF7ii2 YxehZ4IqbMlHdmyCrII6fRLzYvqN5ScxJh/qMKColxpwVz0vuzQNTSS3fuZSREvD/MPt 4apaBkMD61ZX5qk08Et0rPOHXoquRcwciHpocT/VhHCznr3Bs8w41dpoZ7PrxLMwtBXo WEOnC9cfddWBmKaXBUWkeG/8RyT1ZCKuN1dVjF2bgDqImyWJfom5f1urA3DfDXk/i/sq e+b8kc0a5SQa5jbHh2DEysqa6Auqz1f3eHgkbqfX1MxTefee42a89A8fgC4wt/bwjFrE a+7Q== X-Gm-Message-State: AOAM533J5kTt706zKQMjkkSdk0DiTd1OrVBN3kYNLpQZttyEk3JPiEAI qXW9hHleu8yOELMJAD7Ks5+zkT3UrLlD2PylieH1zdi4JFpi53ykdAwOQY2+mml24NOaCOnBKLS EDfkYLH7L0uiZ7G/UyAOWhxMmIRexFqAmWYKdHI815t0= X-Received: by 2002:a6b:b5d2:: with SMTP id e201mr5227602iof.111.1607612146609; Thu, 10 Dec 2020 06:55:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+s9DW2PJte84KZQqjMa29hIrqXHSO4YD2VzYLlS+k4pC7kfrBaKl4ag4krI7jL31ahzBUBxRx9ZK+JFg018M= X-Received: by 2002:a6b:b5d2:: with SMTP id e201mr5227589iof.111.1607612146364; Thu, 10 Dec 2020 06:55:46 -0800 (PST) MIME-Version: 1.0 References: <20201210134752.780923-1-marcandre.lureau@redhat.com> <20201210134752.780923-4-marcandre.lureau@redhat.com> In-Reply-To: From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Date: Thu, 10 Dec 2020 18:55:35 +0400 Message-ID: Subject: Re: [PATCH v3 03/13] compiler.h: remove GCC < 3 __builtin_expect fallback To: Peter Maydell Cc: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= , QEMU Developers , Richard Henderson , Laurent Vivier , Paul Durrant , "open list:X86" , Stefan Hajnoczi , Gerd Hoffmann , Stefano Stabellini , Anthony Perard , "Dr. David Alan Gilbert" , qemu-arm , Paolo Bonzini Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mlureau@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi On Thu, Dec 10, 2020 at 6:47 PM Peter Maydell wr= ote: > > On Thu, 10 Dec 2020 at 14:32, Philippe Mathieu-Daud=C3=A9 wrote: > > > > On 12/10/20 2:47 PM, marcandre.lureau@redhat.com wrote: > > > From: Marc-Andr=C3=A9 Lureau > > > > > > Since commit efc6c07 ("configure: Add a test for the minimum compiler > > > version"), QEMU explicitely depends on GCC >=3D 4.8. > > > > > > (clang >=3D 3.4 advertizes itself as GCC >=3D 4.2 compatible and supp= orts > > > __builtin_expect too) > > > > > > Signed-off-by: Marc-Andr=C3=A9 Lureau > > > Shouldn't it becleaner to test in the configure script or Meson that > > likely() and unlikely() are not defined, and define them here > > unconditionally? > > That sounds like way more infrastructure than we need if > just checking "is it already defined" is sufficient... > Eh, I am just removing dead-code "#if __GNUC__ < 3". Further cleanups can be done after.