开发者

NASM 64 bit immediate address for movlps gives "dword data exceeds bounds"

开发者 https://www.devze.com 2023-01-13 22:22 出处:网络
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:

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.


most x64 instructions don't take 64 bit immed.

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


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)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号