OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_PPC | 7 #if V8_TARGET_ARCH_PPC |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 void FullCodeGenerator::EmitProfilingCounterDecrement(int delta) { | 406 void FullCodeGenerator::EmitProfilingCounterDecrement(int delta) { |
407 __ mov(r5, Operand(profiling_counter_)); | 407 __ mov(r5, Operand(profiling_counter_)); |
408 __ LoadP(r6, FieldMemOperand(r5, Cell::kValueOffset)); | 408 __ LoadP(r6, FieldMemOperand(r5, Cell::kValueOffset)); |
409 __ SubSmiLiteral(r6, r6, Smi::FromInt(delta), r0); | 409 __ SubSmiLiteral(r6, r6, Smi::FromInt(delta), r0); |
410 __ StoreP(r6, FieldMemOperand(r5, Cell::kValueOffset), r0); | 410 __ StoreP(r6, FieldMemOperand(r5, Cell::kValueOffset), r0); |
411 } | 411 } |
412 | 412 |
413 | 413 |
414 void FullCodeGenerator::EmitProfilingCounterReset() { | 414 void FullCodeGenerator::EmitProfilingCounterReset() { |
415 int reset_value = FLAG_interrupt_budget; | 415 int reset_value = FLAG_interrupt_budget; |
416 if (info_->is_debug()) { | |
417 // Detect debug break requests as soon as possible. | |
418 reset_value = FLAG_interrupt_budget >> 4; | |
419 } | |
420 __ mov(r5, Operand(profiling_counter_)); | 416 __ mov(r5, Operand(profiling_counter_)); |
421 __ LoadSmiLiteral(r6, Smi::FromInt(reset_value)); | 417 __ LoadSmiLiteral(r6, Smi::FromInt(reset_value)); |
422 __ StoreP(r6, FieldMemOperand(r5, Cell::kValueOffset), r0); | 418 __ StoreP(r6, FieldMemOperand(r5, Cell::kValueOffset), r0); |
423 } | 419 } |
424 | 420 |
425 | 421 |
426 void FullCodeGenerator::EmitBackEdgeBookkeeping(IterationStatement* stmt, | 422 void FullCodeGenerator::EmitBackEdgeBookkeeping(IterationStatement* stmt, |
427 Label* back_edge_target) { | 423 Label* back_edge_target) { |
428 Comment cmnt(masm_, "[ Back edge bookkeeping"); | 424 Comment cmnt(masm_, "[ Back edge bookkeeping"); |
429 Label ok; | 425 Label ok; |
(...skipping 4979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5409 return ON_STACK_REPLACEMENT; | 5405 return ON_STACK_REPLACEMENT; |
5410 } | 5406 } |
5411 | 5407 |
5412 DCHECK(interrupt_address == | 5408 DCHECK(interrupt_address == |
5413 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5409 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5414 return OSR_AFTER_STACK_CHECK; | 5410 return OSR_AFTER_STACK_CHECK; |
5415 } | 5411 } |
5416 } // namespace internal | 5412 } // namespace internal |
5417 } // namespace v8 | 5413 } // namespace v8 |
5418 #endif // V8_TARGET_ARCH_PPC | 5414 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |