From 4e3364304b6ba0e05255166b9f0d4aecdaac947b Mon Sep 17 00:00:00 2001 From: "jochen@chromium.org" Date: Wed, 11 Jun 2014 18:12:03 +0000 Subject: [PATCH] Drop globals.h include from platform.h Also delete dead cpu-features-implied-by-platform code. BUG=none R=jkummerow@chromium.org LOG=n Review URL: https://codereview.chromium.org/326333002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21779 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/arm/assembler-arm.cc | 1 - src/ia32/assembler-ia32.cc | 1 - src/mips/assembler-mips.cc | 1 - src/platform-posix.cc | 5 ----- src/platform-win32.cc | 5 ----- src/platform.h | 9 +-------- src/x64/assembler-x64.cc | 2 -- src/x87/assembler-x87.cc | 1 - 8 files changed, 1 insertion(+), 24 deletions(-) diff --git a/src/arm/assembler-arm.cc b/src/arm/assembler-arm.cc index c3f9ab0..ca5aad3 100644 --- a/src/arm/assembler-arm.cc +++ b/src/arm/assembler-arm.cc @@ -72,7 +72,6 @@ static unsigned CpuFeaturesImpliedByCompiler() { void CpuFeatures::ProbeImpl(bool cross_compile) { - supported_ |= OS::CpuFeaturesImpliedByPlatform(); supported_ |= CpuFeaturesImpliedByCompiler(); cache_line_size_ = 64; diff --git a/src/ia32/assembler-ia32.cc b/src/ia32/assembler-ia32.cc index bc17b25..75cb6ed 100644 --- a/src/ia32/assembler-ia32.cc +++ b/src/ia32/assembler-ia32.cc @@ -52,7 +52,6 @@ void CpuFeatures::ProbeImpl(bool cross_compile) { CPU cpu; CHECK(cpu.has_sse2()); // SSE2 support is mandatory. CHECK(cpu.has_cmov()); // CMOV support is mandatory. - supported_ |= OS::CpuFeaturesImpliedByPlatform(); // Only use statically determined features for cross compile (snapshot). if (cross_compile) return; diff --git a/src/mips/assembler-mips.cc b/src/mips/assembler-mips.cc index 97aed6b..e4bebfe 100644 --- a/src/mips/assembler-mips.cc +++ b/src/mips/assembler-mips.cc @@ -87,7 +87,6 @@ const char* DoubleRegister::AllocationIndexToString(int index) { void CpuFeatures::ProbeImpl(bool cross_compile) { - supported_ |= OS::CpuFeaturesImpliedByPlatform(); supported_ |= CpuFeaturesImpliedByCompiler(); // Only use statically determined features for cross compile (snapshot). diff --git a/src/platform-posix.cc b/src/platform-posix.cc index e9e4161..87b96e2 100644 --- a/src/platform-posix.cc +++ b/src/platform-posix.cc @@ -56,11 +56,6 @@ namespace internal { static const pthread_t kNoThread = (pthread_t) 0; -unsigned OS::CpuFeaturesImpliedByPlatform() { - return 0; // Nothing special. -} - - int OS::NumberOfProcessorsOnline() { return static_cast(sysconf(_SC_NPROCESSORS_ONLN)); } diff --git a/src/platform-win32.cc b/src/platform-win32.cc index 03fb8b6..1caadbe 100644 --- a/src/platform-win32.cc +++ b/src/platform-win32.cc @@ -1158,11 +1158,6 @@ void OS::SignalCodeMovingGC() { } #endif // __MINGW32__ -unsigned OS::CpuFeaturesImpliedByPlatform() { - return 0; // Windows runs on anything. -} - - int OS::NumberOfProcessorsOnline() { SYSTEM_INFO info; GetSystemInfo(&info); diff --git a/src/platform.h b/src/platform.h index 2d5101d..3cec113 100644 --- a/src/platform.h +++ b/src/platform.h @@ -23,9 +23,9 @@ #include +#include "src/base/build_config.h" #include "src/platform/mutex.h" #include "src/platform/semaphore.h" -#include "src/globals.h" #include "src/vector.h" #ifdef __sun @@ -263,13 +263,6 @@ class OS { // using --never-compact) if accurate profiling is desired. static void SignalCodeMovingGC(); - // The return value indicates the CPU features we are sure of because of the - // OS. - // This is a little messy because the interpretation is subject to the cross - // of the CPU and the OS. The bits in the answer correspond to the bit - // positions indicated by the members of the CpuFeature enum from globals.h - static unsigned CpuFeaturesImpliedByPlatform(); - // Returns the number of processors online. static int NumberOfProcessorsOnline(); diff --git a/src/x64/assembler-x64.cc b/src/x64/assembler-x64.cc index e5855d3..59b027f 100644 --- a/src/x64/assembler-x64.cc +++ b/src/x64/assembler-x64.cc @@ -20,8 +20,6 @@ void CpuFeatures::ProbeImpl(bool cross_compile) { CHECK(cpu.has_sse2()); // SSE2 support is mandatory. CHECK(cpu.has_cmov()); // CMOV support is mandatory. - supported_ |= OS::CpuFeaturesImpliedByPlatform(); - // Only use statically determined features for cross compile (snapshot). if (cross_compile) return; diff --git a/src/x87/assembler-x87.cc b/src/x87/assembler-x87.cc index 3fbcff9..f2082c2 100644 --- a/src/x87/assembler-x87.cc +++ b/src/x87/assembler-x87.cc @@ -50,7 +50,6 @@ namespace internal { void CpuFeatures::ProbeImpl(bool cross_compile) { CPU cpu; - supported_ |= OS::CpuFeaturesImpliedByPlatform(); // Only use statically determined features for cross compile (snapshot). if (cross_compile) return; -- 2.7.4