| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 // CPU specific code for arm independent of OS goes here. | 5 // CPU specific code for arm independent of OS goes here. |
| 6 | 6 |
| 7 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_ARM64 | 9 #if V8_TARGET_ARCH_ARM64 |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 return 4 << ((cache_type_register_ >> cache_line_size_shift) & 0xf); | 36 return 4 << ((cache_type_register_ >> cache_line_size_shift) & 0xf); |
| 37 } | 37 } |
| 38 | 38 |
| 39 uint32_t cache_type_register_; | 39 uint32_t cache_type_register_; |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 | 42 |
| 43 void CpuFeatures::FlushICache(void* address, size_t length) { | 43 void CpuFeatures::FlushICache(void* address, size_t length) { |
| 44 if (length == 0) return; | 44 if (length == 0) return; |
| 45 | 45 |
| 46 if (CpuFeatures::IsSupported(COHERENT_CACHE)) return; |
| 47 |
| 46 #ifdef USE_SIMULATOR | 48 #ifdef USE_SIMULATOR |
| 47 // TODO(all): consider doing some cache simulation to ensure every address | 49 // TODO(all): consider doing some cache simulation to ensure every address |
| 48 // run has been synced. | 50 // run has been synced. |
| 49 USE(address); | 51 USE(address); |
| 50 USE(length); | 52 USE(length); |
| 51 #else | 53 #else |
| 52 // The code below assumes user space cache operations are allowed. The goal | 54 // The code below assumes user space cache operations are allowed. The goal |
| 53 // of this routine is to make sure the code generated is visible to the I | 55 // of this routine is to make sure the code generated is visible to the I |
| 54 // side of the CPU. | 56 // side of the CPU. |
| 55 | 57 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 // This code does not write to memory but without the dependency gcc might | 116 // This code does not write to memory but without the dependency gcc might |
| 115 // move this code before the code is generated. | 117 // move this code before the code is generated. |
| 116 : "cc", "memory" | 118 : "cc", "memory" |
| 117 ); // NOLINT | 119 ); // NOLINT |
| 118 #endif | 120 #endif |
| 119 } | 121 } |
| 120 | 122 |
| 121 } } // namespace v8::internal | 123 } } // namespace v8::internal |
| 122 | 124 |
| 123 #endif // V8_TARGET_ARCH_ARM64 | 125 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |