blob: 68df5c3ff09c1a7288fc6531b6cb5d8befa2a7b3 [file] [log] [blame]
Douglas Leung200f0402016-02-25 20:05:47 -08001 /*
Douglas Leung020b18a2016-06-03 18:05:35 -07002 * Generic two-operand compare-and-branch operation. Provide a "condition"
3 * fragment that specifies the comparison to perform.
Douglas Leung200f0402016-02-25 20:05:47 -08004 *
5 * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le
6 */
7 /* if-cmp vA, vB, +CCCC */
8 GET_OPA4(a0) # a0 <- A+
9 GET_OPB(a1) # a1 <- B
10 GET_VREG(a3, a1) # a3 <- vB
Douglas Leung020b18a2016-06-03 18:05:35 -070011 GET_VREG(a0, a0) # a0 <- vA
Douglas Leung200f0402016-02-25 20:05:47 -080012 FETCH_S(rINST, 1) # rINST<- branch offset, in code units
Douglas Leung020b18a2016-06-03 18:05:35 -070013 b${condition} a0, a3, MterpCommonTakenBranchNoFlags # compare (vA, vB)
14 li t0, JIT_CHECK_OSR
15 beq rPROFILE, t0, .L_check_not_taken_osr
16 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
Douglas Leung200f0402016-02-25 20:05:47 -080017 GET_INST_OPCODE(t0) # extract opcode from rINST
18 GOTO_OPCODE(t0) # jump to next instruction