Home | History | Annotate | Download | only in x86
      1 %verify "executed"
      2     /*
      3      * Long integer shift.  This is different from the generic 32/64-bit
      4      * binary operations because vAA/vBB are 64-bit but vCC (the shift
      5      * distance) is 32-bit.  Also, Dalvik requires us to mask off the low
      6      * 6 bits of the shift distance.  x86 shifts automatically mask off
      7      * the low 5 bits of %cl, so have to handle the 64 > shiftcount > 31
      8      * case specially.
      9      */
     10     /* shl-long vAA, vBB, vCC */
     11     /* ecx gets shift count */
     12     /* Need to spill rINST */
     13     /* rINSTw gets AA */
     14     movzbl    2(rPC),%eax               # eax<- BB
     15     movzbl    3(rPC),%ecx               # ecx<- CC
     16     SPILL(rIBASE)
     17     GET_VREG_WORD rIBASE %eax 1         # ecx<- v[BB+1]
     18     GET_VREG_R   %ecx %ecx              # ecx<- vCC
     19     GET_VREG_WORD %eax %eax 0           # eax<- v[BB+0]
     20     shldl     %eax,rIBASE
     21     sall      %cl,%eax
     22     testb     $$32,%cl
     23     je        2f
     24     movl      %eax,rIBASE
     25     xorl      %eax,%eax
     26 2:
     27     SET_VREG_WORD rIBASE rINST 1        # v[AA+1]<- rIBASE
     28     FETCH_INST_OPCODE 2 %ecx
     29     UNSPILL(rIBASE)
     30     SET_VREG_WORD %eax rINST 0          # v[AA+0]<- %eax
     31     ADVANCE_PC 2
     32     GOTO_NEXT_R %ecx
     33