Hi, On 01/28/2018 03:28 PM, Segher Boessenkool wrote:
You should use "m>", or the compiler will not know what to do in most (all?) cases. You should use "m>"(*src) (note the star) because this should be a memory operand, not the pointer. You need to use "longword" or the whole asm can be optimised away. You need to arrange for src+1 to be used somehow, or the compiler will not choose to do a post-increment.
Oh, now that makes more sense. Adding "m" resulted in a displacement-addressing @(56,r2) until now. GCC would always choose "m" over ">", so I dropped it, but now I realize it's more of an optimization issue.
long bla; long *p; void f(long *src) { long longword; __asm__("movua.l %1, %0" : "=z" (longword) : "m>" (*src)); bla = longword; p = src+1; }
The "src++" in my loop did the trick. Thanks to you both! Regards, Sébastien