• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2%verify "String already resolved"
3%verify "String not yet resolved"
4%verify "String cannot be resolved"
5    /* const/string vAA, String@BBBBBBBB */
6    GET_GLUE(%ecx)
7    movl      2(rPC),%eax              # eax<- BBBBBBBB
8    movl      offGlue_methodClassDex(%ecx),%ecx# ecx<- glue->methodClassDex
9    movzbl    rINST_HI,rINST_FULL      # rINST_FULL<- AA
10    movl      offDvmDex_pResStrings(%ecx),%ecx # ecx<- dvmDex->pResStrings
11    movl      (%ecx,%eax,4),%eax       # eax<- rResString[BBBB]
12    movl      rINST_FULL,%ecx
13    FETCH_INST_WORD(3)
14    testl     %eax,%eax                # resolved yet?
15    je        .L${opcode}_resolve
16    SET_VREG(%eax,%ecx)                # vAA<- rResString[BBBB]
17    ADVANCE_PC(3)
18    GOTO_NEXT
19%break
20
21/* This is the less common path, so we'll redo some work
22   here rather than force spills on the common path */
23.L${opcode}_resolve:
24    GET_GLUE(%eax)
25    movl     %ecx,rINST_FULL           # rINST_FULL<- AA
26    EXPORT_PC()
27    movl     offGlue_method(%eax),%eax # eax<- glue->method
28    movl     2(rPC),%ecx               # ecx<- BBBBBBBB
29    movl     offMethod_clazz(%eax),%eax
30    SPILL(rPC)
31    movl     %ecx,OUT_ARG1(%esp)
32    movl     %eax,OUT_ARG0(%esp)
33    call     dvmResolveString          # go resolve
34    UNSPILL(rPC)
35    testl    %eax,%eax                 # failed?
36    je       common_exceptionThrown
37    SET_VREG(%eax,rINST_FULL)
38    FETCH_INST_WORD(3)
39    ADVANCE_PC(3)
40    GOTO_NEXT
41
42