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 edx */
     13     /* rINST gets AA */
     14     movzbl    2(rPC),%eax               # eax<- BB
     15     movzbl    3(rPC),%ecx               # ecx<- CC
     16     SPILL(rPC)                          # spill edx
     17     GET_VREG_WORD(%edx,%eax,1)          # ecx<- v[BB+1]
     18     GET_VREG  (%ecx,%ecx)               # ecx<- vCC
     19     GET_VREG_WORD(%eax,%eax,0)          # eax<- v[BB+0]
     20     shldl     %eax,%edx
     21     sall      %cl,%eax
     22     testb     $$32,%cl
     23     je        2f
     24     movl      %eax,%edx
     25     xorl      %eax,%eax
     26 2:
     27     movzbl    rINST_HI,%ecx
     28     SET_VREG_WORD(%edx,%ecx,1)         # v[AA+1]<- %edx
     29     UNSPILL(rPC)
     30     FETCH_INST_WORD(2)
     31     jmp       .L${opcode}_finish
     32 %break
     33 
     34 .L${opcode}_finish:
     35     SET_VREG_WORD(%eax,%ecx,0)         # v[AA+0]<- %eax
     36     ADVANCE_PC(2)
     37     GOTO_NEXT
     38