1%verify "executed" 2%verify "String already resolved" 3%verify "String not yet resolved" 4%verify "String cannot be resolved" 5 /* const/string vAA, String@BBBBBBBB */ 6 FETCH(r0, 1) @ r0<- bbbb (low) 7 FETCH(r1, 2) @ r1<- BBBB (high) 8 ldr r2, [rGLUE, #offGlue_methodClassDex] @ r2<- glue->methodClassDex 9 mov r9, rINST, lsr #8 @ r9<- AA 10 ldr r2, [r2, #offDvmDex_pResStrings] @ r2<- dvmDex->pResStrings 11 orr r1, r0, r1, lsl #16 @ r1<- BBBBbbbb 12 ldr r0, [r2, r1, lsl #2] @ r0<- pResStrings[BBBB] 13 cmp r0, #0 14 beq .L${opcode}_resolve 15 FETCH_ADVANCE_INST(3) @ advance rPC, load rINST 16 GET_INST_OPCODE(ip) @ extract opcode from rINST 17 SET_VREG(r0, r9) @ vAA<- r0 18 GOTO_OPCODE(ip) @ jump to next instruction 19%break 20 21 /* 22 * Continuation if the String has not yet been resolved. 23 * r1: BBBBBBBB (String ref) 24 * r9: target register 25 */ 26.L${opcode}_resolve: 27 EXPORT_PC() 28 ldr r0, [rGLUE, #offGlue_method] @ r0<- glue->method 29 ldr r0, [r0, #offMethod_clazz] @ r0<- method->clazz 30 bl dvmResolveString @ r0<- String reference 31 cmp r0, #0 @ failed? 32 beq common_exceptionThrown @ yup, handle the exception 33 FETCH_ADVANCE_INST(3) @ advance rPC, load rINST 34 GET_INST_OPCODE(ip) @ extract opcode from rINST 35 SET_VREG(r0, r9) @ vAA<- r0 36 GOTO_OPCODE(ip) @ jump to next instruction 37 38