[RFC PATCH 01/15] qemu/int128: Add int128_or

Richard Henderson posted 15 patches 5 years, 3 months ago
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Aurelien Jarno <aurelien@aurel32.net>, Greg Kurz <groug@kaod.org>, Peter Maydell <peter.maydell@linaro.org>, "Alex Bennée" <alex.bennee@linaro.org>, David Gibson <david@gibson.dropbear.id.au>
[RFC PATCH 01/15] qemu/int128: Add int128_or
Posted by Richard Henderson 5 years, 3 months ago
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 76ea405922..52fc238421 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;
-- 
2.25.1


Re: [RFC PATCH 01/15] qemu/int128: Add int128_or
Posted by Alex Bennée 5 years, 3 months ago
Richard Henderson <richard.henderson@linaro.org> writes:

> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée

RE: [RFC PATCH 01/15] qemu/int128: Add int128_or
Posted by Taylor Simpson 5 years, 3 months ago
Reviewed by: Taylor Simpson <tsimpson@quicinc.com>

> -----Original Message-----
> From: Qemu-devel <qemu-devel-
> bounces+tsimpson=quicinc.com@nongnu.org> On Behalf Of Richard
> Henderson
> Sent: Tuesday, October 20, 2020 11:52 PM
> To: qemu-devel@nongnu.org
> Cc: alex.bennee@linaro.org
> Subject: [RFC PATCH 01/15] qemu/int128: Add int128_or
>
> 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 76ea405922..52fc238421 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;
> --
> 2.25.1
>
>


Re: [RFC PATCH 01/15] qemu/int128: Add int128_or
Posted by Philippe Mathieu-Daudé 5 years, 3 months ago
On 10/21/20 6:51 AM, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  include/qemu/int128.h | 10 ++++++++++
>  1 file changed, 10 insertions(+)

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Re: [RFC PATCH 01/15] qemu/int128: Add int128_or
Posted by Philippe Mathieu-Daudé 4 years, 12 months ago
On 10/21/20 6:51 AM, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  include/qemu/int128.h | 10 ++++++++++
>  1 file changed, 10 insertions(+)

Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>