1

The Intel® 64 and IA-32 Architectures Software Developer’s Manual vol. 2 says that addps can be used with xmm1, xmm2/m128, but when using this instruction with a memory address as second operand it throws SIGSEGV. I don't understand what i'm doing wrong here. I'm using NASM compiler.

section .data
uno: DD 1.0, 1.0, 1.0, 1.0

section .text
foo:
addps xmm1, [uno]
Michael Petch
  • 46,082
  • 8
  • 107
  • 198
Martin Ventura
  • 167
  • 1
  • 3
  • 14
  • 2
    You need to make sure your memory holding the data is 16-byte aligned for `addps` to function properly. Place `align 16` on the line just before you define `uno`. – Michael Petch Oct 16 '17 at 04:59

0 Answers0