Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
[arm] CheckConstPool between TurboFan instructions.
Browse files Browse the repository at this point in the history
Some TurboFan instructions block the literal pool for their entire
duration. If a long enough sequence of these instructions is
encountered, the literal pool can be blocked until it goes out of range.

Patch from issue 1236603002 at patchset 1 (http://crrev.com/1236603002#ps1).

BUG=v8:4292
LOG=y
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29587}
  • Loading branch information
bmeurer authored and Commit bot committed Jul 13, 2015
1 parent ad7f35c commit 3c9c774
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/arm/assembler-arm-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -433,9 +433,7 @@ void Assembler::CheckBuffer() {
if (buffer_space() <= kGap) {
GrowBuffer();
}
if (pc_offset() >= next_buffer_check_) {
CheckConstPool(false, true);
}
MaybeCheckConstPool();
}


Expand Down
6 changes: 6 additions & 0 deletions src/arm/assembler-arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -1492,6 +1492,12 @@ class Assembler : public AssemblerBase {
// Check if is time to emit a constant pool.
void CheckConstPool(bool force_emit, bool require_jump);

void MaybeCheckConstPool() {
if (pc_offset() >= next_buffer_check_) {
CheckConstPool(false, true);
}
}

int EmitEmbeddedConstantPool() {
DCHECK(FLAG_enable_embedded_constant_pool);
return constant_pool_builder_.Emit(this);
Expand Down
2 changes: 2 additions & 0 deletions src/compiler/arm/code-generator-arm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,8 @@ void CodeGenerator::AssembleDeconstructActivationRecord() {
void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
ArmOperandConverter i(this, instr);

masm()->MaybeCheckConstPool();

switch (ArchOpcodeField::decode(instr->opcode())) {
case kArchCallCodeObject: {
EnsureSpaceForLazyDeopt();
Expand Down

0 comments on commit 3c9c774

Please sign in to comment.