1%default {"volatile":"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 /* iput-wide vA, vB, field@CCCC */ 8 mov r0, rINST, lsr #12 @ r0<- B 9 ldr r3, [rGLUE, #offGlue_methodClassDex] @ r3<- DvmDex 10 FETCH(r1, 1) @ r1<- field ref CCCC 11 ldr r2, [r3, #offDvmDex_pResFields] @ r2<- pResFields 12 GET_VREG(r9, r0) @ r9<- fp[B], the object pointer 13 ldr r0, [r2, r1, lsl #2] @ r0<- resolved InstField ptr 14 cmp r0, #0 @ is resolved entry null? 15 bne .L${opcode}_finish @ no, already resolved 168: ldr r2, [rGLUE, #offGlue_method] @ r2<- current method 17 EXPORT_PC() @ resolve() could throw 18 ldr r0, [r2, #offMethod_clazz] @ r0<- method->clazz 19 bl dvmResolveInstField @ r0<- resolved InstField ptr 20 cmp r0, #0 @ success? 21 bne .L${opcode}_finish @ yes, finish up 22 b common_exceptionThrown 23%break 24 25 /* 26 * Currently: 27 * r0 holds resolved field 28 * r9 holds object 29 */ 30.L${opcode}_finish: 31 mov r2, rINST, lsr #8 @ r2<- A+ 32 cmp r9, #0 @ check object for null 33 and r2, r2, #15 @ r2<- A 34 ldr r3, [r0, #offInstField_byteOffset] @ r3<- byte offset of field 35 add r2, rFP, r2, lsl #2 @ r3<- &fp[A] 36 beq common_errNullObject @ object was null 37 FETCH_ADVANCE_INST(2) @ advance rPC, load rINST 38 ldmia r2, {r0-r1} @ r0/r1<- fp[A] 39 GET_INST_OPCODE(r10) @ extract opcode from rINST 40 add r2, r9, r3 @ r2<- object + byte offset 41 .if $volatile 42 bl dvmQuasiAtomicSwap64 @ stores r0/r1 into addr r2 43 .else 44 stmia r2, {r0-r1} @ obj.field (64 bits, aligned)<- r0/r1 45 .endif 46 GOTO_OPCODE(r10) @ jump to next instruction 47