OP_SGET_JUMBO.S revision a8b91c52fd8a90b784835dfe1f8898035266c4dd
1%default { "barrier":" # no-op " } 2%verify "executed" 3%verify "field already resolved" 4%verify "field not yet resolved" 5%verify "field cannot be resolved" 6 /* 7 * Jumbo 32-bit SGET handler. 8 * 9 * for: sget/jumbo, sget-object/jumbo, sget-boolean/jumbo, sget-byte/jumbo, 10 * sget-char/jumbo, sget-short/jumbo 11 */ 12 /* exop vBBBB, field@AAAAAAAA */ 13 LOAD_rSELF_methodClassDex(a2) # a2 <- DvmDex 14 FETCH(a0, 1) # a0<- aaaa (lo) 15 FETCH(a1, 2) # a1<- AAAA (hi) 16 LOAD_base_offDvmDex_pResFields(rBIX, a2) # rBIX <- dvmDex->pResFields 17 sll a1,a1,16 18 or a1, a0, a1 # a1<- AAAAaaaa 19 LOAD_eas2(a0, rBIX, a1) # a0 <- resolved StaticField ptr 20 # is resolved entry !null? 21 bnez a0, .L${opcode}_finish 22 23 /* 24 * Continuation if the field has not yet been resolved. 25 * a1: AAAAAAAA field ref 26 * rBIX: dvmDex->pResFields 27 */ 28 LOAD_rSELF_method(a2) # a2 <- current method 29#if defined(WITH_JIT) 30 EAS2(rBIX, rBIX, a1) # rBIX<- &dvmDex->pResFields[field] 31#endif 32 EXPORT_PC() # resolve() could throw, so export now 33 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 34 JAL(dvmResolveStaticField) # v0 <- resolved StaticField ptr 35 move a0, v0 36 # success? 37 beqz v0, common_exceptionThrown # no, handle exception 38#if defined(WITH_JIT) 39 /* 40 * If the JIT is actively building a trace we need to make sure 41 * that the field is fully resolved before including this instruction. 42 */ 43 JAL(common_verifyField) 44#endif 45 b .L${opcode}_finish # resume 46%break 47 48.L${opcode}_finish: 49 LOAD_base_offStaticField_value(a1, a0) # a1 <- field value 50 $barrier # acquiring load 51 FETCH(a2, 3) # r2<- BBBB 52 FETCH_ADVANCE_INST(4) # advance rPC, load rINST 53 GET_INST_OPCODE(t0) # extract opcode from rINST 54 SET_VREG_GOTO(a1, a2, t0) # fp[BBBB] <- a1 55