blob: 5db8b6cdd7f42d0584038562d74b1cb74ad53b1f [file] [log] [blame]
buzbee1452bee2015-03-06 14:43:04 -08001 /*
Bill Buzbee1d011d92016-04-04 16:59:29 +00002 * Generic one-operand compare-and-branch operation. Provide a "condition"
3 * fragment that specifies the comparison to perform.
buzbee1452bee2015-03-06 14:43:04 -08004 *
5 * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez
6 */
7 /* if-cmp vAA, +BBBB */
buzbee1452bee2015-03-06 14:43:04 -08008 mov r0, rINST, lsr #8 @ r0<- AA
Bill Buzbee1d011d92016-04-04 16:59:29 +00009 GET_VREG r0, r0 @ r0<- vAA
Bill Buzbeefd522f92016-02-11 22:37:42 +000010 FETCH_S rINST, 1 @ rINST<- branch offset, in code units
Bill Buzbee1d011d92016-04-04 16:59:29 +000011 cmp r0, #0 @ compare (vA, 0)
12 b${condition} MterpCommonTakenBranchNoFlags
13 cmp rPROFILE, #JIT_CHECK_OSR @ possible OSR re-entry?
14 beq .L_check_not_taken_osr
15 FETCH_ADVANCE_INST 2
buzbeef1dcacc2016-02-24 14:24:24 -080016 GET_INST_OPCODE ip @ extract opcode from rINST
17 GOTO_OPCODE ip @ jump to next instruction