void main() { ulong a; asm { movdqu XMM1, a; } }
The MOVDQU instruction is: F3 0F 6F /r MOVDQU xmm1, xmm2/m128 Move unaligned packed integer values from xmm2/m128 to xmm1.
What's happening is in iasm.d the operand size is encoded into 5 bit flags, and there isn't room for another _128 bit, so the assembler just accepts any size. The solution is to refactor the way operand sizes are encoded to accept more values.
Fix: https://github.com/dlang/dmd/pull/11570
@WalterBright updated dlang/dmd pull request #11570 "fix Issue 12832 - asm movdqu accepts wrong operand size" fixing this issue: - fix Issue 12832 - asm movdqu accepts wrong operand size https://github.com/dlang/dmd/pull/11570
dlang/dmd pull request #11570 "fix Issue 12832 - asm movdqu accepts wrong operand size" was merged into master: - 14e7cc917019d1016abaf23a59ebfe3deaed9ff5 by Walter Bright: fix Issue 12832 - asm movdqu accepts wrong operand size https://github.com/dlang/dmd/pull/11570