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 .extern MterpInstanceOf 9 EXPORT_PC 10 lhu a0, 2(rPC) # a0 <- CCCC 11 srl a1, rINST, 12 # a1 <- B 12 dlsa a1, a1, rFP, 2 # a1 <- &object 13 ld a2, OFF_FP_METHOD(rFP) # a2 <- method 14 move a3, rSELF # a3 <- self 15 jal MterpInstanceOf # (index, &obj, method, self) 16 ld a1, THREAD_EXCEPTION_OFFSET(rSELF) 17 ext a2, rINST, 8, 4 # a2 <- A 18 PREFETCH_INST 2 19 bnez a1, MterpException 20 ADVANCE 2 # advance rPC 21 SET_VREG v0, a2 # vA <- v0 22 GET_INST_OPCODE v0 # extract opcode from rINST 23 GOTO_OPCODE v0 # jump to next instruction 24