1 2%default {"result":"","special":""} 3 /* 4 * 32-bit binary div/rem operation. Handles special case of op0=minint and 5 * op1=-1. 6 */ 7 /* binop vAA, vBB, vCC */ 8 movzbl 2(rPC),%eax # eax<- BB 9 movzbl 3(rPC),%ecx # ecx<- CC 10 GET_VREG(%eax,%eax) # eax<- vBB 11 GET_VREG(%ecx,%ecx) # eax<- vBB 12 SPILL(rPC) 13 cmpl $$0,%ecx 14 je common_errDivideByZero 15 cmpl $$-1,%ecx 16 jne .L${opcode}_continue_div 17 cmpl $$0x80000000,%eax 18 jne .L${opcode}_continue_div 19 movl $special,$result 20 jmp .L${opcode}_finish_div 21 22%break 23.L${opcode}_continue_div: 24 cltd 25 idivl %ecx 26.L${opcode}_finish_div: 27 movzbl rINST_HI,%ecx # ecl<- AA 28 SET_VREG($result,%ecx) 29 UNSPILL(rPC) 30 FETCH_INST_WORD(2) 31 ADVANCE_PC(2) 32 GOTO_NEXT 33