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>
This commit is contained in:
Richard Henderson 2020-10-20 21:51:35 -07:00
parent 91416a4254
commit 08895cda3a

View File

@ -58,6 +58,11 @@ static inline Int128 int128_and(Int128 a, Int128 b)
return a & 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) static inline Int128 int128_rshift(Int128 a, int n)
{ {
return a >> 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 }; 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) static inline Int128 int128_rshift(Int128 a, int n)
{ {
int64_t h; int64_t h;