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

Side by Side Diff: src/mips/assembler-mips.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 are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // 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 28 matching lines...) Expand all
39 39
40 #include "mips/assembler-mips-inl.h" 40 #include "mips/assembler-mips-inl.h"
41 #include "serialize.h" 41 #include "serialize.h"
42 42
43 namespace v8 { 43 namespace v8 {
44 namespace internal { 44 namespace internal {
45 45
46 #ifdef DEBUG 46 #ifdef DEBUG
47 bool CpuFeatures::initialized_ = false; 47 bool CpuFeatures::initialized_ = false;
48 #endif 48 #endif
49 bool CpuFeatures::hint_creating_snapshot_ = false;
50 unsigned CpuFeatures::supported_ = 0; 49 unsigned CpuFeatures::supported_ = 0;
51 unsigned CpuFeatures::found_by_runtime_probing_only_ = 0; 50 unsigned CpuFeatures::found_by_runtime_probing_only_ = 0;
52 unsigned CpuFeatures::cross_compile_ = 0; 51 unsigned CpuFeatures::cross_compile_ = 0;
53 52
54 53
55 ExternalReference ExternalReference::cpu_features() { 54 ExternalReference ExternalReference::cpu_features() {
56 ASSERT(CpuFeatures::initialized_); 55 ASSERT(CpuFeatures::initialized_);
57 return ExternalReference(&CpuFeatures::supported_); 56 return ExternalReference(&CpuFeatures::supported_);
58 } 57 }
59 58
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 "f18", 95 "f18",
97 "f20", 96 "f20",
98 "f22", 97 "f22",
99 "f24", 98 "f24",
100 "f26" 99 "f26"
101 }; 100 };
102 return names[index]; 101 return names[index];
103 } 102 }
104 103
105 104
106 void CpuFeatures::SetHintCreatingSnapshot() {
107 hint_creating_snapshot_ = true;
108 }
109
110
111 void CpuFeatures::ProbeWithoutIsolate() {
112 Probe(hint_creating_snapshot_);
113 }
114
115
116 void CpuFeatures::Probe() {
117 // The Serializer can only be queried after isolate initialization.
118 Probe(Serializer::enabled());
119 }
120
121
122 void CpuFeatures::Probe(bool serializer_enabled) { 105 void CpuFeatures::Probe(bool serializer_enabled) {
123 unsigned standard_features = (OS::CpuFeaturesImpliedByPlatform() | 106 unsigned standard_features = (OS::CpuFeaturesImpliedByPlatform() |
124 CpuFeaturesImpliedByCompiler()); 107 CpuFeaturesImpliedByCompiler());
125 ASSERT(supported_ == 0 || 108 ASSERT(supported_ == 0 ||
126 (supported_ & standard_features) == standard_features); 109 (supported_ & standard_features) == standard_features);
127 #ifdef DEBUG 110 #ifdef DEBUG
128 initialized_ = true; 111 initialized_ = true;
129 #endif 112 #endif
130 113
131 // Get the features implied by the OS and the compiler settings. This is the 114 // Get the features implied by the OS and the compiler settings. This is the
(...skipping 2223 matching lines...) Expand 10 before | Expand all | Expand 10 after
2355 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) { 2338 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) {
2356 // No out-of-line constant pool support. 2339 // No out-of-line constant pool support.
2357 ASSERT(!FLAG_enable_ool_constant_pool); 2340 ASSERT(!FLAG_enable_ool_constant_pool);
2358 return; 2341 return;
2359 } 2342 }
2360 2343
2361 2344
2362 } } // namespace v8::internal 2345 } } // namespace v8::internal
2363 2346
2364 #endif // V8_TARGET_ARCH_MIPS 2347 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« src/arm/assembler-arm.cc ('K') | « src/mips/assembler-mips.h ('k') | src/mips/cpu-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698