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

Side by Side Diff: src/atomicops_internals_x86_gcc.cc

Issue 212723003: MSan does not understand inline asm. This change preinitializes cpuid (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 6 years, 8 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
« no previous file with comments | « no previous file | src/platform-posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 }; 70 };
71 71
72 } } // namespace v8::internal 72 } } // namespace v8::internal
73 73
74 namespace { 74 namespace {
75 75
76 // Initialize the AtomicOps_Internalx86CPUFeatures struct. 76 // Initialize the AtomicOps_Internalx86CPUFeatures struct.
77 void AtomicOps_Internalx86CPUFeaturesInit() { 77 void AtomicOps_Internalx86CPUFeaturesInit() {
78 using v8::internal::AtomicOps_Internalx86CPUFeatures; 78 using v8::internal::AtomicOps_Internalx86CPUFeatures;
79 79
80 uint32_t eax; 80 uint32_t eax = 0;
81 uint32_t ebx; 81 uint32_t ebx = 0;
82 uint32_t ecx; 82 uint32_t ecx = 0;
83 uint32_t edx; 83 uint32_t edx = 0;
84 84
85 // Get vendor string (issue CPUID with eax = 0) 85 // Get vendor string (issue CPUID with eax = 0)
86 cpuid(eax, ebx, ecx, edx, 0); 86 cpuid(eax, ebx, ecx, edx, 0);
87 char vendor[13]; 87 char vendor[13];
88 v8::internal::OS::MemCopy(vendor, &ebx, 4); 88 v8::internal::OS::MemCopy(vendor, &ebx, 4);
89 v8::internal::OS::MemCopy(vendor + 4, &edx, 4); 89 v8::internal::OS::MemCopy(vendor + 4, &edx, 4);
90 v8::internal::OS::MemCopy(vendor + 8, &ecx, 4); 90 v8::internal::OS::MemCopy(vendor + 8, &ecx, 4);
91 vendor[12] = 0; 91 vendor[12] = 0;
92 92
93 // get feature flags in ecx/edx, and family/model in eax 93 // get feature flags in ecx/edx, and family/model in eax
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 127
128 // A global to get use initialized on startup via static initialization :/ 128 // A global to get use initialized on startup via static initialization :/
129 AtomicOpsx86Initializer g_initer; 129 AtomicOpsx86Initializer g_initer;
130 130
131 } // namespace 131 } // namespace
132 132
133 #endif // if x86 133 #endif // if x86
134 134
135 #endif // ifdef V8_ATOMICOPS_INTERNALS_X86_GCC_H_ 135 #endif // ifdef V8_ATOMICOPS_INTERNALS_X86_GCC_H_
OLDNEW
« no previous file with comments | « no previous file | src/platform-posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698