qemu-arm
[Top][All Lists]
Advanced

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

Re: [PATCH for-6.2 08/34] target/arm: Fix VPT advance when ECI is non-ze


From: Richard Henderson
Subject: Re: [PATCH for-6.2 08/34] target/arm: Fix VPT advance when ECI is non-zero
Date: Fri, 16 Jul 2021 09:58:17 -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:
      if (mask01 > 8) {
-        /* high bit set, but not 0b1000: invert the relevant half of P0 */
-        vpr ^= 0xff;
+        if (eci == ECI_NONE) {
+            /* high bit set, but not 0b1000: invert the relevant half of P0 */
+            vpr ^= 0xff;
+        } else if (eci == ECI_A0) {
+            /* Invert only the beat 1 P0 bits, as we didn't execute beat 0 */
+            vpr ^= 0xf0;
+        } /* otherwise we didn't execute either beat 0 or beat 1 */
      }
      if (mask23 > 8) {
-        /* high bit set, but not 0b1000: invert the relevant half of P0 */
-        vpr ^= 0xff00;
+        if (eci != ECI_A0A1A2 && eci != ECI_A0A1A2B0) {
+            /* high bit set, but not 0b1000: invert the relevant half of P0 */
+            vpr ^= 0xff00;
+        } else {
+            /* We didn't execute beat 2, only invert the beat 3 P0 bits */
+            vpr ^= 0xf000;
+        }
      }

It might not be any cleaner, but I wondered if mve_eci_mask could help here.

  inv_mask = mve_eci_mask(...);
  if (mask01 <= 8) {
    inv_mask &= ~0xff;
  }
  if (mask23 <= 8) {
    inv_mask &= ~0xff00;
  }
  vpr ^= inv_mask;


r~



reply via email to

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