qemu-arm
[Top][All Lists]
Advanced

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

Re: [PATCH for-6.2 20/34] target/arm: Implement MVE integer min/max acro


From: Richard Henderson
Subject: Re: [PATCH for-6.2 20/34] target/arm: Implement MVE integer min/max across vector
Date: Sat, 17 Jul 2021 13:46:26 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 7/13/21 6:37 AM, Peter Maydell wrote:
+/* Max and min of absolute values */
+static int64_t do_maxa(int64_t n, int64_t m)
+{
+    if (n < 0) {
+        n = -n;
+    }
+    if (m < 0) {
+        m = -m;
+    }
+    return MAX(n, m);
+}

This doesn't look quite right. The n operand is extracted unsigned, and only the m operand is subjected to ABS.


r~



reply via email to

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