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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 namespace internal { | 48 namespace internal { |
49 | 49 |
50 // CpuFeatures keeps track of which features are supported by the target CPU. | 50 // CpuFeatures keeps track of which features are supported by the target CPU. |
51 // Supported features must be enabled by a CpuFeatureScope before use. | 51 // Supported features must be enabled by a CpuFeatureScope before use. |
52 class CpuFeatures : public AllStatic { | 52 class CpuFeatures : public AllStatic { |
53 public: | 53 public: |
54 // Detect features of the target CPU. Set safe defaults if the serializer | 54 // Detect features of the target CPU. Set safe defaults if the serializer |
55 // is enabled (snapshots must be portable). | 55 // is enabled (snapshots must be portable). |
56 static void Probe(); | 56 static void Probe(); |
57 | 57 |
| 58 // Display target use when compiling. |
| 59 static void PrintTarget(); |
| 60 |
| 61 // Display features. |
| 62 static void PrintFeatures(); |
| 63 |
58 // Check whether a feature is supported by the target CPU. | 64 // Check whether a feature is supported by the target CPU. |
59 static bool IsSupported(CpuFeature f) { | 65 static bool IsSupported(CpuFeature f) { |
60 ASSERT(initialized_); | 66 ASSERT(initialized_); |
61 if (f == VFP3 && !FLAG_enable_vfp3) return false; | |
62 if (f == SUDIV && !FLAG_enable_sudiv) return false; | |
63 if (f == UNALIGNED_ACCESSES && !FLAG_enable_unaligned_accesses) { | |
64 return false; | |
65 } | |
66 if (f == VFP32DREGS && !FLAG_enable_32dregs) return false; | |
67 return (supported_ & (1u << f)) != 0; | 67 return (supported_ & (1u << f)) != 0; |
68 } | 68 } |
69 | 69 |
70 static bool IsFoundByRuntimeProbingOnly(CpuFeature f) { | 70 static bool IsFoundByRuntimeProbingOnly(CpuFeature f) { |
71 ASSERT(initialized_); | 71 ASSERT(initialized_); |
72 return (found_by_runtime_probing_only_ & | 72 return (found_by_runtime_probing_only_ & |
73 (static_cast<uint64_t>(1) << f)) != 0; | 73 (static_cast<uint64_t>(1) << f)) != 0; |
74 } | 74 } |
75 | 75 |
76 static bool IsSafeForSnapshot(CpuFeature f) { | 76 static bool IsSafeForSnapshot(CpuFeature f) { |
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1440 public: | 1440 public: |
1441 explicit EnsureSpace(Assembler* assembler) { | 1441 explicit EnsureSpace(Assembler* assembler) { |
1442 assembler->CheckBuffer(); | 1442 assembler->CheckBuffer(); |
1443 } | 1443 } |
1444 }; | 1444 }; |
1445 | 1445 |
1446 | 1446 |
1447 } } // namespace v8::internal | 1447 } } // namespace v8::internal |
1448 | 1448 |
1449 #endif // V8_ARM_ASSEMBLER_ARM_H_ | 1449 #endif // V8_ARM_ASSEMBLER_ARM_H_ |
OLD | NEW |