[arm] CheckConstPool between TurboFan instructions.
authorbmeurer <bmeurer@chromium.org>
Mon, 13 Jul 2015 05:26:42 +0000 (22:26 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 13 Jul 2015 05:26:48 +0000 (05:26 +0000)
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}

src/arm/assembler-arm-inl.h
src/arm/assembler-arm.h
src/compiler/arm/code-generator-arm.cc

index 28a323ab519b3d03b14719505fd6262da5e07915..4b4e1d32080311da54dabb76e130275c55f53a71 100644 (file)
@@ -433,9 +433,7 @@ void Assembler::CheckBuffer() {
   if (buffer_space() <= kGap) {
     GrowBuffer();
   }
-  if (pc_offset() >= next_buffer_check_) {
-    CheckConstPool(false, true);
-  }
+  MaybeCheckConstPool();
 }
 
 
index 73c109972ed48e7e64a90a691bd6f3c427c4393d..1d09830c5126d0c3c2a82d30b1ff440b36b917cf 100644 (file)
@@ -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);
index 2b605460787f8a2846b6bd8af58abc3c6e7ee69d..0c97f846f0cff35eaccb09b24a02ca10f81dcca5 100644 (file)
@@ -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();