blob: 8d3a198891ba1fc0b68f195398268dca4e5c8ff4 [file] [log] [blame]
Douglas Leung200f0402016-02-25 20:05:47 -08001 /*
Douglas Leung020b18a2016-06-03 18:05:35 -07002 * Generic one-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-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez
6 */
7 /* if-cmp vAA, +BBBB */
8 GET_OPA(a0) # a0 <- AA
Douglas Leung020b18a2016-06-03 18:05:35 -07009 GET_VREG(a0, a0) # a0 <- vAA
Douglas Leung200f0402016-02-25 20:05:47 -080010 FETCH_S(rINST, 1) # rINST <- branch offset, in code units
Douglas Leung020b18a2016-06-03 18:05:35 -070011 b${condition} a0, zero, MterpCommonTakenBranchNoFlags
12 li t0, JIT_CHECK_OSR # possible OSR re-entry?
13 beq rPROFILE, t0, .L_check_not_taken_osr
14 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
Douglas Leung200f0402016-02-25 20:05:47 -080015 GET_INST_OPCODE(t0) # extract opcode from rINST
16 GOTO_OPCODE(t0) # jump to next instruction