Home | History | Annotate | Download | only in x86
      1 %verify "executed"
      2 %verify "exception for null object"
      3     /*
      4      * Synchronize on an object.
      5      */
      6     /* monitor-enter vAA */
      7     GET_GLUE(%ecx)
      8     movzbl  rINST_HI,rINST_FULL         # rINST_FULL<- AA
      9     GET_VREG(%eax,rINST_FULL)           # eax<- vAA
     10     movl    offGlue_self(%ecx),%ecx     # ecx<- glue->self
     11     FETCH_INST_WORD(1)
     12     testl   %eax,%eax                   # null object?
     13     EXPORT_PC()                         # need for precise GC, MONITOR_TRACKING
     14     jne     .L${opcode}_continue
     15     jmp     common_errNullObject
     16 %break
     17 
     18 .L${opcode}_continue:
     19     SPILL(rPC)                          # have to - caller save
     20     movl    %ecx,OUT_ARG0(%esp)
     21     movl    %eax,OUT_ARG1(%esp)
     22     call    dvmLockObject               # dvmLockObject(self,object)
     23     UNSPILL(rPC)
     24 #ifdef WITH_DEADLOCK_PREDICTION
     25     GET_GLUE(%ecx)
     26     movl    offGlueSelf(%ecx),%ecx      # ecx<- glue->self
     27     movl    offThread_exception(%ecx),%eax
     28     testl   %eax,%eax
     29     jne     common_exceptionThrown
     30 #endif
     31     ADVANCE_PC(1)
     32     GOTO_NEXT
     33