• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1%default { "load":"movl", "sqnum":"0" }
2%verify "executed"
3%verify "null object"
4%verify "field already resolved"
5%verify "field not yet resolved"
6%verify "field cannot be resolved"
7    /*
8     * Jumbo 32-bit instance field get.
9     *
10     * for: iget/jumbo, iget-object/jumbo, iget-boolean/jumbo, iget-byte/jumbo,
11     *      iget-char/jumbo, iget-short/jumbo
12     */
13    /* exop vBBBB, vCCCC, field@AAAAAAAA */
14    movl    rSELF,%ecx
15    SPILL(rIBASE)                               # preserve rIBASE
16    movl    2(rPC),rIBASE                       # rIBASE<- AAAAAAAA
17    movl    offThread_methodClassDex(%ecx),%eax # eax<- DvmDex
18    movzwl  8(rPC),%ecx                         # ecx<- CCCC
19    movl    offDvmDex_pResFields(%eax),%eax     # eax<- pDvmDex->pResFields
20    GET_VREG_R %ecx %ecx                        # ecx<- fp[CCCC], the object ptr
21    movl    (%eax,rIBASE,4),%eax                # resolved entry
22    testl   %eax,%eax                           # is resolved entry null?
23    jne     .L${opcode}_finish                  # no, already resolved
24    movl    rIBASE,OUT_ARG1(%esp)               # needed by dvmResolveInstField
25    movl    rSELF,rIBASE
26    EXPORT_PC
27    movl    offThread_method(rIBASE),rIBASE     # rIBASE<- current method
28    movl    offMethod_clazz(rIBASE),rIBASE      # rIBASE<- method->clazz
29    SPILL_TMP1(%ecx)                            # save obj pointer across call
30    movl    rIBASE,OUT_ARG0(%esp)               # pass in method->clazz
31    call    dvmResolveInstField                 #  ... to dvmResolveInstField
32    UNSPILL_TMP1(%ecx)
33    testl   %eax,%eax                           #  returns InstrField ptr
34    jne     .L${opcode}_finish
35    jmp     common_exceptionThrown
36
37.L${opcode}_finish:
38    /*
39     * Currently:
40     *   eax holds resolved field
41     *   ecx holds object
42     *   rINST holds BBBB
43     */
44    movl    offInstField_byteOffset(%eax),%eax  # eax<- byte offset of field
45    testl   %ecx,%ecx                           # object null?
46    je      common_errNullObject                # object was null
47    $load   (%ecx,%eax,1),%ecx                  # ecx<- obj.field (8/16/32 bits)
48    FETCH_INST_OPCODE 5 %eax
49    UNSPILL(rIBASE)                             # restore rIBASE
50    SET_VREG %ecx rINST
51    ADVANCE_PC 5
52    GOTO_NEXT_R %eax
53