blob: f181340355e58f4f269889a028d6e63f82d587c9 [file] [log] [blame]
%verify "executed"
/*
* Long integer shift. This is different from the generic 32/64-bit
* binary operations because vAA/vBB are 64-bit but vCC (the shift
* distance) is 32-bit. Also, Dalvik requires us to mask off the low
* 6 bits of the shift distance. x86 shifts automatically mask off
* the low 5 bits of %cl, so have to handle the 64 > shiftcount > 31
* case specially.
*/
/* shl-long vAA, vBB, vCC */
/* ecx gets shift count */
/* Need to spill edx */
/* rINSTw gets AA */
movzbl 2(rPC),%eax # eax<- BB
movzbl 3(rPC),%ecx # ecx<- CC
GET_VREG_WORD %edx %eax 1 # ecx<- v[BB+1]
GET_VREG_R %ecx %ecx # ecx<- vCC
GET_VREG_WORD %eax %eax 0 # eax<- v[BB+0]
shldl %eax,%edx
sall %cl,%eax
testb $$32,%cl
je 2f
movl %eax,%edx
xorl %eax,%eax
2:
SET_VREG_WORD %edx rINST 1 # v[AA+1]<- %edx
FETCH_INST_OPCODE 2 %edx
jmp .L${opcode}_finish
%break
.L${opcode}_finish:
SET_VREG_WORD %eax rINST 0 # v[AA+0]<- %eax
ADVANCE_PC 2
GOTO_NEXT_R %edx