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