1 %default { "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 object field put. 9 */ 10 /* iput-object/jumbo vBBBB, vCCCC, field@AAAAAAAA */ 11 movl rSELF,%ecx 12 SPILL(rIBASE) 13 movl 2(rPC),rIBASE # rIBASE<- AAAAAAAA 14 movl offThread_methodClassDex(%ecx),%eax # eax<- DvmDex 15 movzwl 8(rPC),%ecx # ecx<- CCCC 16 movl offDvmDex_pResFields(%eax),%eax # eax<- pDvmDex->pResFields 17 GET_VREG_R %ecx %ecx # ecx<- fp[CCCC], the object ptr 18 movl (%eax,rIBASE,4),%eax # resolved entry 19 testl %eax,%eax # is resolved entry null? 20 jne .L${opcode}_finish # no, already resolved 21 movl rIBASE,OUT_ARG1(%esp) 22 movl rSELF,rIBASE 23 EXPORT_PC 24 movl offThread_method(rIBASE),rIBASE # rIBASE<- current method 25 movl offMethod_clazz(rIBASE),rIBASE # rIBASE<- method->clazz 26 SPILL_TMP1(%ecx) # save obj pointer across call 27 movl rIBASE,OUT_ARG0(%esp) # pass in method->clazz 28 call dvmResolveInstField # ... to dvmResolveInstField 29 UNSPILL_TMP1(%ecx) 30 testl %eax,%eax # returns InstrField ptr 31 jne .L${opcode}_finish 32 jmp common_exceptionThrown 33 34 .L${opcode}_finish: 35 /* 36 * Currently: 37 * eax holds resolved field 38 * ecx holds object 39 * rIBASE is scratch, but needs to be unspilled 40 * rINST holds BBBB 41 */ 42 GET_VREG_R rINST rINST # rINST<- v[BBBB] 43 movl offInstField_byteOffset(%eax),%eax # eax<- byte offset of field 44 testl %ecx,%ecx # object null? 45 je common_errNullObject # object was null 46 movl rINST,(%ecx,%eax) # obj.field <- v[BBBB](8/16/32 bits) 47 movl rSELF,%eax 48 testl rINST,rINST # stored a NULL? 49 movl offThread_cardTable(%eax),%eax # get card table base 50 je 1f # skip card mark if null store 51 shrl $$GC_CARD_SHIFT,%ecx # object head to card number 52 movb %al,(%eax,%ecx) # mark card using object head 53 1: 54 FETCH_INST_OPCODE 5 %ecx 55 UNSPILL(rIBASE) 56 ADVANCE_PC 5 57 GOTO_NEXT_R %ecx 58