| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 139 |
| 140 | 140 |
| 141 bool OS::ArmCpuHasFeature(CpuFeature feature) { | 141 bool OS::ArmCpuHasFeature(CpuFeature feature) { |
| 142 const char* search_string = NULL; | 142 const char* search_string = NULL; |
| 143 // Simple detection of VFP at runtime for Linux. | 143 // Simple detection of VFP at runtime for Linux. |
| 144 // It is based on /proc/cpuinfo, which reveals hardware configuration | 144 // It is based on /proc/cpuinfo, which reveals hardware configuration |
| 145 // to user-space applications. According to ARM (mid 2009), no similar | 145 // to user-space applications. According to ARM (mid 2009), no similar |
| 146 // facility is universally available on the ARM architectures, | 146 // facility is universally available on the ARM architectures, |
| 147 // so it's up to individual OSes to provide such. | 147 // so it's up to individual OSes to provide such. |
| 148 switch (feature) { | 148 switch (feature) { |
| 149 case VFP2: | |
| 150 search_string = "vfp"; | |
| 151 break; | |
| 152 case VFP3: | 149 case VFP3: |
| 153 search_string = "vfpv3"; | 150 search_string = "vfpv3"; |
| 154 break; | 151 break; |
| 155 case ARMv7: | 152 case ARMv7: |
| 156 search_string = "ARMv7"; | 153 search_string = "ARMv7"; |
| 157 break; | 154 break; |
| 158 case SUDIV: | 155 case SUDIV: |
| 159 search_string = "idiva"; | 156 search_string = "idiva"; |
| 160 break; | 157 break; |
| 161 case VFP32DREGS: | 158 case VFP32DREGS: |
| (...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1271 | 1268 |
| 1272 void OS::SetUp() { | 1269 void OS::SetUp() { |
| 1273 // Seed the random number generator. We preserve microsecond resolution. | 1270 // Seed the random number generator. We preserve microsecond resolution. |
| 1274 uint64_t seed = Ticks() ^ (getpid() << 16); | 1271 uint64_t seed = Ticks() ^ (getpid() << 16); |
| 1275 srandom(static_cast<unsigned int>(seed)); | 1272 srandom(static_cast<unsigned int>(seed)); |
| 1276 limit_mutex = CreateMutex(); | 1273 limit_mutex = CreateMutex(); |
| 1277 | 1274 |
| 1278 #ifdef __arm__ | 1275 #ifdef __arm__ |
| 1279 // When running on ARM hardware check that the EABI used by V8 and | 1276 // When running on ARM hardware check that the EABI used by V8 and |
| 1280 // by the C code is the same. | 1277 // by the C code is the same. |
| 1278 ASSERT(FLAG_enable_vfp2); // As of 3.18, VFP2 is required for V8 |
| 1281 bool hard_float = OS::ArmUsingHardFloat(); | 1279 bool hard_float = OS::ArmUsingHardFloat(); |
| 1282 if (hard_float) { | 1280 if (hard_float) { |
| 1283 #if !USE_EABI_HARDFLOAT | 1281 #if !USE_EABI_HARDFLOAT |
| 1284 PrintF("ERROR: Binary compiled with -mfloat-abi=hard but without " | 1282 PrintF("ERROR: Binary compiled with -mfloat-abi=hard but without " |
| 1285 "-DUSE_EABI_HARDFLOAT\n"); | 1283 "-DUSE_EABI_HARDFLOAT\n"); |
| 1286 exit(1); | 1284 exit(1); |
| 1287 #endif | 1285 #endif |
| 1288 } else { | 1286 } else { |
| 1289 #if USE_EABI_HARDFLOAT | 1287 #if USE_EABI_HARDFLOAT |
| 1290 PrintF("ERROR: Binary not compiled with -mfloat-abi=hard but with " | 1288 PrintF("ERROR: Binary not compiled with -mfloat-abi=hard but with " |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1327 | 1325 |
| 1328 | 1326 |
| 1329 void Sampler::Stop() { | 1327 void Sampler::Stop() { |
| 1330 ASSERT(IsActive()); | 1328 ASSERT(IsActive()); |
| 1331 SignalSender::RemoveActiveSampler(this); | 1329 SignalSender::RemoveActiveSampler(this); |
| 1332 SetActive(false); | 1330 SetActive(false); |
| 1333 } | 1331 } |
| 1334 | 1332 |
| 1335 | 1333 |
| 1336 } } // namespace v8::internal | 1334 } } // namespace v8::internal |
| OLD | NEW |