1 %verify "executed" 2 %verify "forward, backward, self" 3 /* 4 * Unconditional branch, 32-bit offset. 5 * 6 * The branch distance is a signed code-unit offset, which we need to 7 * double to get a byte offset. 8 * 9 * Unlike most opcodes, this one is allowed to branch to itself, so 10 * our "backward branch" test must be "<=0" instead of "<0". 11 */ 12 /* goto/32 +AAAAAAAA */ 13 FETCH(a0, 1) # a0 <- aaaa (lo) 14 FETCH(a1, 2) # a1 <- AAAA (hi) 15 sll a1, a1, 16 16 or a0, a0, a1 # a0 <- AAAAaaaa 17 addu a1, a0, a0 # a1 <- byte offset 18 #if defined(WITH_JIT) 19 lw a0, offThread_pJitProfTable(rSELF) 20 bgtz a1, 1f 21 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh handler base 22 1: 23 FETCH_ADVANCE_INST_RB(a1) # update rPC, load rINST 24 blez a1, common_testUpdateProfile # (a0) hot trace head? 25 #else 26 FETCH_ADVANCE_INST_RB(a1) # update rPC, load rINST 27 bgtz a0, 2f 28 lw rIBASE, offThread_curHandlerTable(rSELF) # refresh handler base 29 2: 30 #endif 31 GET_INST_OPCODE(t0) # extract opcode from rINST 32 GOTO_OPCODE(t0) # jump to next instruction 33