1 %default {"volatile":"0"} 2 %verify "executed" 3 %verify "field already resolved" 4 %verify "field not yet resolved" 5 %verify "field cannot be resolved" 6 /* 7 * Jumbo 64-bit SPUT handler. 8 */ 9 /* sput-wide/jumbo vBBBB, field@AAAAAAAA */ 10 ldr r0, [rSELF, #offThread_methodClassDex] @ r0<- DvmDex 11 FETCH(r1, 1) @ r1<- aaaa (lo) 12 FETCH(r2, 2) @ r2<- AAAA (hi) 13 ldr r10, [r0, #offDvmDex_pResFields] @ r10<- dvmDex->pResFields 14 orr r1, r1, r2, lsl #16 @ r1<- AAAAaaaa 15 FETCH(r9, 3) @ r9<- BBBB 16 ldr r2, [r10, r1, lsl #2] @ r2<- resolved StaticField ptr 17 add r9, rFP, r9, lsl #2 @ r9<- &fp[BBBB] 18 cmp r2, #0 @ is resolved entry null? 19 beq .L${opcode}_resolve @ yes, do resolve 20 .L${opcode}_finish: @ field ptr in r2, BBBB in r9 21 FETCH_ADVANCE_INST(4) @ advance rPC, load rINST 22 ldmia r9, {r0-r1} @ r0/r1<- vBBBB/vBBBB+1 23 GET_INST_OPCODE(r10) @ extract opcode from rINST 24 .if $volatile 25 add r2, r2, #offStaticField_value @ r2<- pointer to data 26 bl dvmQuasiAtomicSwap64Sync @ stores r0/r1 into addr r2 27 .else 28 strd r0, [r2, #offStaticField_value] @ field<- vBBBB/vBBBB+1 29 .endif 30 GOTO_OPCODE(r10) @ jump to next instruction 31 %break 32 33 /* 34 * Continuation if the field has not yet been resolved. 35 * r1: AAAAAAAA field ref 36 * r9: &fp[BBBB] 37 * r10: dvmDex->pResFields 38 * 39 * Returns StaticField pointer in r2. 40 */ 41 .L${opcode}_resolve: 42 ldr r2, [rSELF, #offThread_method] @ r2<- current method 43 #if defined(WITH_JIT) 44 add r10, r10, r1, lsl #2 @ r10<- &dvmDex->pResFields[field] 45 #endif 46 EXPORT_PC() @ resolve() could throw, so export now 47 ldr r0, [r2, #offMethod_clazz] @ r0<- method->clazz 48 bl dvmResolveStaticField @ r0<- resolved StaticField ptr 49 cmp r0, #0 @ success? 50 mov r2, r0 @ copy to r2 51 beq common_exceptionThrown @ no, handle exception 52 #if defined(WITH_JIT) 53 /* 54 * If the JIT is actively building a trace we need to make sure 55 * that the field is fully resolved before including this instruction. 56 */ 57 bl common_verifyField 58 #endif 59 b .L${opcode}_finish @ resume 60