Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Side by Side Diff: src/ia32/assembler-ia32.cc

Issue 258993002: Simplified CPU/CpuFeatures a bit. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 const char* IntelDoubleRegister::AllocationIndexToString(int index) { 83 const char* IntelDoubleRegister::AllocationIndexToString(int index) {
84 if (CpuFeatures::IsSupported(SSE2)) { 84 if (CpuFeatures::IsSupported(SSE2)) {
85 return XMMRegister::AllocationIndexToString(index); 85 return XMMRegister::AllocationIndexToString(index);
86 } else { 86 } else {
87 return X87Register::AllocationIndexToString(index); 87 return X87Register::AllocationIndexToString(index);
88 } 88 }
89 } 89 }
90 90
91 91
92 void CpuFeatures::Probe() { 92 void CpuFeatures::Probe(bool serializer_enabled) {
93 ASSERT(!initialized_); 93 ASSERT(!initialized_);
94 ASSERT(supported_ == 0); 94 ASSERT(supported_ == 0);
95 #ifdef DEBUG 95 #ifdef DEBUG
96 initialized_ = true; 96 initialized_ = true;
97 #endif 97 #endif
98 if (Serializer::enabled()) { 98 if (serializer_enabled) {
99 supported_ |= OS::CpuFeaturesImpliedByPlatform(); 99 supported_ |= OS::CpuFeaturesImpliedByPlatform();
100 return; // No features if we might serialize. 100 return; // No features if we might serialize.
101 } 101 }
102 102
103 uint64_t probed_features = 0; 103 uint64_t probed_features = 0;
104 CPU cpu; 104 CPU cpu;
105 if (cpu.has_sse41()) { 105 if (cpu.has_sse41()) {
106 probed_features |= static_cast<uint64_t>(1) << SSE4_1; 106 probed_features |= static_cast<uint64_t>(1) << SSE4_1;
107 } 107 }
108 if (cpu.has_sse3()) { 108 if (cpu.has_sse3()) {
(...skipping 2638 matching lines...) Expand 10 before | Expand all | Expand 10 after
2747 fprintf(coverage_log, "%s\n", file_line); 2747 fprintf(coverage_log, "%s\n", file_line);
2748 fflush(coverage_log); 2748 fflush(coverage_log);
2749 } 2749 }
2750 } 2750 }
2751 2751
2752 #endif 2752 #endif
2753 2753
2754 } } // namespace v8::internal 2754 } } // namespace v8::internal
2755 2755
2756 #endif // V8_TARGET_ARCH_IA32 2756 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/arm/assembler-arm.cc ('K') | « src/ia32/assembler-ia32.h ('k') | src/ia32/cpu-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698