| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 [isize] "r" (isize), | 131 [isize] "r" (isize), |
| 132 [end] "r" (end) | 132 [end] "r" (end) |
| 133 // This code does not write to memory but without the dependency gcc might | 133 // This code does not write to memory but without the dependency gcc might |
| 134 // move this code before the code is generated. | 134 // move this code before the code is generated. |
| 135 : "cc", "memory" | 135 : "cc", "memory" |
| 136 ); // NOLINT | 136 ); // NOLINT |
| 137 #endif | 137 #endif |
| 138 } | 138 } |
| 139 | 139 |
| 140 | 140 |
| 141 void CPU::DebugBreak() { | |
| 142 #if defined(USE_SIMULATOR) | |
| 143 asm volatile("int $3"); | |
| 144 #else | |
| 145 asm volatile("hlt 0"); | |
| 146 #endif | |
| 147 } | |
| 148 | |
| 149 | |
| 150 void CpuFeatures::Probe() { | 141 void CpuFeatures::Probe() { |
| 151 // Compute I and D cache line size. The cache type register holds | 142 // Compute I and D cache line size. The cache type register holds |
| 152 // information about the caches. | 143 // information about the caches. |
| 153 uint32_t cache_type_register = GetCacheType(); | 144 uint32_t cache_type_register = GetCacheType(); |
| 154 | 145 |
| 155 static const int kDCacheLineSizeShift = 16; | 146 static const int kDCacheLineSizeShift = 16; |
| 156 static const int kICacheLineSizeShift = 0; | 147 static const int kICacheLineSizeShift = 0; |
| 157 static const uint32_t kDCacheLineSizeMask = 0xf << kDCacheLineSizeShift; | 148 static const uint32_t kDCacheLineSizeMask = 0xf << kDCacheLineSizeShift; |
| 158 static const uint32_t kICacheLineSizeMask = 0xf << kICacheLineSizeShift; | 149 static const uint32_t kICacheLineSizeMask = 0xf << kICacheLineSizeShift; |
| 159 | 150 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 // Copy the content of the cache type register to a core register. | 189 // Copy the content of the cache type register to a core register. |
| 199 __asm__ __volatile__ ("mrs %[ctr], ctr_el0" // NOLINT | 190 __asm__ __volatile__ ("mrs %[ctr], ctr_el0" // NOLINT |
| 200 : [ctr] "=r" (cache_type_register)); | 191 : [ctr] "=r" (cache_type_register)); |
| 201 return cache_type_register; | 192 return cache_type_register; |
| 202 #endif | 193 #endif |
| 203 } | 194 } |
| 204 | 195 |
| 205 } } // namespace v8::internal | 196 } } // namespace v8::internal |
| 206 | 197 |
| 207 #endif // V8_TARGET_ARCH_A64 | 198 #endif // V8_TARGET_ARCH_A64 |
| OLD | NEW |