Home | History | Annotate | Download | only in arm
      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     r0, 1                     @ r0<- CCCC
     10     mov       r1, rINST, lsr #12        @ r1<- B
     11     VREG_INDEX_TO_ADDR r1, r1           @ r1<- &object
     12     ldr       r2, [rFP, #OFF_FP_METHOD] @ r2<- method
     13     mov       r3, rSELF                 @ r3<- self
     14     bl        MterpInstanceOf           @ (index, &obj, method, self)
     15     ldr       r1, [rSELF, #THREAD_EXCEPTION_OFFSET]
     16     ubfx      r9, rINST, #8, #4         @ r9<- A
     17     PREFETCH_INST 2
     18     cmp       r1, #0                    @ exception pending?
     19     bne       MterpException
     20     ADVANCE 2                           @ advance rPC
     21     SET_VREG r0, r9                     @ vA<- r0
     22     GET_INST_OPCODE ip                  @ extract opcode from rINST
     23     GOTO_OPCODE ip                      @ jump to next instruction
     24