From nobody Mon Feb 9 19:08:54 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1609800696; cv=none; d=zohomail.com; s=zohoarc; b=RgvJS7XuU8PMV/vNJz9vy7tYLV2AVRctZAMgKyZxpyqEg6o6kGHEZbsvS4J4lSH2Lp+8ggNazZcQzniOUCLilOlhII3oTD2YA90uEsE9s0zdoOcZqqkuBb6iinvvS0EKQK+6CXZ3qzbQay0vUIDsXLhOQ6UlRzBZ2P8zxMv9c7Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609800696; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=m7cm/9FB43PWTY7fiPkkRCXbzTJ0HzdFnUf8UBDfAt4=; b=oEpPtJHpwxuZVDvPGKDoGz79Q4w7qpqeWnpvRBacONfqlhwz0Ar080H6kdN0OpJPLLmpezU0WwHWd7Xm4CLLJQZwvm57CDI2y5Ksf66UIvu1yKDXgXUV0qyvHC29riHLvtzyj8+o04eWUDlTmfNFLSktPkKaU5+6ENPKR2sUiiE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 160980069621292.81349015629416; Mon, 4 Jan 2021 14:51:36 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.61523.108360 (Exim 4.92) (envelope-from ) id 1kwYh8-0000a1-3B; Mon, 04 Jan 2021 22:51:22 +0000 Received: by outflank-mailman (output) from mailman id 61523.108360; Mon, 04 Jan 2021 22:51:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kwYh8-0000Zu-04; Mon, 04 Jan 2021 22:51:22 +0000 Received: by outflank-mailman (input) for mailman id 61523; Mon, 04 Jan 2021 22:51:20 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kwYh6-0000ZU-QT for xen-devel@lists.xenproject.org; Mon, 04 Jan 2021 22:51:20 +0000 Received: from mailhost.m5p.com (unknown [74.104.188.4]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 74eddb61-79df-4678-bd50-c2d0dfdcce29; Mon, 04 Jan 2021 22:51:20 +0000 (UTC) Received: from m5p.com (mailhost.m5p.com [IPv6:2001:470:1f07:15ff:0:0:0:f7]) by mailhost.m5p.com (8.15.2/8.15.2) with ESMTPS id 104MpADi071400 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 4 Jan 2021 17:51:16 -0500 (EST) (envelope-from ehem@m5p.com) Received: (from ehem@localhost) by m5p.com (8.15.2/8.15.2/Submit) id 104MpAT8071399; Mon, 4 Jan 2021 14:51:10 -0800 (PST) (envelope-from ehem) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 74eddb61-79df-4678-bd50-c2d0dfdcce29 Message-Id: <03e1951b566bf6c010d9d62a1379288411fbab7b.1608663694.git.ehem+xen@m5p.com> In-Reply-To: References: From: Elliott Mitchell To: xen-devel@lists.xenproject.org Cc: Ian Jackson Cc: Wei Liu Cc: Anthony PERARD Date: Fri, 18 Dec 2020 14:45:02 -0800 Subject: [WIP PATCH 02/16] tools/libxl: Tiny optimization of libxl__mac_is_default() X-Spam-Status: No, score=2.1 required=10.0 tests=DATE_IN_PAST_96_XX, KHOP_HELO_FCRDNS autolearn=no autolearn_force=no version=3.4.4 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mattapan.m5p.com Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This should result in fewer branch instructions and a small performance gain. Signed-off-by: Elliott Mitchell --- tools/libs/light/libxl_internal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libs/light/libxl_internal.c b/tools/libs/light/libxl_int= ernal.c index 32b8788b59..b4b2eb4deb 100644 --- a/tools/libs/light/libxl_internal.c +++ b/tools/libs/light/libxl_internal.c @@ -346,8 +346,8 @@ _hidden int libxl__compare_macs(const libxl_mac *a, con= st libxl_mac *b) =20 _hidden int libxl__mac_is_default(const libxl_mac *mac) { - return (!(*mac)[0] && !(*mac)[1] && !(*mac)[2] && - !(*mac)[3] && !(*mac)[4] && !(*mac)[5]); + return !((*mac)[0] | (*mac)[1] | (*mac)[2] | + (*mac)[3] | (*mac)[4] | (*mac)[5]); } =20 _hidden int libxl__init_recursive_mutex(libxl_ctx *ctx, pthread_mutex_t *l= ock) --=20 --=20 (\___(\___(\______ --=3D> 8-) EHM <=3D-- ______/)___/)___= /) \BS ( | ehem+sigmsg@m5p.com PGP 87145445 | ) / \_CS\ | _____ -O #include O- _____ | / _/ 8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445