OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 <stdarg.h> | 5 #include <stdarg.h> |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "v8.h" | 9 #include "v8.h" |
10 | 10 |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
627 | 627 |
628 void Simulator::set_last_debugger_input(char* input) { | 628 void Simulator::set_last_debugger_input(char* input) { |
629 DeleteArray(last_debugger_input_); | 629 DeleteArray(last_debugger_input_); |
630 last_debugger_input_ = input; | 630 last_debugger_input_ = input; |
631 } | 631 } |
632 | 632 |
633 | 633 |
634 void Simulator::FlushICache(v8::internal::HashMap* i_cache, | 634 void Simulator::FlushICache(v8::internal::HashMap* i_cache, |
635 void* start_addr, | 635 void* start_addr, |
636 size_t size) { | 636 size_t size) { |
637 if (i_cache == NULL) return; | |
mvstanton
2014/05/06 09:55:46
The reason this condition was being hit at snapsho
| |
637 intptr_t start = reinterpret_cast<intptr_t>(start_addr); | 638 intptr_t start = reinterpret_cast<intptr_t>(start_addr); |
638 int intra_line = (start & CachePage::kLineMask); | 639 int intra_line = (start & CachePage::kLineMask); |
639 start -= intra_line; | 640 start -= intra_line; |
640 size += intra_line; | 641 size += intra_line; |
641 size = ((size - 1) | CachePage::kLineMask) + 1; | 642 size = ((size - 1) | CachePage::kLineMask) + 1; |
642 int offset = (start & CachePage::kPageMask); | 643 int offset = (start & CachePage::kPageMask); |
643 while (!AllOnOnePage(start, size - 1)) { | 644 while (!AllOnOnePage(start, size - 1)) { |
644 int bytes_to_flush = CachePage::kPageSize - offset; | 645 int bytes_to_flush = CachePage::kPageSize - offset; |
645 FlushOnePage(i_cache, start, bytes_to_flush); | 646 FlushOnePage(i_cache, start, bytes_to_flush); |
646 start += bytes_to_flush; | 647 start += bytes_to_flush; |
(...skipping 3182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3829 uintptr_t address = *stack_slot; | 3830 uintptr_t address = *stack_slot; |
3830 set_register(sp, current_sp + sizeof(uintptr_t)); | 3831 set_register(sp, current_sp + sizeof(uintptr_t)); |
3831 return address; | 3832 return address; |
3832 } | 3833 } |
3833 | 3834 |
3834 } } // namespace v8::internal | 3835 } } // namespace v8::internal |
3835 | 3836 |
3836 #endif // USE_SIMULATOR | 3837 #endif // USE_SIMULATOR |
3837 | 3838 |
3838 #endif // V8_TARGET_ARCH_ARM | 3839 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |