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}
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.
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
__ 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 __