Hi,

On 24/11/23 05:45, xun wrote:
From: Yihuan Pan <xun...@gmail.com>

Replaces TABS with spaces to ensure have a consistent coding
style with an indentation of 4 spaces in the SH4 subsystem.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/376
Signed-off-by: Yihuan Pan <xun...@gmail.com>
---
  linux-user/sh4/termbits.h |  204 +++---
  target/sh4/cpu.h          |   80 +-
  target/sh4/helper.c       |  236 +++---
  target/sh4/op_helper.c    |   70 +-
  target/sh4/translate.c    | 1466 ++++++++++++++++++-------------------
  5 files changed, 1028 insertions(+), 1028 deletions(-)


@@ -241,17 +241,17 @@ static int find_tlb_entry(CPUSH4State * env, target_ulong 
address,
      asid = env->pteh & 0xff;
for (i = 0; i < nbtlb; i++) {
-       if (!entries[i].v)
-           continue;           /* Invalid entry */
-       if (!entries[i].sh && use_asid && entries[i].asid != asid)
-           continue;           /* Bad ASID */
-       start = (entries[i].vpn << 10) & ~(entries[i].size - 1);
-       end = start + entries[i].size - 1;
-       if (address >= start && address <= end) { /* Match */
-           if (match != MMU_DTLB_MISS)
-               return MMU_DTLB_MULTIPLE;       /* Multiple match */
-           match = i;
-       }
+        if (!entries[i].v)
+            continue; /* Invalid entry */

Thomas, better fix the 'if { }' in this patch or a following one?

+        if (!entries[i].sh && use_asid && entries[i].asid != asid)
+            continue; /* Bad ASID */
+        start = (entries[i].vpn << 10) & ~(entries[i].size - 1);
+        end = start + entries[i].size - 1;
+        if (address >= start && address <= end) { /* Match */
+            if (match != MMU_DTLB_MISS)
+                return MMU_DTLB_MULTIPLE; /* Multiple match */
+            match = i;
+        }
      }
      return match;
  }
@@ -265,7 +265,7 @@ static void increment_urc(CPUSH4State * env)
      urc = ((env->mmucr) >> 10) & 0x3f;
      urc++;
      if ((urb > 0 && urc > urb) || urc > (UTLB_SIZE - 1))
-       urc = 0;
+        urc = 0;
      env->mmucr = (env->mmucr & 0xffff03ff) | (urc << 10);
  }


Reply via email to