OSDN Git Service

x86 mterp: fix cherry-pick/merge, issue 3095771
authorbuzbee <buzbee@google.com>
Thu, 14 Oct 2010 00:47:52 +0000 (17:47 -0700)
committerbuzbee <buzbee@google.com>
Thu, 14 Oct 2010 14:39:41 +0000 (07:39 -0700)
Bug http://b/issue?id=3095771

Change
https://android-git.corp.google.com/g/#change,70700
was a cherry-pick/merge of
https://android-git.corp.google.com/g/#change,70388

It was not properly merged, and resulting in the register holding
the object head to be trashed (and subsequently broke GC).

Change-Id: Ic480104e3a643a5b744d36eb0aefaedd3e4f925c

vm/mterp/out/InterpAsm-x86.S
vm/mterp/x86/OP_APUT_OBJECT.S

index 67df136..92b2d9d 100644 (file)
@@ -6951,9 +6951,9 @@ dvmAsmSisterStart:
     je        .LOP_APUT_OBJECT_skip_check
     SPILL(rPC)
     SPILL_TMP(%ecx)
+    movl      %eax,LOCAL0_OFFSET(%ebp)   # save copy of object head
     movl      offObject_clazz(%eax),%eax # eax<- arrayObj->clazz
     movl      offObject_clazz(rINST_FULL),%ecx # ecx<- obj->clazz
-    movl      %eax,LOCAL0_OFFSET(%ebp)  # save copy of object head
     movl      %eax,OUT_ARG1(%esp)
     movl      %ecx,OUT_ARG0(%esp)
     call      dvmCanPutArrayElement     # test object type vs. array type
index 18eb9f4..3cd9e0d 100644 (file)
@@ -29,9 +29,9 @@
     je        .L${opcode}_skip_check
     SPILL(rPC)
     SPILL_TMP(%ecx)
+    movl      %eax,LOCAL0_OFFSET(%ebp)   # save copy of object head
     movl      offObject_clazz(%eax),%eax # eax<- arrayObj->clazz
     movl      offObject_clazz(rINST_FULL),%ecx # ecx<- obj->clazz
-    movl      %eax,LOCAL0_OFFSET(%ebp)  # save copy of object head
     movl      %eax,OUT_ARG1(%esp)
     movl      %ecx,OUT_ARG0(%esp)
     call      dvmCanPutArrayElement     # test object type vs. array type