qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 17/17] ppc: dump all 32 CR bits


From: Paolo Bonzini
Subject: [Qemu-devel] [PATCH 17/17] ppc: dump all 32 CR bits
Date: Thu, 28 Aug 2014 19:15:13 +0200

This is more precise when bits have been modified with CR
boolean operations.

Signed-off-by: Paolo Bonzini <address@hidden>
---
 target-ppc/translate.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index dd19b39..35e7a8b 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -11087,18 +11087,14 @@ void ppc_cpu_dump_state(CPUState *cs, FILE *f, 
fprintf_function cpu_fprintf,
     for (i = 0; i < 8; i++) {
         cpu_fprintf(f, "%01x", ppc_get_crf(env, i));
     }
-    cpu_fprintf(f, "  [");
-    for (i = 0; i < 8; i++) {
-        char a = '-';
-        if (ppc_get_crf(env, i) & 0x08)
-            a = 'L';
-        else if (ppc_get_crf(env, i) & 0x04)
-            a = 'G';
-        else if (ppc_get_crf(env, i) & 0x02)
-            a = 'E';
-        cpu_fprintf(f, " %c%c", a, ppc_get_crf(env, i) & 0x01 ? 'O' : ' ');
-    }
-    cpu_fprintf(f, " ]             RES " TARGET_FMT_lx "\n",
+    cpu_fprintf(f, "  ");
+    for (i = 0; i < 32; i++) {
+        if ((i & 3) == 0) {
+            cpu_fprintf(f, "%c", i ? ' ' : '[');
+        }
+        cpu_fprintf(f, "%c", env->cr[i] ? "LGEO"[i&3] : '.');
+    }
+    cpu_fprintf(f, "]       RES " TARGET_FMT_lx "\n",
                 env->reserve_addr);
     for (i = 0; i < 32; i++) {
         if ((i & (RFPL - 1)) == 0)
-- 
1.8.3.1




reply via email to

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