These functions rotate the contents of a variable to the left:
The first argument to __rlwimi is overwritten. However, if the first parameter is a local variable allocated to a register, it is both an input and output parameter. For this reason, this intrinsic should always be written to put the result in the same variable as the first parameter as shown here:
ra = __rlwimi( ra, rs, sh, mb, me );
You can count the leading zeros in a register using this intrinsic:
int __cntlzw(int);
You can use inline assembly for a complete assembly language function, as well as individual assembly language statements.