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

Side by Side Diff: src/assembler.cc

Issue 12391033: Make sure that on x86 we don't generate SSE2 code in the snapshot. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: New method CpuFeatures::IsSafeForSnapshot(). Created 7 years, 9 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 assembler_->set_predictable_code_size(old_value_); 179 assembler_->set_predictable_code_size(old_value_);
180 } 180 }
181 181
182 182
183 // ----------------------------------------------------------------------------- 183 // -----------------------------------------------------------------------------
184 // Implementation of CpuFeatureScope 184 // Implementation of CpuFeatureScope
185 185
186 #ifdef DEBUG 186 #ifdef DEBUG
187 CpuFeatureScope::CpuFeatureScope(AssemblerBase* assembler, CpuFeature f) 187 CpuFeatureScope::CpuFeatureScope(AssemblerBase* assembler, CpuFeature f)
188 : assembler_(assembler) { 188 : assembler_(assembler) {
189 ASSERT(CpuFeatures::IsSupported(f)); 189 ASSERT(CpuFeatures::IsSafeForSnapshot(f));
190 ASSERT(!Serializer::enabled() ||
191 !CpuFeatures::IsFoundByRuntimeProbingOnly(f));
192 old_enabled_ = assembler_->enabled_cpu_features(); 190 old_enabled_ = assembler_->enabled_cpu_features();
193 uint64_t mask = static_cast<uint64_t>(1) << f; 191 uint64_t mask = static_cast<uint64_t>(1) << f;
194 // TODO(svenpanne) This special case below doesn't belong here! 192 // TODO(svenpanne) This special case below doesn't belong here!
195 #if V8_TARGET_ARCH_ARM 193 #if V8_TARGET_ARCH_ARM
196 // VFP2 and ARMv7 are implied by VFP3. 194 // VFP2 and ARMv7 are implied by VFP3.
197 if (f == VFP3) { 195 if (f == VFP3) {
198 mask |= 196 mask |=
199 static_cast<uint64_t>(1) << VFP2 | 197 static_cast<uint64_t>(1) << VFP2 |
200 static_cast<uint64_t>(1) << ARMv7; 198 static_cast<uint64_t>(1) << ARMv7;
201 } 199 }
(...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after
1639 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); 1637 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position);
1640 state_.written_position = state_.current_position; 1638 state_.written_position = state_.current_position;
1641 written = true; 1639 written = true;
1642 } 1640 }
1643 1641
1644 // Return whether something was written. 1642 // Return whether something was written.
1645 return written; 1643 return written;
1646 } 1644 }
1647 1645
1648 } } // namespace v8::internal 1646 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/ia32/assembler-ia32.h » ('j') | src/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698