1 %default { "barrier":" # no-op " }
3 %verify "field already resolved"
4 %verify "field not yet resolved"
5 %verify "field cannot be resolved"
7 * General 32-bit SGET handler.
9 * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
11 # op vAA, field /* BBBB */
12 LOAD_rSELF_methodClassDex(a2) # a2 <- DvmDex
13 FETCH(a1, 1) # a1 <- field ref BBBB
14 LOAD_base_offDvmDex_pResFields(rBIX, a2) # rBIX <- dvmDex->pResFields
15 LOAD_eas2(a0, rBIX, a1) # a0 <- resolved StaticField ptr
16 # is resolved entry !null?
17 bnez a0, .L${opcode}_finish
20 * Continuation if the field has not yet been resolved.
22 * rBIX: dvmDex->pResFields
24 LOAD_rSELF_method(a2) # a2 <- current method
26 EAS2(rBIX, rBIX, a1) # rBIX<- &dvmDex->pResFields[field]
28 EXPORT_PC() # resolve() could throw, so export now
29 LOAD_base_offMethod_clazz(a0, a2) # a0 <- method->clazz
30 JAL(dvmResolveStaticField) # v0 <- resolved StaticField ptr
33 beqz v0, common_exceptionThrown # no, handle exception
36 * If the JIT is actively building a trace we need to make sure
37 * that the field is fully resolved before including this instruction.
39 JAL(common_verifyField)
41 b .L${opcode}_finish # resume
45 LOAD_base_offStaticField_value(a1, a0) # a1 <- field value
46 $barrier # acquiring load
47 GET_OPA(a2) # a2 <- AA
48 FETCH_ADVANCE_INST(2) # advance rPC, load rINST
49 GET_INST_OPCODE(t0) # extract opcode from rINST
50 SET_VREG_GOTO(a1, a2, t0) # fp[AA] <- a1