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