• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    /* shr-long vAA, vBB, vCC */
11    /* ecx gets shift count */
12    /* Need to spill rIBASE */
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         # rIBASE<- v[BB+1]
18    GET_VREG_R  %ecx %ecx               # ecx<- vCC
19    GET_VREG_WORD %eax %eax 0           # eax<- v[BB+0]
20    shrdl     rIBASE,%eax
21    shrl      %cl,rIBASE
22    testb     $$32,%cl
23    je        2f
24    movl      rIBASE,%eax
25    xorl      rIBASE,rIBASE
262:
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[BB+0]<- eax
31    ADVANCE_PC 2
32    GOTO_NEXT_R %ecx
33