Hi Kevin,

>          /*
>           * Turn r3 (range) into a rotate count for the selected
> range. * 0 -> 23, 1 -> 31
>           */
>          __asm__ __volatile__ (  "slwi %0,%0,3\n"
>                                  "addi %0,%0,23\n"
>                                  "rlwnm %0,%1,%0,30,31\n":
>                  "=r"(ret):
>                  "r"(config),"0"(range)
>          );

Wouldn't this be much simpler in plain C?

However, if you really do need to do this in inline asm, you can use 
the "b" modifier rather than "r" to avoid using r0.

Cheers,


Jeremy
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to