From nobody Tue Feb 10 06:58:28 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1603256005; cv=none; d=zohomail.com; s=zohoarc; b=n3axOIYEEW49cHSmyNMdL2MCWLsAcgZf1ffK1s1AhsTVVAy72OVynnddcH3u31oU6R7nrho4f41BSKqatlB9ahyPQnztK0FbWkOyY9ZK/4Gwd0DT/zkClaTZoPYewzvjtOKTHdnZLBtWFMV1mQzBRrw4ngQq1xEMfsuu4kgUim8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603256005; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=V7ITHdPywINRSPHDouu96JAYypKQKGBAbsPkldgr1Ak=; b=TZhab3WohK9TVDlBGiZYR3KerilWIv7TNzzOp9wGDltGXMBvGbcqyNqFslNVJSjdOM+kMpRr6YMhSau67gXdqxY9x6ehfqEIpaDXPwPw7kvCWTcxR5YmaEYiy4lMV5/3vw3QvT9zUZE8Uq5fS2Ea6OhVOpeRA3E1C5+kXhzijt0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1603256005882834.3366429329683; Tue, 20 Oct 2020 21:53:25 -0700 (PDT) Received: from localhost ([::1]:33794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kV67p-00022x-3r for importer@patchew.org; Wed, 21 Oct 2020 00:53:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kV66T-0000N8-FD for qemu-devel@nongnu.org; Wed, 21 Oct 2020 00:52:01 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:46786) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kV66R-0005gj-O4 for qemu-devel@nongnu.org; Wed, 21 Oct 2020 00:52:01 -0400 Received: by mail-pl1-x642.google.com with SMTP id t4so559675plq.13 for ; Tue, 20 Oct 2020 21:51:59 -0700 (PDT) Received: from localhost.localdomain ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id j11sm620070pfh.143.2020.10.20.21.51.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2020 21:51:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=V7ITHdPywINRSPHDouu96JAYypKQKGBAbsPkldgr1Ak=; b=bLxioBkZ9vY2PBfL5ttyEzr6ZARx8Jws/G8kK61Hwu52C1fTUC3pET3I/Hu9SOJs2z PWRFKNGQ8RindH20SlStZEnfhWpDspPkIB9mKu73HVAAmQ6frT/fYeGqbsl5sAu4tJlA 6ZWIt9bcwgW4AAjasHe9ZAfzVfs6fbEdFkoYuy4zFhoZtLyDhCTo5PIR0/vM2fR5l+rF m3FU31jsIukyuJYPJzoh4232/r9YCnZsqg5sgeDI/sl8aUhFnS03TGhmwUpYBS2e3NGP EIzVfZO9kCG25JYwp8//jC9+4GF4eFxvZ8HG+aODxxFomwS01G7u7Urn+M4OqU4gVgiS 498A== 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=V7ITHdPywINRSPHDouu96JAYypKQKGBAbsPkldgr1Ak=; b=LubaRz8LSRVbmUfA/RFsFWlWufpbp0WbJ+YCxGoNQRE25ImboZvu794QG6z23xomdP 5qvdXJ9wboVCa6/VWkLDtGRVx37Qd7TReM2RhzjNCTU6ACRLu3n3nkb+AXQl6MDlZnUr TAGacjXy2fEwLAJV9UE91SNbpzvLrOmtMKq8582buuye1xu6yRcGfdV19MblDP0MjR1D tA6XueFp1hO8erMMPrLy4zksYkqgoo57jAWaB+uN0Fn+gQDV3xk5D8+Xe7rn908rTLoW ChNk+bF1fqwvZd7tbVlubRcyDCzuKvDWzbzqUYZv+o1vTWQ+8nBmjYYZV/8TdsSkmYkY QUrA== X-Gm-Message-State: AOAM532Xsih/6orEJ9fJ0TTefP9DE7NmJjD6rsDFkq4hTvb/Hka4m8u9 Ur8SAyY0gPokFt8hsY1Jz9QBECG5P8TVLQ== X-Google-Smtp-Source: ABdhPJw1/fXGaW5y35E05tN/NnoudHJnV6FoLkLW4Nqc4WQpP2ctzCu9fKQUgYi7/cbiteZzvkIWyA== X-Received: by 2002:a17:90a:cc0f:: with SMTP id b15mr1463373pju.202.1603255918146; Tue, 20 Oct 2020 21:51:58 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [RFC PATCH 05/15] qemu/int128: Add int128_geu Date: Tue, 20 Oct 2020 21:51:39 -0700 Message-Id: <20201021045149.1582203-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201021045149.1582203-1-richard.henderson@linaro.org> References: <20201021045149.1582203-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::642; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x642.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.bennee@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Add an unsigned inequality operation. Do not fill in all of the variations until we have a call for them. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/qemu/int128.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/qemu/int128.h b/include/qemu/int128.h index c53002039a..1f95792a29 100644 --- a/include/qemu/int128.h +++ b/include/qemu/int128.h @@ -113,6 +113,11 @@ static inline bool int128_ge(Int128 a, Int128 b) return a >=3D b; } =20 +static inline bool int128_geu(Int128 a, Int128 b) +{ + return (__uint128_t)a >=3D (__uint128_t)b; +} + static inline bool int128_lt(Int128 a, Int128 b) { return a < b; @@ -303,6 +308,11 @@ static inline bool int128_ge(Int128 a, Int128 b) return a.hi > b.hi || (a.hi =3D=3D b.hi && a.lo >=3D b.lo); } =20 +static inline bool int128_geu(Int128 a, Int128 b) +{ + return (uint64_t)a.hi > (uint64_t)b.hi || (a.hi =3D=3D b.hi && a.lo >= =3D b.lo); +} + static inline bool int128_lt(Int128 a, Int128 b) { return !int128_ge(a, b); --=20 2.25.1