Re: Post-increment constraint in inline assembly (SuperH)

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

 



On 29.01.2018 10:12, Andrew Haley wrote:
On 29/01/18 09:05, Georg-Johann Lay wrote:
A different approach is to explicitly use post-increment if that's the
favourable addressing mode:

__asm__ ("movua.l %1, @%0+"
           : "=z" (longword), "+r" (src)
           : "m" (*src)

I'm not familiar with SuperH, but isn't src %1 in this asm, when it
should be %0 ?

Yes, at least according to Segher's asm dump:

#APP
        movua.l @r4+, r0
#NO_APP

Hence the source should read something like

__asm__ ("movua.l @%1+, %0"
         : "=z" (longword), "+r" (src)
         : "m" (*src));

instead.  Thanks for spotting this.

Johann




[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