Fix assertions wrt concurrent OSR.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20130 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
yangguo@chromium.org 2014-03-20 15:23:31 +00:00
parent 8f48dbb7d2
commit c9d391d87f
3 changed files with 9 additions and 7 deletions

View File

@ -4859,6 +4859,12 @@ void BackEdgeTable::PatchAt(Code* unoptimized_code,
Address branch_address = pc - 3 * kInstructionSize;
PatchingAssembler patcher(branch_address, 1);
ASSERT(Instruction::Cast(branch_address)
->IsNop(Assembler::INTERRUPT_CODE_NOP) ||
(Instruction::Cast(branch_address)->IsCondBranchImm() &&
Instruction::Cast(branch_address)->ImmPCOffset() ==
6 * kInstructionSize));
switch (target_state) {
case INTERRUPT:
// <decrement profiling counter>
@ -4868,8 +4874,6 @@ void BackEdgeTable::PatchAt(Code* unoptimized_code,
// ... more instructions.
// ok-label
// Jump offset is 6 instructions.
ASSERT(Instruction::Cast(branch_address)
->IsNop(Assembler::INTERRUPT_CODE_NOP));
patcher.b(6, pl);
break;
case ON_STACK_REPLACEMENT:
@ -4878,9 +4882,6 @@ void BackEdgeTable::PatchAt(Code* unoptimized_code,
// .. .. .. .. mov x0, x0 (NOP)
// .. .. .. .. ldr x16, pc+<on-stack replacement address>
// .. .. .. .. blr x16
ASSERT(Instruction::Cast(branch_address)->IsCondBranchImm());
ASSERT(Instruction::Cast(branch_address)->ImmPCOffset() ==
6 * kInstructionSize);
patcher.nop(Assembler::INTERRUPT_CODE_NOP);
break;
}

View File

@ -25,7 +25,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --noconcurrent-recompilation
// Flags: --allow-natives-syntax
// Flags: --noconcurrent-recompilation --noconcurrent-osr
if (%IsConcurrentRecompilationSupported()) {
print("Concurrent recompilation is turned on after all. Skipping this test.");

View File

@ -26,7 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --expose-debug-as debug --allow-natives-syntax
// Flags: --block-concurrent-recompilation
// Flags: --concurrent-recompilation --block-concurrent-recompilation
if (!%IsConcurrentRecompilationSupported()) {
print("Concurrent recompilation is disabled. Skipping this test.");