1 %default { "store":"movl", "reg":"rINST", "sqnum":"0" } 2 %verify "executed" 3 %verify "null object" 4 %verify "field already resolved" 5 %verify "field not yet resolved" 6 %verify "field cannot be resolved" 7 /* 8 * Jumbo 32-bit instance field put. 9 * 10 * for: iput/jumbo, iput-object/jumbo, iput-boolean/jumbo, iput-byte/jumbo, 11 iput-char/jumbo, iput-short/jumbo 12 */ 13 /* exop vBBBB, vCCCC, field@AAAAAAAA */ 14 movl rSELF,%ecx 15 SPILL(rIBASE) 16 movl 2(rPC),rIBASE # rIBASE<- AAAAAAAA 17 movl offThread_methodClassDex(%ecx),%eax # eax<- DvmDex 18 movzwl 8(rPC),%ecx # ecx<- CCCC 19 movl offDvmDex_pResFields(%eax),%eax # eax<- pDvmDex->pResFields 20 GET_VREG_R %ecx %ecx # ecx<- fp[CCCC], the object ptr 21 movl (%eax,rIBASE,4),%eax # resolved entry 22 testl %eax,%eax # is resolved entry null? 23 jne .L${opcode}_finish # no, already resolved 24 movl rIBASE,OUT_ARG1(%esp) 25 movl rSELF,rIBASE 26 EXPORT_PC 27 movl offThread_method(rIBASE),rIBASE # rIBASE<- current method 28 movl offMethod_clazz(rIBASE),rIBASE # rIBASE<- method->clazz 29 SPILL_TMP1(%ecx) # save obj pointer across call 30 movl rIBASE,OUT_ARG0(%esp) # pass in method->clazz 31 call dvmResolveInstField # ... to dvmResolveInstField 32 UNSPILL_TMP1(%ecx) 33 testl %eax,%eax # returns InstrField ptr 34 jne .L${opcode}_finish 35 jmp common_exceptionThrown 36 37 .L${opcode}_finish: 38 /* 39 * Currently: 40 * eax holds resolved field 41 * ecx holds object 42 * rINST holds BBBB 43 */ 44 GET_VREG_R rINST rINST # rINST<- v[BBBB] 45 movl offInstField_byteOffset(%eax),%eax # eax<- byte offset of field 46 testl %ecx,%ecx # object null? 47 je common_errNullObject # object was null 48 $store $reg,(%ecx,%eax,1) # obj.field <- v[BBBB](8/16/32 bits) 49 FETCH_INST_OPCODE 5 %ecx 50 UNSPILL(rIBASE) 51 ADVANCE_PC 5 52 GOTO_NEXT_R %ecx 53