Post-increment constraint in inline assembly (SuperH)

Sébastien Michelland
Sun Jan 28 13:33:00 GMT 2018


I am trying to generate a call to the SH-4A unaligned move "movua.l 
@rm+, r0" instruction. Currently my inline-assembly approach using
the '>' constraint is rejected by the compiler:

   #include <stdint.h>

   void f(void)
           uint32_t longword, *src;
                   "movua.l %1, %0"
                   : "=z" (longword)
                   : ">" (src)

   % sh3eb-elf-gcc -S movua.c -o movua.s -ffreestanding
   movua.c: In function 'f':
   movua.c:6:2: warning: asm operand 1 probably doesn't match constraints
   movua.c:6:2: error: impossible constraint in 'asm'

I have tried a lot of variations to no avail.

Am I using the '>' constraint the wrong way? What would be the proper 
way to generate this instruction?


More information about the Gcc-help mailing list