1%verify "executed" 2%verify "field already resolved" 3%verify "field not yet resolved" 4%verify "field cannot be resolved" 5 /* 6 * General 32-bit SPUT handler. 7 * 8 * for: sput, sput-object, sput-boolean, sput-byte, sput-char, sput-short 9 */ 10 /* op vAA, field@BBBB */ 11 GET_GLUE(%ecx) 12 movzwl 2(rPC),%eax # eax<- field ref BBBB 13 movl offGlue_methodClassDex(%ecx),%ecx # ecx<- DvmDex 14 movl offDvmDex_pResFields(%ecx),%ecx # ecx<- dvmDex->pResFields 15 movl (%ecx,%eax,4),%eax # eax<- resolved StaticField ptr 16 testl %eax,%eax # resolved entry null? 17 je .L${opcode}_resolve # if not, make it so 18.L${opcode}_finish: # field ptr in eax 19 movzbl rINST_HI,%ecx # ecx<- AA 20 GET_VREG(%ecx,%ecx) 21 FETCH_INST_WORD(2) 22 movl %ecx,offStaticField_value(%eax) 23 ADVANCE_PC(2) 24 GOTO_NEXT 25%break 26 27 /* 28 * Go resolve the field 29 */ 30.L${opcode}_resolve: 31 GET_GLUE(%ecx) 32 movzwl 2(rPC),%eax # eax<- field ref BBBB 33 movl offGlue_method(%ecx),%ecx # ecx<- current method 34 EXPORT_PC() # could throw, need to export 35 movl offMethod_clazz(%ecx),%ecx # ecx<- method->clazz 36 SPILL(rPC) 37 movl %eax,OUT_ARG1(%esp) 38 movl %ecx,OUT_ARG0(%esp) 39 call dvmResolveStaticField # eax<- resolved StaticField ptr 40 UNSPILL(rPC) 41 testl %eax,%eax 42 jne .L${opcode}_finish # success, continue 43 jmp common_exceptionThrown # no, handle exception 44 45