Post-increment constraint in inline assembly (SuperH)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

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;
          __asm__(
                  "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
    __asm__(
    ^~~~~~~
  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?

Regards,
Sébastien




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux