From d9b31caab38e621e52f4bfe09e163d338b750b11 Mon Sep 17 00:00:00 2001 From: "jacob.bramley@arm.com" Date: Wed, 19 Feb 2014 14:37:18 +0000 Subject: [PATCH] A64: Fix r19474: Tidy up Push and Pop TODOs. This fixes some snapshot=off, debug-mode regressions. - Call CheckConstPool when entering InsturctionAccurateScopes. This fixes a problem in PushMultipleTimes where 'count' is very high. Each call to PushHelper starts an InstructionAccurateScope immediately after the last one finishes, with no opportunity for the constant pool to be generated. - Temporarily disable AssertStackConsistency in PrepareForPush. This assertion seems to push the code size too far, and several cctests (intermittently) fail due to buffer size limitations. I would like to renable this assertion later. BUG= R=ulan@chromium.org Review URL: https://codereview.chromium.org/172453002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19491 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/a64/macro-assembler-a64.cc | 3 ++- src/a64/macro-assembler-a64.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/a64/macro-assembler-a64.cc b/src/a64/macro-assembler-a64.cc index fe68b08..cd6b60a 100644 --- a/src/a64/macro-assembler-a64.cc +++ b/src/a64/macro-assembler-a64.cc @@ -1079,7 +1079,8 @@ void MacroAssembler::PopHelper(int count, int size, void MacroAssembler::PrepareForPush(Operand total_size) { - AssertStackConsistency(); + // TODO(jbramley): This assertion generates too much code in some debug tests. + // AssertStackConsistency(); if (csp.Is(StackPointer())) { // If the current stack pointer is csp, then it must be aligned to 16 bytes // on entry and the total size of the specified registers must also be a diff --git a/src/a64/macro-assembler-a64.h b/src/a64/macro-assembler-a64.h index 93e9e80..a4f68f0 100644 --- a/src/a64/macro-assembler-a64.h +++ b/src/a64/macro-assembler-a64.h @@ -2167,6 +2167,9 @@ class InstructionAccurateScope BASE_EMBEDDED { public: InstructionAccurateScope(MacroAssembler* masm, size_t count = 0) : masm_(masm), size_(count * kInstructionSize) { + // Before blocking the const pool, see if it needs to be emitted. + masm_->CheckConstPool(false, true); + masm_->StartBlockConstPool(); #ifdef DEBUG if (count != 0) { -- 2.7.4