OP_SPUT_WIDE.S revision 0c2dc522d0e120f346cf0a40c8cf0c93346131c2
1%verify "executed"
2%verify "field already resolved"
3%verify "field not yet resolved"
4%verify "field cannot be resolved"
5    /*
6     * General 32-bit SPUT handler.
7     *
8     * for: sput, sput-object, sput-boolean, sput-byte, sput-char, sput-short
9     */
10    /* op vAA, field@BBBB */
11    movl      rSELF,%ecx
12    movzwl    2(rPC),%eax                        # eax<- field ref BBBB
13    movl      offThread_methodClassDex(%ecx),%ecx  # ecx<- DvmDex
14    movl      offDvmDex_pResFields(%ecx),%ecx    # ecx<- dvmDex->pResFields
15#if defined(WITH_JIT)
16    movl      %ecx, TMP_SPILL1(%ebp)
17    lea       (%ecx,%eax,4),%ecx
18    movl      %ecx, TMP_SPILL2(%ebp)
19    movl      TMP_SPILL1(%ebp), %ecx
20#endif
21    movl      (%ecx,%eax,4),%eax                 # eax<- resolved StaticField ptr
22    testl     %eax,%eax                          # resolved entry null?
23    je        .L${opcode}_resolve                # if not, make it so
24.L${opcode}_finish:     # field ptr in eax
25    GET_VREG_WORD %ecx rINST 0                  # rINST<- lsw
26    GET_VREG_WORD rINST rINST 1                 # ecx<- msw
27    movl      %ecx,offStaticField_value(%eax)
28    FETCH_INST_OPCODE 2 %ecx
29    movl      rINST,4+offStaticField_value(%eax)
30    ADVANCE_PC 2
31    GOTO_NEXT_R %ecx
32
33    /*
34     * Go resolve the field
35     */
36.L${opcode}_resolve:
37    movl     rSELF,%ecx
38    movzwl   2(rPC),%eax                        # eax<- field ref BBBB
39    movl     offThread_method(%ecx),%ecx          # ecx<- current method
40    EXPORT_PC                                   # could throw, need to export
41    movl     offMethod_clazz(%ecx),%ecx         # ecx<- method->clazz
42    movl     %eax,OUT_ARG1(%esp)
43    movl     %ecx,OUT_ARG0(%esp)
44    SPILL(rIBASE)
45    call     dvmResolveStaticField              # eax<- resolved StaticField ptr
46    UNSPILL(rIBASE)
47    testl    %eax,%eax
48    je      common_exceptionThrown             # no, handle exception
49#if defined(WITH_JIT)
50    movl      TMP_SPILL2(%ebp), %ecx
51    SPILL(rIBASE)
52    call     common_verifyField
53    UNSPILL(rIBASE)
54#endif
55    jmp      .L${opcode}_finish                 # success, continue
56