aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2020-10-20 21:51:35 -0700
committerRichard Henderson <richard.henderson@linaro.org>2021-02-18 07:48:22 -0800
commit08895cda3a57fe2d72ef621800606ddc2f5eb612 (patch)
tree5b0a0162288aba8a3c10edbd1512031461a6556b
parent91416a4254015e1e3f602f2b241b9ddb7879c10b (diff)
downloadqemu-08895cda3a57fe2d72ef621800606ddc2f5eb612.zip
qemu-08895cda3a57fe2d72ef621800606ddc2f5eb612.tar.gz
qemu-08895cda3a57fe2d72ef621800606ddc2f5eb612.tar.bz2
qemu/int128: Add int128_or
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20201021045149.1582203-2-richard.henderson@linaro.org>
-rw-r--r--include/qemu/int128.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/qemu/int128.h b/include/qemu/int128.h
index 76ea405..52fc238 100644
--- a/include/qemu/int128.h
+++ b/include/qemu/int128.h
@@ -58,6 +58,11 @@ static inline Int128 int128_and(Int128 a, Int128 b)
return a & b;
}
+static inline Int128 int128_or(Int128 a, Int128 b)
+{
+ return a | b;
+}
+
static inline Int128 int128_rshift(Int128 a, int n)
{
return a >> n;
@@ -208,6 +213,11 @@ static inline Int128 int128_and(Int128 a, Int128 b)
return (Int128) { a.lo & b.lo, a.hi & b.hi };
}
+static inline Int128 int128_or(Int128 a, Int128 b)
+{
+ return (Int128) { a.lo | b.lo, a.hi | b.hi };
+}
+
static inline Int128 int128_rshift(Int128 a, int n)
{
int64_t h;