1 /* 2 * Check to see if an object reference is an instance of a class. 3 * 4 * Most common situation is a non-null object, being compared against 5 * an already-resolved class. 6 */ 7 # instance-of vA, vB, class /* CCCC */ 8 EXPORT_PC() 9 FETCH(a0, 1) # a0 <- CCCC 10 GET_OPB(a1) # a1 <- B 11 EAS2(a1, rFP, a1) # a1 <- &object 12 lw a2, OFF_FP_METHOD(rFP) # a2 <- method 13 move a3, rSELF # a3 <- self 14 GET_OPA4(rOBJ) # rOBJ <- A+ 15 JAL(MterpInstanceOf) # v0 <- Mterp(index, &obj, method, self) 16 lw a1, THREAD_EXCEPTION_OFFSET(rSELF) 17 PREFETCH_INST(2) # load rINST 18 bnez a1, MterpException 19 ADVANCE(2) # advance rPC 20 GET_INST_OPCODE(t0) # extract opcode from rINST 21 SET_VREG_GOTO(v0, rOBJ, t0) # vA <- v0 22