movlps的NASM 64位立即地址给出“双字数据超出边界”

发布于 2024-09-17 08:01:38 字数 270 浏览 3 评论 0原文

我需要具有 64 位宽立即地址的指令 movlps,根据 Intel 手册,这应该是完全可能的。所以,像这样:

movlps xmm0, [0x7fffffffffa0]

但我得到的只是 NASM 将操作数大小截断为 32 位并打印相应的警告:

sample.s:6: warning: dword data exceeds bounds

我尝试了不同形式的 qword 前缀,但没有成功。

I need the instruction movlps with an immediate address that be 64 bits wide, which according to Intel manuals should be perfectly possible. So, something like this:

movlps xmm0, [0x7fffffffffa0]

But all what I get is NASM truncating the operand size to 32 bits and printing the corresponding warning:

sample.s:6: warning: dword data exceeds bounds

I have tried with different forms of the qword prefix without success.

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

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

发布评论

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

评论(2

成熟的代价 2024-09-24 08:01:54

我认为你做不到。 movlps 加载或存储 64 位宽的,但立即地址和位移通常仍限制为 32 位。你能做的最好的事情是

mov rax, 0x7fffffffffa0
movlps xmm0, [rax]

(第一个 mov 可能需要是 movabs;我真的不知道英特尔语法汇编)

I don't think you can do that. movlps loads or stores a value that's 64 bits wide, but immediate addresses and displacements are still limited to 32 bits in general. The best you can do is

mov rax, 0x7fffffffffa0
movlps xmm0, [rax]

(the first mov may need to be movabs; I don't really know Intel syntax assembly)

请你别敷衍 2024-09-24 08:01:51

大多数 x64 指令不采用 64 位立即处理。

除非我弄错了,否则你必须通过 rax 寄存器。

most x64 instructions don't take 64 bit immed.

unless I'm very mistaken you have to move through the rax register.

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