3
align(16)
__xmm@200020000a4f0a4f6621662170707070 xmmword 200020000a4f0a4f6621662170707070h

and

__xmm@200020000a4f0a4f6621662170707070 xmmword 0x200020000a4f0a4f6621662170707070

Both fail, the compiler saying error A2138: invalid data initializer

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
Soonts
  • 20,079
  • 9
  • 57
  • 130
  • If all else fails, use two 64 bit initializers with `DQ`. – Jester Nov 27 '18 at 17:04
  • @Jester Thanks, it works but inconvenient to use, I have to write `xmmword ptr [__xmm@...]` in every place where my code uses the value. – Soonts Nov 27 '18 at 17:17
  • @Jester Neither `0`, `0x0`, nor `0h` work. Only `0.0` and `0.0f` do. Multiple floating point values work too. Surprisingly, even more than 4 values work, have no idea why you’d want more than 4 values, it’s a 128-bit data type. – Soonts Nov 27 '18 at 17:37
  • 1
    @Soonts: With more than 4 values, you're defining an *array* of `xmmword`s, just like `dd 1,2,3,4`. – Peter Cordes Nov 27 '18 at 19:45

1 Answers1

2

The best workaround I found is to use two 8 byte initializers with a separate LABEL definition, such as:

__xmm@200020000a4f0a4f6621662170707070 LABEL xmmword
dq 0x6621662170707070, 0x200020000a4f0a4f
Jester
  • 56,577
  • 4
  • 81
  • 125