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 * 64-bit SGET handler. 8 */ 9 /* sget-wide vAA, field@BBBB */ 10 ldr r2, [rSELF, #offThread_methodClassDex] @ r2<- DvmDex 11 FETCH(r1, 1) @ r1<- field ref BBBB 12 ldr r10, [r2, #offDvmDex_pResFields] @ r10<- dvmDex->pResFields 13 ldr r0, [r10, r1, lsl #2] @ r0<- resolved StaticField ptr 14 cmp r0, #0 @ is resolved entry null? 15 beq .L${opcode}_resolve @ yes, do resolve 16 .L${opcode}_finish: 17 mov r9, rINST, lsr #8 @ r9<- AA 18 .if $volatile 19 add r0, r0, #offStaticField_value @ r0<- pointer to data 20 bl dvmQuasiAtomicRead64 @ r0/r1<- contents of field 21 .else 22 ldrd r0, [r0, #offStaticField_value] @ r0/r1<- field value (aligned) 23 .endif 24 add r9, rFP, r9, lsl #2 @ r9<- &fp[AA] 25 FETCH_ADVANCE_INST(2) @ advance rPC, load rINST 26 stmia r9, {r0-r1} @ vAA/vAA+1<- r0/r1 27 GET_INST_OPCODE(ip) @ extract opcode from rINST 28 GOTO_OPCODE(ip) @ jump to next instruction 29 %break 30 31 /* 32 * Continuation if the field has not yet been resolved. 33 * r1: BBBB field ref 34 * r10: dvmDex->pResFields 35 * 36 * Returns StaticField pointer in r0. 37 */ 38 .L${opcode}_resolve: 39 ldr r2, [rSELF, #offThread_method] @ r2<- current method 40 #if defined(WITH_JIT) 41 add r10, r10, r1, lsl #2 @ r1<- &dvmDex->pResFields[field] 42 #endif 43 EXPORT_PC() @ resolve() could throw, so export now 44 ldr r0, [r2, #offMethod_clazz] @ r0<- method->clazz 45 bl dvmResolveStaticField @ r0<- resolved StaticField ptr 46 cmp r0, #0 @ success? 47 beq common_exceptionThrown @ no, handle exception 48 #if defined(WITH_JIT) 49 /* 50 * If the JIT is actively building a trace we need to make sure 51 * that the field is fully resolved before including this instruction. 52 */ 53 bl common_verifyField 54 #endif 55 b .L${opcode}_finish @ resume 56