OP_IGET_WIDE.S revision a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3
1%verify "executed"
2%verify "null object"
3%verify "field already resolved"
4%verify "field not yet resolved"
5%verify "field cannot be resolved"
6    /*
7     * 64-bit instance field get.
8     *
9     */
10    /* op vA, vB, field@CCCC */
11    movl    rSELF,%ecx
12    SPILL(rIBASE)                               # preserve rIBASE
13    movzwl  2(rPC),rIBASE                       # rIBASE<- 0000CCCC
14    movl    offThread_methodClassDex(%ecx),%eax # eax<- DvmDex
15    movzbl  rINSTbl,%ecx                        # ecx<- BA
16    sarl    $$4,%ecx                            # ecx<- B
17    movl    offDvmDex_pResFields(%eax),%eax     # eax<- pDvmDex->pResFields
18    andb    $$0xf,rINSTbl                       # rINST<- A
19    GET_VREG_R %ecx %ecx                        # ecx<- fp[B], the object ptr
20    movl    (%eax,rIBASE,4),%eax                # resolved entry
21    testl   %eax,%eax                           # is resolved entry null?
22    jne     .L${opcode}_finish                  # no, already resolved
23    movl    rIBASE,OUT_ARG1(%esp)               # for dvmResolveInstField
24    movl    rSELF,rIBASE
25    EXPORT_PC
26    movl    offThread_method(rIBASE),rIBASE     # rIBASE<- current method
27    movl    offMethod_clazz(rIBASE),rIBASE      # rIBASE<- method->clazz
28    SPILL_TMP1(%ecx)                            # save objpointer across call
29    movl    rPC,OUT_ARG0(%esp)                  # pass in method->clazz
30    call    dvmResolveInstField                 #  ... to dvmResolveInstField
31    UNSPILL_TMP1(%ecx)
32    testl   %eax,%eax                           # returns InstrField ptr
33    jne     .L${opcode}_finish
34    jmp     common_exceptionThrown
35
36.L${opcode}_finish:
37    /*
38     * Currently:
39     *   eax holds resolved field
40     *   ecx holds object
41     *   rINST holds A
42     */
43    movl    offInstField_byteOffset(%eax),%eax  # eax<- byte offset of field
44    testl   %ecx,%ecx                           # object null?
45    je      common_errNullObject                # object was null
46    leal    (%ecx,%eax,1),%eax                  # eax<- address of field
47    movl    (%eax),%ecx                         # ecx<- lsw
48    movl    4(%eax),%eax                        # eax<- msw
49    SET_VREG_WORD %ecx rINST 0
50    FETCH_INST_OPCODE 2 %ecx
51    UNSPILL(rIBASE)                             # restore rIBASE
52    SET_VREG_WORD %eax rINST 1
53    ADVANCE_PC 2
54    GOTO_NEXT_R %ecx
55