| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 return (IsSupported(f) && | 61 return (IsSupported(f) && |
| 62 (!Serializer::enabled() || !IsFoundByRuntimeProbingOnly(f))); | 62 (!Serializer::enabled() || !IsFoundByRuntimeProbingOnly(f))); |
| 63 } | 63 } |
| 64 | 64 |
| 65 // I and D cache line size in bytes. | 65 // I and D cache line size in bytes. |
| 66 static unsigned dcache_line_size(); | 66 static unsigned dcache_line_size(); |
| 67 static unsigned icache_line_size(); | 67 static unsigned icache_line_size(); |
| 68 | 68 |
| 69 static unsigned supported_; | 69 static unsigned supported_; |
| 70 | 70 |
| 71 static bool VerifyCrossCompiling() { |
| 72 // There are no optional features for A64. |
| 73 ASSERT(cross_compile_ == 0); |
| 74 return true; |
| 75 } |
| 76 |
| 77 static bool VerifyCrossCompiling(CpuFeature f) { |
| 78 // There are no optional features for A64. |
| 79 USE(f); |
| 80 ASSERT(cross_compile_ == 0); |
| 81 return true; |
| 82 } |
| 83 |
| 71 private: | 84 private: |
| 72 // Return the content of the cache type register. | 85 // Return the content of the cache type register. |
| 73 static uint32_t GetCacheType(); | 86 static uint32_t GetCacheType(); |
| 74 | 87 |
| 75 // I and D cache line size in bytes. | 88 // I and D cache line size in bytes. |
| 76 static unsigned icache_line_size_; | 89 static unsigned icache_line_size_; |
| 77 static unsigned dcache_line_size_; | 90 static unsigned dcache_line_size_; |
| 78 | 91 |
| 79 #ifdef DEBUG | 92 #ifdef DEBUG |
| 80 static bool initialized_; | 93 static bool initialized_; |
| 81 #endif | 94 #endif |
| 82 | 95 |
| 83 // This isn't used (and is always 0), but it is required by V8. | 96 // This isn't used (and is always 0), but it is required by V8. |
| 84 static unsigned found_by_runtime_probing_only_; | 97 static unsigned found_by_runtime_probing_only_; |
| 85 | 98 |
| 99 static unsigned cross_compile_; |
| 100 |
| 86 friend class PlatformFeatureScope; | 101 friend class PlatformFeatureScope; |
| 87 DISALLOW_COPY_AND_ASSIGN(CpuFeatures); | 102 DISALLOW_COPY_AND_ASSIGN(CpuFeatures); |
| 88 }; | 103 }; |
| 89 | 104 |
| 90 } } // namespace v8::internal | 105 } } // namespace v8::internal |
| 91 | 106 |
| 92 #endif // V8_A64_CPU_A64_H_ | 107 #endif // V8_A64_CPU_A64_H_ |
| OLD | NEW |