OP_IPUT_WIDE.S revision 9f601a917c8878204482c37aec7005054b6776fa
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 put.
8     *
9     */
10    /* op vA, vB, field@CCCC */
11    movl    rSELF,%ecx
12    movzwl  2(rPC),%edx                         # edx<- 0000CCCC
13    movl    offThread_methodClassDex(%ecx),%eax   # eax<- DvmDex
14    movzbl  rINSTbl,%ecx                        # ecx<- BA
15    sarl    $$4,%ecx                            # ecx<- B
16    movl    offDvmDex_pResFields(%eax),%eax     # eax<- pDvmDex->pResFields
17    andb    $$0xf,rINSTbl                       # rINST<- A
18    GET_VREG_R %ecx %ecx                        # ecx<- fp[B], the object ptr
19    movl    (%eax,%edx,4),%eax                  # resolved entry
20    testl   %eax,%eax                           # is resolved entry null?
21    jne     .L${opcode}_finish                  # no, already resolved
22    movl    %edx,OUT_ARG1(%esp)
23    movl    rSELF,%edx
24    jmp     .L${opcode}_resolve
25%break
26
27
28.L${opcode}_resolve:
29    EXPORT_PC
30    movl    offThread_method(%edx),%edx           # edx<- current method
31    movl    offMethod_clazz(%edx),%edx          # edx<- method->clazz
32    SPILL_TMP1(%ecx)                            # save obj pointer across call
33    movl    %edx,OUT_ARG0(%esp)                 # pass in method->clazz
34    call    dvmResolveInstField                 #  ... to dvmResolveInstField
35    UNSPILL_TMP1(%ecx)
36    testl   %eax,%eax                           #  ... which returns InstrField ptr
37    jne     .L${opcode}_finish
38    jmp     common_exceptionThrown
39
40.L${opcode}_finish:
41    /*
42     * Currently:
43     *   eax holds resolved field
44     *   ecx holds object
45     *   %edx is scratch, but needs to be unspilled
46     *   rINST holds A
47     */
48    movl    offInstField_byteOffset(%eax),%eax  # eax<- byte offset of field
49    testl   %ecx,%ecx                           # object null?
50    je      common_errNullObject                # object was null
51    leal    (%ecx,%eax,1),%eax                  # eax<- address of field
52    GET_VREG_WORD %ecx rINST 0                  # ecx<- lsw
53    GET_VREG_WORD rINST rINST 1                 # rINST<- msw
54    FETCH_INST_OPCODE 2 %edx
55    movl    rINST,4(%eax)
56    movl    %ecx,(%eax)
57    ADVANCE_PC 2
58    GOTO_NEXT_R %edx
59