我得到一个编译错误Error: operand type mismatch for 'movaps'
,谷歌搜索没有找到解决方案。movups
并addps
给出同样的错误。
这是一个相关的摘录:
# load address into %eax
movaps %eax, %mm0
为了完整起见,我.s
使用-m32
.
You are missing a level of indirection on the first argument, and the second argument needs to be an XMM register (i.e. 128 bit SSE), not an MM register (old 64 bit MMX):
movaps (%eax), %xmm0
If you can use intrinsics in C or C++ rather than writing raw asm then you can do this kind of thing a lot more easily, e.g.
__m128 v = _mm_load_ps(ptr);