Post-increment constraint in inline assembly (SuperH)

Oleg Endo oleg.endo@t-online.de
Sun Jan 28 13:41:00 GMT 2018


Hi,

On Sun, 2018-01-28 at 14:32 +0100, Sébastien Michelland wrote:
> 
> 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:

As far as I know, this won't work properly.  Auto-mod addressing modes
can't be expressed with inline assembly sufficiently.  The compiler
will not understand it.


> What would be the proper way to generate this instruction?

The only sane thing to do is fixing the compiler.  The other option is
to cripple all your code and insert movua macros/functions all over the
place.

It's a known issue
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52480

Cheers,
Oleg




More information about the Gcc-help mailing list