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-boolean, sput-byte, sput-char, sput-short 9 */ 10 /* op vAA, field@BBBB */ 11 movl rSELF,%ecx 12 movzwl 2(rPC),%eax # eax<- field ref BBBB 13 movl offThread_methodClassDex(%ecx),%ecx # ecx<- DvmDex 14 movl offDvmDex_pResFields(%ecx),%ecx # ecx<- dvmDex->pResFields 15#if defined(WITH_JIT) 16 movl %ecx, TMP_SPILL1(%ebp) 17 lea (%ecx,%eax,4),%ecx 18 movl %ecx, TMP_SPILL2(%ebp) 19 movl TMP_SPILL1(%ebp), %ecx 20#endif 21 movl (%ecx,%eax,4),%eax # eax<- resolved StaticField ptr 22 testl %eax,%eax # resolved entry null? 23 je .L${opcode}_resolve # if not, make it so 24.L${opcode}_finish: # field ptr in eax 25 GET_VREG_R rINST rINST 26 FETCH_INST_OPCODE 2 %ecx 27 ADVANCE_PC 2 28 movl rINST,offStaticField_value(%eax) 29 GOTO_NEXT_R %ecx 30 31 /* 32 * Go resolve the field 33 */ 34.L${opcode}_resolve: 35 movl rSELF,%ecx 36 movzwl 2(rPC),%eax # eax<- field ref BBBB 37 movl offThread_method(%ecx),%ecx # ecx<- current method 38 EXPORT_PC # could throw, need to export 39 movl offMethod_clazz(%ecx),%ecx # ecx<- method->clazz 40 movl %eax,OUT_ARG1(%esp) 41 movl %ecx,OUT_ARG0(%esp) 42 SPILL(rIBASE) 43 call dvmResolveStaticField # eax<- resolved StaticField ptr 44 UNSPILL(rIBASE) 45 testl %eax,%eax 46 je common_exceptionThrown # no, handle exception 47#if defined(WITH_JIT) 48 movl TMP_SPILL2(%ebp), %ecx 49 SPILL(rIBASE) 50 call common_verifyField 51 UNSPILL(rIBASE) 52#endif 53 jmp .L${opcode}_finish # success, continue