0

我得到一个编译错误Error: operand type mismatch for 'movaps',谷歌搜索没有找到解决方案。movupsaddps给出同样的错误。

这是一个相关的摘录:

# load address into %eax
movaps %eax, %mm0

为了完整起见,我.s使用-m32.

4

1 回答 1

1

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);
于 2013-09-19T11:50:37.663 回答