OSDN Git Service

ART: Add missing EXPORT_PCs to x86/_64 mterp
authorbuzbee <buzbee@google.com>
Thu, 28 Apr 2016 23:08:44 +0000 (16:08 -0700)
committerbuzbee <buzbee@google.com>
Fri, 29 Apr 2016 15:51:25 +0000 (08:51 -0700)
Any time there is a possiblity that execution flow will leave
the mterp environment and transition either to an alternate
interpreter or compiled code, we need to export the cached copy of
the current Dalvik PC.  One path out related to on-stack-replacement
was missed in both x86 and x86_64 versions of mterp (other targets
are OK).

Note that there is an outstanding feature request to add support
to catch missing EXPORT_PCs (Bug: 26572899), though as envisioned
it would not have caught this one.

Bug: 28249238

(cherry picked from commit 963758dbfbbbc95bbfa82d5e02258d9fd481a459)

Change-Id: I3936509665636c0b77580dda12520a82ee814fa5

runtime/interpreter/mterp/out/mterp_x86.S
runtime/interpreter/mterp/out/mterp_x86_64.S
runtime/interpreter/mterp/x86/footer.S
runtime/interpreter/mterp/x86_64/footer.S

index e46f9cd..f78e1bc 100644 (file)
@@ -12985,6 +12985,7 @@ MterpCommonTakenBranch:
  * not-taken path.  All Dalvik not-taken conditional branch offsets are 2.
  */
 .L_check_not_taken_osr:
+    EXPORT_PC
     movl    rSELF, %eax
     movl    %eax, OUT_ARG0(%esp)
     leal    OFF_FP_SHADOWFRAME(rFP), %ecx
index 62dce6e..031cec8 100644 (file)
@@ -11961,6 +11961,7 @@ MterpCommonTakenBranch:
  * not-taken path.  All Dalvik not-taken conditional branch offsets are 2.
  */
 .L_check_not_taken_osr:
+    EXPORT_PC
     movq    rSELF, OUT_ARG0
     leaq    OFF_FP_SHADOWFRAME(rFP), OUT_ARG1
     movl    $2, OUT_32_ARG2
index fa03e78..e8c8ca8 100644 (file)
@@ -234,6 +234,7 @@ MterpCommonTakenBranch:
  * not-taken path.  All Dalvik not-taken conditional branch offsets are 2.
  */
 .L_check_not_taken_osr:
+    EXPORT_PC
     movl    rSELF, %eax
     movl    %eax, OUT_ARG0(%esp)
     leal    OFF_FP_SHADOWFRAME(rFP), %ecx
index 54d0cb1..f78f163 100644 (file)
@@ -213,6 +213,7 @@ MterpCommonTakenBranch:
  * not-taken path.  All Dalvik not-taken conditional branch offsets are 2.
  */
 .L_check_not_taken_osr:
+    EXPORT_PC
     movq    rSELF, OUT_ARG0
     leaq    OFF_FP_SHADOWFRAME(rFP), OUT_ARG1
     movl    $$2, OUT_32_ARG2