Chromium Code Reviews| Index: src/a64/lithium-codegen-a64.cc |
| diff --git a/src/a64/lithium-codegen-a64.cc b/src/a64/lithium-codegen-a64.cc |
| index eaeb9cee9041b2c621d0af99082553167904fe99..a753990604c94ca1845231b426ef14e45033c257 100644 |
| --- a/src/a64/lithium-codegen-a64.cc |
| +++ b/src/a64/lithium-codegen-a64.cc |
| @@ -958,14 +958,25 @@ bool LCodeGen::DeoptimizeHeader(LEnvironment* environment) { |
| return false; |
| } |
| - ASSERT(FLAG_deopt_every_n_times < 2); // Other values not supported on A64. |
| - TODO_UNIMPLEMENTED("Support for FLAG_deopt_every_n_times >= 2."); |
| - if (FLAG_deopt_every_n_times == 1 && |
| - !info()->IsStub() && |
| - info()->opt_count() == id) { |
| - ASSERT(frame_is_built_); |
| + if (FLAG_deopt_every_n_times != 0 && !info()->IsStub()) { |
| + Label not_zero; |
| + ExternalReference count = ExternalReference::stress_deopt_count(isolate()); |
| + |
| + __ Push(x0, x1); |
| + __ Mov(x0, Operand(count)); |
| + __ Ldr(w1, MemOperand(x0)); |
| + __ Subs(x1, x1, 1); |
| + __ B(gt, ¬_zero); |
| + __ Mov(w1, FLAG_deopt_every_n_times); |
| + __ Str(w1, MemOperand(x0)); |
| + __ Pop(x0, x1); |
| __ Call(entry, RelocInfo::RUNTIME_ENTRY); |
|
ulan
2014/02/10 15:21:40
This works only if (frame_is_built_ && !info()->sa
jochen (gone - plz use gerrit)
2014/02/10 16:05:59
Before I added the jump table, we would always use
|
| - return false; |
| + __ Unreachable(); |
| + |
| + __ Bind(¬_zero); |
| + __ Str(w1, MemOperand(x0)); |
| + __ Pop(x0, x1); |
| + return true; |
| } |
| return true; |