1    /*
2     * Generic two-operand compare-and-branch operation.  Provide a "condition"
3     * fragment that specifies the comparison to perform.
4     *
5     * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le
6     */
7    /* if-cmp vA, vB, +CCCC */
8    mov     r1, rINST, lsr #12          @ r1<- B
9    ubfx    r0, rINST, #8, #4           @ r0<- A
10    GET_VREG r3, r1                     @ r3<- vB
11    GET_VREG r0, r0                     @ r0<- vA
12    FETCH_S rINST, 1                    @ rINST<- branch offset, in code units
13    cmp     r0, r3                      @ compare (vA, vB)
14    b${condition} MterpCommonTakenBranchNoFlags
15    cmp     rPROFILE, #JIT_CHECK_OSR    @ possible OSR re-entry?
16    beq     .L_check_not_taken_osr
17    FETCH_ADVANCE_INST 2
18    GET_INST_OPCODE ip                  @ extract opcode from rINST
19    GOTO_OPCODE ip                      @ jump to next instruction
20