Displaying 2 results from an estimated 2 matches for "mmx_movd64".
2009 Jul 09
2
[LLVMdev] Wrong encoding of movd on x64
...word ptr [rax],ecx
Note the last movq. What was probably intended to be generated was "movd
ecx, mm0". LLVM mistakenly sets the 'wide' bit of the REX prefix to 1,
turning movd into movq. Also, reg and r/m encoding has been swapped. I have
not found a fix for this yet, but the MMX_MOVD64* definitions and patterns
looks suspicious.
Note that on x86-32 it produces correct code (though not optimal either; it
doesn't use movd). Also, notice that the last two instructions above should
ideally just be a single movd to memory, instead of first writing to a GP
register.
In the...
2009 Jul 09
0
[LLVMdev] Wrong encoding of movd on x64
...o reproduce it:
[snip
> Note the last movq. What was probably intended to be generated was “movd
> ecx, mm0”. LLVM mistakenly sets the ‘wide’ bit of the REX prefix to 1,
> turning movd into movq. Also, reg and r/m encoding has been swapped. I have
> not found a fix for this yet, but the MMX_MOVD64* definitions and patterns
> looks suspicious.
Thanks for the testcase; fixed in r75142.
> Note that on x86-32 it produces correct code (though not optimal either; it
> doesn’t use movd). Also, notice that the last two instructions above should
> ideally just be a single movd to memory...