From: ulan@chromium.org Date: Tue, 11 Sep 2012 11:36:48 +0000 (+0000) Subject: Fix delta computation in DoDeferredInstanceOfKnownGlobal() for ARM. X-Git-Tag: upstream/4.7.83~16032 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a9162af1af507a2feec8e397b27a71878e56a5a7;p=platform%2Fupstream%2Fv8.git Fix delta computation in DoDeferredInstanceOfKnownGlobal() for ARM. BUG=v8:2314 R=yangguo@chromium.org Review URL: https://chromiumcodereview.appspot.com/10908195 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12478 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc index 4be6d26..e9ba5ee 100644 --- a/src/arm/lithium-codegen-arm.cc +++ b/src/arm/lithium-codegen-arm.cc @@ -2472,12 +2472,18 @@ void LCodeGen::DoDeferredInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr, 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, diff --git a/test/mjsunit/mjsunit.status b/test/mjsunit/mjsunit.status index b63406d..357b33b 100644 --- a/test/mjsunit/mjsunit.status +++ b/test/mjsunit/mjsunit.status @@ -86,9 +86,7 @@ array-splice: PASS || TIMEOUT # 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