Visual Studio 调试器的寄存器窗口中显示的 XMM 寄存器值的含义

发布于 2024-12-10 07:51:57 字数 732 浏览 4 评论 0原文

我发现很难解释 Visual Studio 寄存器窗口中 xmm 寄存器的值。窗口显示以下内容:

XMM0 = 00000000000000004018000000000000 XMM1 = 00000000000000004020000000000000 
XMM2 = 00000000000000000000000000000000 XMM3 = 00000000000000000000000000000000 
XMM4 = 00000000000000000000000000000000 XMM5 = 00000000000000000000000000000000 
XMM6 = 00000000000000000000000000000000 XMM7 = 00000000000000000000000000000000 

XMM00 = +0.00000E+000      XMM01 = +2.37500E+000      XMM02 = +0.00000E+000      
XMM03 = +0.00000E+000      XMM10 = +0.00000E+000      XMM11 = +2.50000E+000      
XMM12 = +0.00000E+000      XMM13 = +0.00000E+000

从我正在运行的代码来看,XMM0 和 XMM1 的值应该是 6 和 8(或其他方式)。这里显示的寄存器值是:XMM01 = +2.37500E+000

这意味着什么?

I am finding it hard to interpret the value of xmm registers in the register window of Visual Studio. The windows displays the following :

XMM0 = 00000000000000004018000000000000 XMM1 = 00000000000000004020000000000000 
XMM2 = 00000000000000000000000000000000 XMM3 = 00000000000000000000000000000000 
XMM4 = 00000000000000000000000000000000 XMM5 = 00000000000000000000000000000000 
XMM6 = 00000000000000000000000000000000 XMM7 = 00000000000000000000000000000000 

XMM00 = +0.00000E+000      XMM01 = +2.37500E+000      XMM02 = +0.00000E+000      
XMM03 = +0.00000E+000      XMM10 = +0.00000E+000      XMM11 = +2.50000E+000      
XMM12 = +0.00000E+000      XMM13 = +0.00000E+000

From the code that I am running, the value of XMM0 and XMM1 should be 6 and 8 (or other way round). The register value here shown is : XMM01 = +2.37500E+000

What does this translate to ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

泅人 2024-12-17 07:51:57

是的,看起来像:

XMM0 = { 6.0, 0.0 }  // 6.0 = 0x4018000000000000 (double precision)
XMM1 = { 8.0, 0.0 }  // 8.0 = 0x4020000000000000 (double precision)

您在解释这一点时遇到问题的原因是您的调试器仅以十六进制显示每个 128 位 XMM 寄存器,然后在其下方显示为 4 x 单精度 浮点数,但您显然是使用双精度浮点数。

我不熟悉 Visual Studio 调试器,但理想情况下应该有一种方法可以更改 XMM 寄存器的表示 - 您可能需要查看手册或在线帮助。

请注意,一般来说,在 SSE 中使用双精度很少有任何价值,特别是如果您有一个相当现代的带有两个 FPU 的 x86 CPU。

Yes, it looks like:

XMM0 = { 6.0, 0.0 }  // 6.0 = 0x4018000000000000 (double precision)
XMM1 = { 8.0, 0.0 }  // 8.0 = 0x4020000000000000 (double precision)

The reason you are having problems interpreting this is that your debugger is only displaying each 128 bit XMM register in hex and then below that as 4 x single precision floats, but you are evidently using double precision floats.

I'm not familiar with the Visual Studio debugger, but there should ideally be a way to change the representation of your XMM registers - you may have to look at the manual or online help for this.

Note that in general using double precision with SSE is rarely of any value, particularly if you have a fairly modern x86 CPU with two FPUs.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文