Revision: 12478
Author:   [email protected]
Date:     Tue Sep 11 04:36:48 2012
Log: Fix delta computation in DoDeferredInstanceOfKnownGlobal() for ARM.

BUG=v8:2314

[email protected]

Review URL: https://chromiumcodereview.appspot.com/10908195
http://code.google.com/p/v8/source/detail?r=12478

Modified:
 /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc
 /branches/bleeding_edge/test/mjsunit/mjsunit.status

=======================================
--- /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc Mon Sep 10 01:35:26 2012 +++ /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc Tue Sep 11 04:36:48 2012
@@ -2472,12 +2472,18 @@
   Register temp = ToRegister(instr->TempAt(0));
   ASSERT(temp.is(r4));
   __ LoadHeapObject(InstanceofStub::right(), instr->function());
-  static const int kAdditionalDelta = 4;
+  static const int kAdditionalDelta = 5;
int delta = masm_->InstructionsGeneratedSince(map_check) + kAdditionalDelta;
   Label before_push_delta;
   __ bind(&before_push_delta);
   __ BlockConstPoolFor(kAdditionalDelta);
   __ mov(temp, Operand(delta * kPointerSize));
+ // The mov above can generate one or two instructions. The delta was computed + // for two instructions, so we need to pad here in case of one instruction.
+  if (masm_->InstructionsGeneratedSince(&before_push_delta) != 2) {
+    ASSERT_EQ(1, masm_->InstructionsGeneratedSince(&before_push_delta));
+    __ nop();
+  }
   __ StoreToSafepointRegisterSlot(temp, temp);
   CallCodeGeneric(stub.GetCode(),
                   RelocInfo::CODE_TARGET,
=======================================
--- /branches/bleeding_edge/test/mjsunit/mjsunit.status Mon Sep 10 16:17:04 2012 +++ /branches/bleeding_edge/test/mjsunit/mjsunit.status Tue Sep 11 04:36:48 2012
@@ -86,9 +86,7 @@

 # Long running test.
 string-indexof-2: PASS || TIMEOUT
-# BUG(2314): Crankshaft generates incorrect (crashing) code on ARM
-# mirror-object: PASS || TIMEOUT
-mirror-object: SKIP
+mirror-object: PASS || TIMEOUT

 # BUG(3251035): Timeouts in long looping crankshaft optimization
 # tests. Skipping because having them timeout takes too long on the

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to