OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 #if (defined(__VFP_FP__) && !defined(__SOFTFP__)) | 88 #if (defined(__VFP_FP__) && !defined(__SOFTFP__)) |
89 // Here gcc is telling us that we are on an ARM and gcc is assuming that we | 89 // Here gcc is telling us that we are on an ARM and gcc is assuming that we |
90 // have VFP3 instructions. If gcc can assume it then so can we. | 90 // have VFP3 instructions. If gcc can assume it then so can we. |
91 return 1u << VFP3; | 91 return 1u << VFP3; |
92 #else | 92 #else |
93 return 0; // Linux runs on anything. | 93 return 0; // Linux runs on anything. |
94 #endif | 94 #endif |
95 } | 95 } |
96 | 96 |
97 | 97 |
98 double OS::nan_value() { | |
99 return NAN; | |
100 } | |
101 | |
102 | |
103 #ifdef __arm__ | 98 #ifdef __arm__ |
104 bool OS::ArmCpuHasFeature(CpuFeature feature) { | 99 bool OS::ArmCpuHasFeature(CpuFeature feature) { |
105 const char* search_string = NULL; | 100 const char* search_string = NULL; |
106 const char* file_name = "/proc/cpuinfo"; | 101 const char* file_name = "/proc/cpuinfo"; |
107 // Simple detection of VFP at runtime for Linux. | 102 // Simple detection of VFP at runtime for Linux. |
108 // It is based on /proc/cpuinfo, which reveals hardware configuration | 103 // It is based on /proc/cpuinfo, which reveals hardware configuration |
109 // to user-space applications. According to ARM (mid 2009), no similar | 104 // to user-space applications. According to ARM (mid 2009), no similar |
110 // facility is universally available on the ARM architectures, | 105 // facility is universally available on the ARM architectures, |
111 // so it's up to individual OSes to provide such. | 106 // so it's up to individual OSes to provide such. |
112 // | 107 // |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 | 799 |
805 // This sampler is no longer the active sampler. | 800 // This sampler is no longer the active sampler. |
806 active_sampler_ = NULL; | 801 active_sampler_ = NULL; |
807 active_ = false; | 802 active_ = false; |
808 } | 803 } |
809 | 804 |
810 | 805 |
811 #endif // ENABLE_LOGGING_AND_PROFILING | 806 #endif // ENABLE_LOGGING_AND_PROFILING |
812 | 807 |
813 } } // namespace v8::internal | 808 } } // namespace v8::internal |
OLD | NEW |