Alexey Frunze | 00b53b7 | 2016-02-02 20:25:45 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Generic one-operand compare-and-branch operation. Provide a "condition" |
| 3 | * fragment that specifies the comparison to perform, e.g. for |
| 4 | * "if-lez" you would use "le". |
| 5 | * |
| 6 | * For: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez |
| 7 | */ |
| 8 | /* if-cmp vAA, +BBBB */ |
Alexey Frunze | 00b53b7 | 2016-02-02 20:25:45 -0800 | [diff] [blame] | 9 | srl a2, rINST, 8 # a2 <- AA |
Alexey Frunze | db045be | 2016-03-03 17:50:48 -0800 | [diff] [blame] | 10 | lh rINST, 2(rPC) # rINST <- offset (sign-extended BBBB) |
Alexey Frunze | 00b53b7 | 2016-02-02 20:25:45 -0800 | [diff] [blame] | 11 | GET_VREG a0, a2 # a0 <- vAA |
Douglas Leung | 020b18a | 2016-06-03 18:05:35 -0700 | [diff] [blame] | 12 | b${condition}zc a0, MterpCommonTakenBranchNoFlags |
| 13 | li v0, JIT_CHECK_OSR # possible OSR re-entry? |
| 14 | beqc rPROFILE, v0, .L_check_not_taken_osr |
| 15 | FETCH_ADVANCE_INST 2 # advance rPC, load rINST |
Alexey Frunze | 00b53b7 | 2016-02-02 20:25:45 -0800 | [diff] [blame] | 16 | GET_INST_OPCODE v0 # extract opcode from rINST |
| 17 | GOTO_OPCODE v0 # jump to next instruction |