|
From: Greg P. <gp...@ap...> - 2013-10-03 18:48:00
|
On Oct 3, 2013, at 9:19 AM, John Reiser <jr...@bi...> wrote: > Florian Krohm wrote: >> In none/tests/amd64/pcmpxstrx64.c and none/tests/amd64/pcmpxstrx64w.c >> complains about all occurrences of: >> >> "movupd 48(%0), %%xmm0" >> "movupd %%xmm0, 48(%0)" >> >> For instance: >> >> pcmpxstrx64.c:79:46: error: invalid operand for instruction >> "movupd 48(%0), %%xmm0" "\n\t" >> ^ > > This is legal code; if clang rejects the code then clang has a bug. > >> <inline asm>:6:22: note: instantiated into assembly here >> movw 64(%rdi), %rcx >> ^~~~ > > Should be "%cx" which is 16 bits, instead of "%rcx" which is 64 bits. > gcc accepts sloppiness. Note that the "error: ... note: ..." is a single error. In this case, the movupd line is correct, but clang is incorrectly complaining about the wrong source line for the movw error. >> In none/tests/amd64/insn_sse.c >> complains about the pextrw insn like so: >> >> insn_sse.c:4602:11: error: invalid operand for instruction >> "pextrw $0, %%mm6, %%r9\n" >> ^ >> <inline asm>:7:1: note: instantiated into assembly here >> pextrw $0, %mm6, %r9 >> ^ > > This is legal code. If clang rejects the code, then clang has a bug. clang wants you to write %r9d instead of %r9. -- Greg Parker gp...@ap... Runtime Wrangler |