I am learning SSE in x64 assembly and was trying to change the sign of a float number stored in xmm0
. To do that, I used xorps
with a mask that I stored in the rodata section of my executable.
mov eax, ds:dword_403000
mov [rbp-4], eax
movss xmm0, [rbp-4]
xorps xmm0, ds:xmmword_403004
movss [rbp-4], xmm0
However, my program crashes at the xorps
instruction. On IDA I get the following error:
404016: The instruction at 0x404016 referenced memory at 0xFFFFFFFFFFFFFFFF. The memory could not be read (exc.code c0000005, tid 10220)
But the mask seems to be there and have the correct size. I do not understand why the memory is 0xFFFFFFFFFFFFFFFF
. Someone has an idea about what I did wrong?
My program seen my IDA
The float values in the rodata section
The program is generated by a compiler I am working on who directly outputs an executable without using an assembler and linker so I can't post the assembly file but I uploaded the executable for Windows here.