OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions | 5 // modification, are permitted provided that the following conditions |
6 // are met: | 6 // are met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 namespace internal { | 51 namespace internal { |
52 | 52 |
53 // CpuFeatures keeps track of which features are supported by the target CPU. | 53 // CpuFeatures keeps track of which features are supported by the target CPU. |
54 // Supported features must be enabled by a CpuFeatureScope before use. | 54 // Supported features must be enabled by a CpuFeatureScope before use. |
55 class CpuFeatures : public AllStatic { | 55 class CpuFeatures : public AllStatic { |
56 public: | 56 public: |
57 // Detect features of the target CPU. Set safe defaults if the serializer | 57 // Detect features of the target CPU. Set safe defaults if the serializer |
58 // is enabled (snapshots must be portable). | 58 // is enabled (snapshots must be portable). |
59 static void Probe(); | 59 static void Probe(); |
60 | 60 |
| 61 // A special case for printing target and features, which we want to do |
| 62 // before initializing the isolate |
| 63 static void SetHintCreatingSnapshot(); |
| 64 static void ProbeWithoutIsolate(); |
| 65 |
61 // Display target use when compiling. | 66 // Display target use when compiling. |
62 static void PrintTarget(); | 67 static void PrintTarget(); |
63 | 68 |
64 // Display features. | 69 // Display features. |
65 static void PrintFeatures(); | 70 static void PrintFeatures(); |
66 | 71 |
67 // Check whether a feature is supported by the target CPU. | 72 // Check whether a feature is supported by the target CPU. |
68 static bool IsSupported(CpuFeature f) { | 73 static bool IsSupported(CpuFeature f) { |
69 ASSERT(initialized_); | 74 ASSERT(initialized_); |
70 return Check(f, supported_); | 75 return Check(f, supported_); |
(...skipping 16 matching lines...) Expand all Loading... |
87 return cross_compile_ == 0; | 92 return cross_compile_ == 0; |
88 } | 93 } |
89 | 94 |
90 static bool VerifyCrossCompiling(CpuFeature f) { | 95 static bool VerifyCrossCompiling(CpuFeature f) { |
91 unsigned mask = flag2set(f); | 96 unsigned mask = flag2set(f); |
92 return cross_compile_ == 0 || | 97 return cross_compile_ == 0 || |
93 (cross_compile_ & mask) == mask; | 98 (cross_compile_ & mask) == mask; |
94 } | 99 } |
95 | 100 |
96 private: | 101 private: |
| 102 static void Probe(bool serializer_enabled); |
| 103 static bool hint_creating_snapshot_; |
| 104 |
97 static bool Check(CpuFeature f, unsigned set) { | 105 static bool Check(CpuFeature f, unsigned set) { |
98 return (set & flag2set(f)) != 0; | 106 return (set & flag2set(f)) != 0; |
99 } | 107 } |
100 | 108 |
101 static unsigned flag2set(CpuFeature f) { | 109 static unsigned flag2set(CpuFeature f) { |
102 return 1u << f; | 110 return 1u << f; |
103 } | 111 } |
104 | 112 |
105 #ifdef DEBUG | 113 #ifdef DEBUG |
106 static bool initialized_; | 114 static bool initialized_; |
(...skipping 1582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1689 public: | 1697 public: |
1690 explicit EnsureSpace(Assembler* assembler) { | 1698 explicit EnsureSpace(Assembler* assembler) { |
1691 assembler->CheckBuffer(); | 1699 assembler->CheckBuffer(); |
1692 } | 1700 } |
1693 }; | 1701 }; |
1694 | 1702 |
1695 | 1703 |
1696 } } // namespace v8::internal | 1704 } } // namespace v8::internal |
1697 | 1705 |
1698 #endif // V8_ARM_ASSEMBLER_ARM_H_ | 1706 #endif // V8_ARM_ASSEMBLER_ARM_H_ |
OLD | NEW |