OP_SPUT_OBJECT_JUMBO.S revision a8b91c52fd8a90b784835dfe1f8898035266c4dd
1%default { "postbarrier":" # no-op ", "prebarrier":" # 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 SPUT handler for objects 8 */ 9 /* sput-object/jumbo vBBBB, field@AAAAAAAA */ 10 LOAD_rSELF_methodClassDex(a2) # a2 <- DvmDex 11 FETCH(a0, 1) # a0<- aaaa (lo) 12 FETCH(a1, 2) # a1<- AAAA (hi) 13 LOAD_base_offDvmDex_pResFields(rBIX, a2) # rBIX <- dvmDex->pResFields 14 sll a1,a1,16 15 or a1,a0,a1 # a1<- AAAAaaaa 16 17 LOAD_eas2(a0, rBIX, a1) # a0 <- resolved StaticField ptr 18 bnez a0, .L${opcode}_finish # is resolved entry null? 19 20 /* Continuation if the field has not yet been resolved. 21 * a1: BBBB field ref 22 * rBIX: dvmDex->pResFields 23 */ 24 LOAD_rSELF_method(a2) # a2 <- current method 25#if defined(WITH_JIT) 26 EAS2(rBIX, rBIX, a1) # rBIX<- &dvmDex->pResFields[field] 27#endif 28 EXPORT_PC() # resolve() may throw, so export now 29 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz 30 JAL(dvmResolveStaticField) # v0 <- resolved StaticField ptr 31 move a0, v0 32 beqz v0, common_exceptionThrown # success? no, handle exception 33#if defined(WITH_JIT) 34 /* 35 * If the JIT is actively building a trace we need to make sure 36 * that the field is fully resolved before including this instruction. 37 */ 38 JAL(common_verifyField) 39#endif 40 b .L${opcode}_finish # resume 41 42%break 43.L${opcode}_finish: # field ptr in a0 44 FETCH(a2, 3) # a2<- BBBB 45 FETCH_ADVANCE_INST(4) # advance rPC, load rINST 46 GET_VREG(a1, a2) # a1 <- fp[BBBB] 47 lw a2, offThread_cardTable(rSELF) # a2 <- card table base 48 lw t1, offField_clazz(a0) # t1 <- field->clazz 49 GET_INST_OPCODE(t0) # extract opcode from rINST 50 $prebarrier # releasing store 51 sw a1, offStaticField_value(a0) # field <- vBBBB 52 $postbarrier 53 beqz a1, 1f 54 srl t2, t1, GC_CARD_SHIFT 55 addu t3, a2, t2 56 sb a2, (t3) 57 1: 58 GOTO_OPCODE(t0) # jump to next instruction 59