OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 <limits.h> | 5 #include <limits.h> |
6 #include <stdarg.h> | 6 #include <stdarg.h> |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "src/v8.h" | 10 #include "src/v8.h" |
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
802 int64_t intra_line = (start & CachePage::kLineMask); | 802 int64_t intra_line = (start & CachePage::kLineMask); |
803 start -= intra_line; | 803 start -= intra_line; |
804 size += intra_line; | 804 size += intra_line; |
805 size = ((size - 1) | CachePage::kLineMask) + 1; | 805 size = ((size - 1) | CachePage::kLineMask) + 1; |
806 int offset = (start & CachePage::kPageMask); | 806 int offset = (start & CachePage::kPageMask); |
807 while (!AllOnOnePage(start, size - 1)) { | 807 while (!AllOnOnePage(start, size - 1)) { |
808 int bytes_to_flush = CachePage::kPageSize - offset; | 808 int bytes_to_flush = CachePage::kPageSize - offset; |
809 FlushOnePage(i_cache, start, bytes_to_flush); | 809 FlushOnePage(i_cache, start, bytes_to_flush); |
810 start += bytes_to_flush; | 810 start += bytes_to_flush; |
811 size -= bytes_to_flush; | 811 size -= bytes_to_flush; |
812 DCHECK_EQ((uint64_t)0, start & CachePage::kPageMask); | 812 DCHECK_EQ((int64_t)0, start & CachePage::kPageMask); |
813 offset = 0; | 813 offset = 0; |
814 } | 814 } |
815 if (size != 0) { | 815 if (size != 0) { |
816 FlushOnePage(i_cache, start, size); | 816 FlushOnePage(i_cache, start, size); |
817 } | 817 } |
818 } | 818 } |
819 | 819 |
820 | 820 |
821 CachePage* Simulator::GetCachePage(v8::internal::HashMap* i_cache, void* page) { | 821 CachePage* Simulator::GetCachePage(v8::internal::HashMap* i_cache, void* page) { |
822 v8::internal::HashMap::Entry* entry = i_cache->Lookup(page, | 822 v8::internal::HashMap::Entry* entry = i_cache->Lookup(page, |
(...skipping 2625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3448 } | 3448 } |
3449 | 3449 |
3450 | 3450 |
3451 #undef UNSUPPORTED | 3451 #undef UNSUPPORTED |
3452 | 3452 |
3453 } } // namespace v8::internal | 3453 } } // namespace v8::internal |
3454 | 3454 |
3455 #endif // USE_SIMULATOR | 3455 #endif // USE_SIMULATOR |
3456 | 3456 |
3457 #endif // V8_TARGET_ARCH_MIPS64 | 3457 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |