On Tue, 3 Jul 2012, Niels Möller wrote:
Martin Storsjö martin@martin.st writes:
Re testing, I tried doing a build on 64 bit OS X, which fails at:
salsa20-crypt.s:364:suffix or operands invalid for `movq' salsa20-crypt.s:370:suffix or operands invalid for `movq'
That sounds vaguely familiar. I think it has been reported earlier, but not fixed.
This instruction, "movq %xmm4, %r8" is used to copy the low 64 bits from an %xmm register to a regular 64-bit register. Any idea on how to write that in a way which makes the osx assembler happy? I'm not aware of any other instruction for doing that type of copy, but any reasonable workaround is appreciated.
If I change it into movd instead of movq, it builds fine on OS X, and the tests pass.
On Linux, it doesn't seem to break anything either. And if checking the output with objdump -d, it is encoded into the same opcode (which objdump reports as movq).
// Martin