qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] i386/cpu_dump: support AVX512 ZMM regs dump


From: Richard Henderson
Subject: Re: [PATCH] i386/cpu_dump: support AVX512 ZMM regs dump
Date: Mon, 22 Mar 2021 15:06:45 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

On 3/22/21 4:59 AM, Robert Hoo wrote:
Since commit fa4518741e (target-i386: Rename struct XMMReg to ZMMReg),
CPUX86State.xmm_regs[] has already been extended to 512bit to support
AVX512.
Also, other qemu level supports for AVX512 registers are there for
years.
But in x86_cpu_dump_state(), still only dump XMM registers.
This patch is just to complement this part, let it dump ZMM of 512bits.

I think you should examine the state of the cpu to determine what of SSE, AVX or AVX512 is currently enabled, then dump that.

-        if (env->hflags & HF_CS64_MASK)
-            nb = 16;
-        else
-            nb = 8;
-        for(i=0;i<nb;i++) {
-            qemu_fprintf(f, "XMM%02d=%08x%08x%08x%08x",
+
+        nb = sizeof(env->xmm_regs) / sizeof(env->xmm_regs[0]);

E.g., you're dumping all of the registers in 32-bit mode, which is restricted to 8 registers, not 32.


r~



reply via email to

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