[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 05/15] qemu/int128: Add int128_geu
From: |
Richard Henderson |
Subject: |
[RFC PATCH 05/15] qemu/int128: Add int128_geu |
Date: |
Tue, 20 Oct 2020 21:51:39 -0700 |
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 <richard.henderson@linaro.org>
---
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 >= b;
}
+static inline bool int128_geu(Int128 a, Int128 b)
+{
+ return (__uint128_t)a >= (__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 == b.hi && a.lo >= b.lo);
}
+static inline bool int128_geu(Int128 a, Int128 b)
+{
+ return (uint64_t)a.hi > (uint64_t)b.hi || (a.hi == b.hi && a.lo >= b.lo);
+}
+
static inline bool int128_lt(Int128 a, Int128 b)
{
return !int128_ge(a, b);
--
2.25.1
- [RFC PATCH 00/15] softfloat: alternate conversion of float128_addsub, Richard Henderson, 2020/10/21
- [RFC PATCH 01/15] qemu/int128: Add int128_or, Richard Henderson, 2020/10/21
- [RFC PATCH 02/15] qemu/int128: Add int128_clz, int128_ctz, Richard Henderson, 2020/10/21
- [RFC PATCH 03/15] qemu/int128: Rename int128_rshift, int128_lshift, Richard Henderson, 2020/10/21
- [RFC PATCH 05/15] qemu/int128: Add int128_geu,
Richard Henderson <=
- [RFC PATCH 04/15] qemu/int128: Add int128_shr, Richard Henderson, 2020/10/21
- [RFC PATCH 06/15] softfloat: Use mulu64 for mul64To128, Richard Henderson, 2020/10/21
- [RFC PATCH 07/15] softfloat: Use int128.h for some operations, Richard Henderson, 2020/10/21
- [RFC PATCH 08/15] softfloat: Tidy a * b + inf return, Richard Henderson, 2020/10/21
- [RFC PATCH 10/15] softfloat: Inline float_raise, Richard Henderson, 2020/10/21
- [RFC PATCH 09/15] softfloat: Add float_cmask and constants, Richard Henderson, 2020/10/21
- [RFC PATCH 12/15] softfloat: Streamline FloatFmt, Richard Henderson, 2020/10/21
- [RFC PATCH 11/15] Test split to softfloat-parts.c.inc, Richard Henderson, 2020/10/21
- [RFC PATCH 13/15] Test float128_addsub, Richard Henderson, 2020/10/21