[arm] Don't call branch_offset within CheckConstPool.
authorbmeurer <bmeurer@chromium.org>
Thu, 9 Jul 2015 10:32:23 +0000 (03:32 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 9 Jul 2015 10:32:28 +0000 (10:32 +0000)
This basically means that we must not use the b(Label*) version here,
but the b(int) version instead to jump over the constant pool.

BUG=v8:4292
LOG=y

Review URL: https://codereview.chromium.org/1224243002

Cr-Commit-Position: refs/heads/master@{#29552}

src/arm/assembler-arm.cc
test/cctest/test-assembler-arm.cc

index 7278659..96bdf79 100644 (file)
@@ -3838,10 +3838,7 @@ void Assembler::CheckConstPool(bool force_emit, bool require_jump) {
     bind(&size_check);
 
     // Emit jump over constant pool if necessary.
-    Label after_pool;
-    if (require_jump) {
-      b(&after_pool);
-    }
+    if (require_jump) b(size - kPcLoadDelta);
 
     // Put down constant pool marker "Undefined instruction".
     // The data size helps disassembly know what to print.
@@ -3925,10 +3922,6 @@ void Assembler::CheckConstPool(bool force_emit, bool require_jump) {
     RecordComment("]");
 
     DCHECK_EQ(size, SizeOfCodeGeneratedSince(&size_check));
-
-    if (after_pool.is_linked()) {
-      bind(&after_pool);
-    }
   }
 
   // Since a constant pool was just emitted, move the check offset forward by
index 06b8d81..8f93150 100644 (file)
@@ -2027,4 +2027,17 @@ TEST(regress4292_blx) {
   __ bind(&end);
 }
 
+
+TEST(regress4292_CheckConstPool) {
+  CcTest::InitializeVM();
+  Isolate* isolate = CcTest::i_isolate();
+  HandleScope scope(isolate);
+
+  Assembler assm(isolate, NULL, 0);
+  __ mov(r0, Operand(isolate->factory()->infinity_value()));
+  __ BlockConstPoolFor(1019);
+  for (int i = 0; i < 1019; ++i) __ nop();
+  __ vldr(d0, MemOperand(r0, 0));
+}
+
 #undef __