1/* 2 * Generic two-operand compare-and-branch operation. Provide a "revcmp" 3 * fragment that specifies the *reverse* comparison to perform, e.g. 4 * for "if-le" you would use "gt". 5 * 6 * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le 7 */ 8 /* if-cmp vA, vB, +CCCC */ 9 movl rINST, %ecx # rcx <- A+ 10 sarl $$4, rINST # rINST <- B 11 andb $$0xf, %cl # rcx <- A 12 GET_VREG %eax, %rcx # eax <- vA 13 cmpl VREG_ADDRESS(rINSTq), %eax # compare (vA, vB) 14 j${revcmp} 1f 15 movswq 2(rPC), rINSTq # Get signed branch offset 16 testq rINSTq, rINSTq 17 jmp MterpCommonTakenBranch 181: 19 cmpl $$JIT_CHECK_OSR, rPROFILE 20 je .L_check_not_taken_osr 21 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2 22