blob: c1161591c6262d3e718e493784e4228b78a710b2 [file] [log] [blame]
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001/*
2 * Generic one-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-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez
7 */
8 /* if-cmp vAA, +BBBB */
9 cmpl $$0, VREG_ADDRESS(rINST) # compare (vA, 0)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010 j${revcmp} 1f
buzbee2de973d2016-02-23 13:25:00 -080011 movswl 2(rPC), rINST # fetch signed displacement
Bill Buzbeed6342082016-04-04 16:59:10 +000012 testl rINST, rINST
13 jmp MterpCommonTakenBranch
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000141:
Bill Buzbeed6342082016-04-04 16:59:10 +000015 cmpw $$JIT_CHECK_OSR, rPROFILE
16 je .L_check_not_taken_osr
17 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2