OSDN Git Service

Fix JUMBO failures
authorbuzbee <buzbee@google.com>
Sun, 6 Mar 2011 21:14:46 +0000 (13:14 -0800)
committerbuzbee <buzbee@google.com>
Sun, 6 Mar 2011 21:14:46 +0000 (13:14 -0800)
Fix some failures w/ the new Dalvik JUMBO opcodes on the x86 and portable
interpreters.  These showed up on dalvik/test/089-jumbo-opcodes when
running with:

    run-test --host 089              # x86 host-mode
    run-test --portable --host 089   # portable host-mode
    run-test --portable 089          # on device, portable

Change-Id: I520c8d2e001db95aa7525e4ffde7a81e2e786d38

vm/mterp/c/OP_THROW_VERIFICATION_ERROR_JUMBO.c
vm/mterp/out/InterpAsm-x86.S
vm/mterp/out/InterpC-allstubs.c
vm/mterp/out/InterpC-portdbg.c
vm/mterp/out/InterpC-portstd.c
vm/mterp/x86/OP_CONST_CLASS_JUMBO.S

index 764245a..c4607ec 100644 (file)
@@ -1,7 +1,7 @@
 HANDLE_OPCODE(OP_THROW_VERIFICATION_ERROR_JUMBO)
     EXPORT_PC();
-    vsrc1 = FETCH(1);
-    ref = FETCH(2) | (u4)FETCH(3) << 16;      /* class/field/method ref */
+    vsrc1 = FETCH(3);
+    ref = FETCH(1) | (u4)FETCH(2) << 16;      /* class/field/method ref */
     dvmThrowVerificationError(curMethod, vsrc1, ref);
     GOTO_exceptionThrown();
 OP_END
index 13fffb0..1c86f46 100644 (file)
@@ -7955,8 +7955,8 @@ dvmAsmInstructionStartCode = .L_OP_NOP
     movl      2(rPC),%eax              # eax<- AAAAAAAA
     movl      offThread_methodClassDex(%ecx),%ecx# ecx<- self->methodClassDex
     movl      offDvmDex_pResClasses(%ecx),%ecx # ecx<- dvmDex->pResClasses
-    FETCH_INST_OPCODE 4 %ecx
     movl      (%ecx,%eax,4),%eax       # eax<- rResClasses[AAAAAAAA]
+    FETCH_INST_OPCODE 4 %ecx
     testl     %eax,%eax                # resolved yet?
     je        .LOP_CONST_CLASS_JUMBO_resolve
     SET_VREG  %eax rINST               # vBBBB<- rResClasses[AAAAAAAA]
index fdc20aa..a8a663e 100644 (file)
@@ -4351,8 +4351,8 @@ OP_END
 /* File: c/OP_THROW_VERIFICATION_ERROR_JUMBO.c */
 HANDLE_OPCODE(OP_THROW_VERIFICATION_ERROR_JUMBO)
     EXPORT_PC();
-    vsrc1 = FETCH(1);
-    ref = FETCH(2) | (u4)FETCH(3) << 16;      /* class/field/method ref */
+    vsrc1 = FETCH(3);
+    ref = FETCH(1) | (u4)FETCH(2) << 16;      /* class/field/method ref */
     dvmThrowVerificationError(curMethod, vsrc1, ref);
     GOTO_exceptionThrown();
 OP_END
index 1310926..c159bc7 100644 (file)
@@ -4714,8 +4714,8 @@ OP_END
 /* File: c/OP_THROW_VERIFICATION_ERROR_JUMBO.c */
 HANDLE_OPCODE(OP_THROW_VERIFICATION_ERROR_JUMBO)
     EXPORT_PC();
-    vsrc1 = FETCH(1);
-    ref = FETCH(2) | (u4)FETCH(3) << 16;      /* class/field/method ref */
+    vsrc1 = FETCH(3);
+    ref = FETCH(1) | (u4)FETCH(2) << 16;      /* class/field/method ref */
     dvmThrowVerificationError(curMethod, vsrc1, ref);
     GOTO_exceptionThrown();
 OP_END
index dd91e25..3d8fe6a 100644 (file)
@@ -4464,8 +4464,8 @@ OP_END
 /* File: c/OP_THROW_VERIFICATION_ERROR_JUMBO.c */
 HANDLE_OPCODE(OP_THROW_VERIFICATION_ERROR_JUMBO)
     EXPORT_PC();
-    vsrc1 = FETCH(1);
-    ref = FETCH(2) | (u4)FETCH(3) << 16;      /* class/field/method ref */
+    vsrc1 = FETCH(3);
+    ref = FETCH(1) | (u4)FETCH(2) << 16;      /* class/field/method ref */
     dvmThrowVerificationError(curMethod, vsrc1, ref);
     GOTO_exceptionThrown();
 OP_END
index 44162da..ce64823 100644 (file)
@@ -6,8 +6,8 @@
     movl      2(rPC),%eax              # eax<- AAAAAAAA
     movl      offThread_methodClassDex(%ecx),%ecx# ecx<- self->methodClassDex
     movl      offDvmDex_pResClasses(%ecx),%ecx # ecx<- dvmDex->pResClasses
-    FETCH_INST_OPCODE 4 %ecx
     movl      (%ecx,%eax,4),%eax       # eax<- rResClasses[AAAAAAAA]
+    FETCH_INST_OPCODE 4 %ecx
     testl     %eax,%eax                # resolved yet?
     je        .L${opcode}_resolve
     SET_VREG  %eax rINST               # vBBBB<- rResClasses[AAAAAAAA]