diff mbox series

[7/9] target/sparc: Honor CPU_DUMP_FPU

Message ID 20180511035240.4016-8-richard.henderson@linaro.org
State Superseded
Headers show
Series Honor CPU_DUMP_FPU | expand

Commit Message

Richard Henderson May 11, 2018, 3:52 a.m. UTC
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 target/sparc/cpu.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

-- 
2.17.0

Comments

Philippe Mathieu-Daudé May 13, 2018, 12:54 a.m. UTC | #1
On 05/11/2018 12:52 AM, Richard Henderson wrote:
> Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

> Cc: Artyom Tarasenko <atar4qemu@gmail.com>

> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


> ---

>  target/sparc/cpu.c | 17 ++++++++++-------

>  1 file changed, 10 insertions(+), 7 deletions(-)

> 

> diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c

> index ff6ed91f9a..0f090ece54 100644

> --- a/target/sparc/cpu.c

> +++ b/target/sparc/cpu.c

> @@ -647,15 +647,18 @@ void sparc_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf,

>          }

>      }

>  

> -    for (i = 0; i < TARGET_DPREGS; i++) {

> -        if ((i & 3) == 0) {

> -            cpu_fprintf(f, "%%f%02d: ", i * 2);

> -        }

> -        cpu_fprintf(f, " %016" PRIx64, env->fpr[i].ll);

> -        if ((i & 3) == 3) {

> -            cpu_fprintf(f, "\n");

> +    if (flags & CPU_DUMP_FPU) {

> +        for (i = 0; i < TARGET_DPREGS; i++) {

> +            if ((i & 3) == 0) {

> +                cpu_fprintf(f, "%%f%02d: ", i * 2);

> +            }

> +            cpu_fprintf(f, " %016" PRIx64, env->fpr[i].ll);

> +            if ((i & 3) == 3) {

> +                cpu_fprintf(f, "\n");

> +            }

>          }

>      }

> +

>  #ifdef TARGET_SPARC64

>      cpu_fprintf(f, "pstate: %08x ccr: %02x (icc: ", env->pstate,

>                  (unsigned)cpu_get_ccr(env));

>
diff mbox series

Patch

diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c
index ff6ed91f9a..0f090ece54 100644
--- a/target/sparc/cpu.c
+++ b/target/sparc/cpu.c
@@ -647,15 +647,18 @@  void sparc_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf,
         }
     }
 
-    for (i = 0; i < TARGET_DPREGS; i++) {
-        if ((i & 3) == 0) {
-            cpu_fprintf(f, "%%f%02d: ", i * 2);
-        }
-        cpu_fprintf(f, " %016" PRIx64, env->fpr[i].ll);
-        if ((i & 3) == 3) {
-            cpu_fprintf(f, "\n");
+    if (flags & CPU_DUMP_FPU) {
+        for (i = 0; i < TARGET_DPREGS; i++) {
+            if ((i & 3) == 0) {
+                cpu_fprintf(f, "%%f%02d: ", i * 2);
+            }
+            cpu_fprintf(f, " %016" PRIx64, env->fpr[i].ll);
+            if ((i & 3) == 3) {
+                cpu_fprintf(f, "\n");
+            }
         }
     }
+
 #ifdef TARGET_SPARC64
     cpu_fprintf(f, "pstate: %08x ccr: %02x (icc: ", env->pstate,
                 (unsigned)cpu_get_ccr(env));