GolfinGamer
GolfinGamer

Reputation: 49

Moving quadwords to xmm

I just want to know the code to use to move a 64-bit register with number in it to a xmm register. My thought was:

`movsd xmm1, [r14]`

But I keep getting a segmentation fault: 11.

I am using NASM x86 on Mac OS-X.

Someone please help.

Upvotes: 1

Views: 244

Answers (1)

Stephen Canon
Stephen Canon

Reputation: 106267

movsd xmm1, [r14] attempts to load a double from the address stored in r14. That's not what you want. Instead, use:

movq xmm1, r14

Upvotes: 3

Related Questions