Home | History | Annotate | Download | only in x86
      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     movzwl  2(rPC), %eax                    # eax <- BBBB
     10     movl    %eax, OUT_ARG0(%esp)
     11     movl    rINST, %eax                     # eax <- BA
     12     sarl    $$4, %eax                       # eax <- B
     13     leal    VREG_ADDRESS(%eax), %ecx        # Get object address
     14     movl    %ecx, OUT_ARG1(%esp)
     15     movl    OFF_FP_METHOD(rFP),%eax
     16     movl    %eax, OUT_ARG2(%esp)
     17     movl    rSELF, %ecx
     18     movl    %ecx, OUT_ARG3(%esp)
     19     call    SYMBOL(MterpInstanceOf)         # (index, &obj, method, self)
     20     movl    rSELF, %ecx
     21     RESTORE_IBASE_FROM_SELF %ecx
     22     cmpl    $$0, THREAD_EXCEPTION_OFFSET(%ecx)
     23     jnz     MterpException
     24     andb    $$0xf, rINSTbl                  # rINSTbl <- A
     25     SET_VREG %eax, rINST
     26     ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
     27