qemu-s390x
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [qemu-s390x] [Qemu-devel] [PATCH v1 5/5] s390x/tcg: Implement VECTOR


From: Richard Henderson
Subject: Re: [qemu-s390x] [Qemu-devel] [PATCH v1 5/5] s390x/tcg: Implement VECTOR STRING RANGE COMPARE
Date: Fri, 17 May 2019 11:37:26 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 5/15/19 1:31 PM, David Hildenbrand wrote:> +    const bool equal =
extract32(c, BITS - 1, 1);> +    const bool lower = extract32(c, BITS - 2, 1);>
+    const bool higher = extract32(c, BITS - 3, 1);> +> +    if (equal && data
== l) {> +        return true;> +    } else if (lower && data < l) {> +
return true;> +    } else if (higher && data > l) {> +        return true;> +
  }> +    return false;
Only one of the data comparisons can be true.  Better as

    if (data < l) {
        return lower;
    } else if (data > l) {
        return higher;
    } else {
        return equal;
    }

Otherwise, again, let's see if we can turn these into inlines.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]