Home | History | Annotate | Download | only in x86
      1 %verify "executed"
      2 %verify "exception for null object (impossible in javac)"
      3 %verify "dvmUnlockObject fails"
      4     /*
      5      * Unlock an object.
      6      *
      7      * Exceptions that occur when unlocking a monitor need to appear as
      8      * if they happened at the following instruction.  See the Dalvik
      9      * instruction spec.
     10      */
     11     /* monitor-exit vAA */
     12     movzbl  rINST_HI,rINST_FULL         # rINST_FULL<- AA
     13     GET_VREG(%eax,rINST_FULL)
     14     GET_GLUE(%ecx)
     15     EXPORT_PC()
     16     testl   %eax,%eax                   # null object?
     17     je      .L${opcode}_errNullObject   # go if so
     18     movl    offGlue_self(%ecx),%ecx     # ecx<- glue->self
     19     movl    %eax,OUT_ARG1(%esp)
     20     SPILL(rPC)
     21     movl    %ecx,OUT_ARG0(%esp)
     22     jmp     .L${opcode}_continue
     23 %break
     24 
     25 .L${opcode}_continue:
     26     call    dvmUnlockObject             # unlock(self,obj)
     27     UNSPILL(rPC)
     28     FETCH_INST_WORD(1)
     29     testl   %eax,%eax                   # success?
     30     ADVANCE_PC(1)
     31     je      common_exceptionThrown      # no, exception pending
     32     GOTO_NEXT
     33 .L${opcode}_errNullObject:
     34     ADVANCE_PC(1)                       # advance before throw
     35     jmp     common_errNullObject
     36