[PATCH 5/8] ppc: use correct asm ops

Segher Boessenkool segher at kernel.crashing.org
Wed Sep 28 04:22:16 EST 2005


> I don't see where this is explained in the GCC docs,

It is documented in gcc/gcc/config/rs6000/rs6000.c,
function print_operand() ;-)

> but as I understand it those %U %X things are allowing somebody to use 
> the "update" and "index" variants of the instruction.

Indeed.

> Why doesn't this work for you?

The code works fine.  The U and X have no effect at all,
though; they require a memory operand to do anything,
and __do_in_asm() c.q. __do_out_asm() take a register
input.  It would be better if __do_in_asm() would say

	"m" (*(port + ___IO_BASE))

where it now says

	"r" (port + ___IO_BASE)

and keep the %U %X stuff (and similarly for __do_out_asm()
of course).


Segher




More information about the Linuxppc-dev mailing list