Skip to content

Commit

Permalink
qemu/int128: Add int128_or
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rth7680 committed Feb 17, 2021
1 parent f0f75dc commit f6cfb65
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions include/qemu/int128.h
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit f6cfb65

Please sign in to comment.