[LLVMdev] [x86 codegen] 3DNow! intrinsics not behaving as expected.

Chris Lattner clattner at apple.com
Thu Apr 14 14:37:02 PDT 2011

On Apr 14, 2011, at 12:47 PM, Eli Friedman wrote:

>> I looked at the program using a debugger, and the pfadd instruction is
>> executed correctly and the MMX register contains the correct values.
>> The code that prepares the stack for the printf call seems to be
>> messing it up.
> I would call that "user error"; basically, using MMX instructions
> messes up the FP stack, and we assume the user is smart enough to make
> sure the two don't mix.

More specifically, if you use MMX/3dNow intrinsics, you have to call "emms" at ABI boundaries.


More information about the llvm-dev mailing list