powerpc - which c code will gets changed to rlwinm power PC assembly instruciton -


which c code gets changed rlwinm power pc assembly instruciton??

this snapshot of objdump..

   if(!pool || pool->maxpoolsize > seq_modulus ) /* invalid mask or pointer null */     29ccc:       41 82 00 dc     beq-    29da8 <asgetsdbuf+0x108>    29cd0:       80 c3 00 08     lwz     r6,8(r3)    29cd4:       3c 00 00 ff     lis     r0,255    29cd8:       60 00 ff ff     ori     r0,r0,65535    29cdc:       7f 86 00 40     cmplw   cr7,r6,r0    29ce0:       41 9d 00 78     bgt-    cr7,29d58 <asgetsdbuf+0xb8>     ind = pool->maxpoolsize & idx;     /* there free sdbufs, 1 */     sdbuf = pool->sdbufs + ind;     29ce4:       81 63 00 10     lwz     r11,16(r3)    29ce8:       7c 80 30 38     ,     r0,r4,r6    29cec:       54 04 20 36     **rlwinm  r4,r0,4,0,27**     if(!sdbuf) /* check if sdbuf pointer null */     29cf0:       7f eb 22 15     add.    r31,r11,r4    29cf4:       41 82 00 fc     beq-    29df0 <asgetsdbuf+0x150>    } 

thanks,

rlwinm r4,r0,4,0,27

means

r4 = (r0 << 4) & 0xfffffff0

(actually it's rotate , not shift, doesn't matter here because of mask).

so it's multiplying 16, on next line added r11. guess corresponds

pool->sdbufs + ind

i.e. ind scaled match element size of data pool->sdbufs points to.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -