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 w0, 1 // w0<- CCCC 10 lsr w1, wINST, #12 // w1<- B 11 VREG_INDEX_TO_ADDR x1, w1 // w1<- &object 12 ldr x2, [xFP, #OFF_FP_METHOD] // w2<- method 13 mov x3, xSELF // w3<- self 14 bl MterpInstanceOf // (index, &obj, method, self) 15 ldr x1, [xSELF, #THREAD_EXCEPTION_OFFSET] 16 lsr w2, wINST, #8 // w2<- A+ 17 and w2, w2, #15 // w2<- A 18 PREFETCH_INST 2 19 cbnz x1, MterpException 20 ADVANCE 2 // advance rPC 21 SET_VREG w0, w2 // vA<- w0 22 GET_INST_OPCODE ip // extract opcode from rINST 23 GOTO_OPCODE ip // jump to next instruction 24