Reviewers: Yang,

Description:
Merged r12478 into 3.12 branch.

Fix delta computation in DoDeferredInstanceOfKnownGlobal() for ARM.

BUG=v8:2314

[email protected]


Please review this at https://chromiumcodereview.appspot.com/10937031/

SVN Base: https://v8.googlecode.com/svn/branches/3.12

Affected files:
  M src/arm/lithium-codegen-arm.cc
  M src/version.cc


Index: src/arm/lithium-codegen-arm.cc
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
index a0da25c2b1d561a4203556d46f02b5be4d8e933c..cf9dcd30fa4bed71ee837f0a0e34ad0985a6c4d4 100644
--- a/src/arm/lithium-codegen-arm.cc
+++ b/src/arm/lithium-codegen-arm.cc
@@ -2397,12 +2397,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,
Index: src/version.cc
diff --git a/src/version.cc b/src/version.cc
index e3a78193edfec9f95f606186e9ae05f04755f3d4..1d26d0008ec1ad5c22c8b7ba284d6283d9206ecf 100644
--- a/src/version.cc
+++ b/src/version.cc
@@ -35,7 +35,7 @@
 #define MAJOR_VERSION     3
 #define MINOR_VERSION     12
 #define BUILD_NUMBER      19
-#define PATCH_LEVEL       10
+#define PATCH_LEVEL       11
 // Use 1 for candidates and 0 otherwise.
 // (Boolean macro values are not supported by all preprocessors.)
 #define IS_CANDIDATE_VERSION 0


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

Reply via email to