OP_CONST_STRING.S revision a8b91c52fd8a90b784835dfe1f8898035266c4dd
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             /* BBBB */
6    FETCH(a1, 1)                           #  a1 <- BBBB
7    LOAD_rSELF_methodClassDex(a2)          #  a2 <- self->methodClassDex
8    GET_OPA(rOBJ)                          #  rOBJ <- AA
9    LOAD_base_offDvmDex_pResStrings(a2, a2) #  a2 <- dvmDex->pResStrings
10    LOAD_eas2(v0, a2, a1)                  #  v0 <- pResStrings[BBBB]
11    # not yet resolved?
12    bnez      v0, .L${opcode}_resolve
13    /*
14     * Continuation if the String has not yet been resolved.
15     *  a1:   BBBB (String ref)
16     *  rOBJ: target register
17     */
18    EXPORT_PC()
19    LOAD_rSELF_method(a0)                  #  a0 <- self->method
20    LOAD_base_offMethod_clazz(a0, a0)      #  a0 <- method->clazz
21    JAL(dvmResolveString)                  #  v0 <- String reference
22    # failed?
23    beqz      v0, common_exceptionThrown   #  yup, handle the exception
24
25.L${opcode}_resolve:
26    FETCH_ADVANCE_INST(2)                  #  advance rPC, load rINST
27    GET_INST_OPCODE(t0)                    #  extract opcode from rINST
28    SET_VREG_GOTO(v0, rOBJ, t0)            #  vAA <- v0
29
30
31
32
33
34