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

Side by Side Diff: src/v8utils.h

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, 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
« no previous file with comments | « src/platform-posix.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 #define STOS "stosq" 208 #define STOS "stosq"
209 #endif 209 #endif
210 #if defined(__native_client__) 210 #if defined(__native_client__)
211 // This STOS sequence does not validate for x86_64 Native Client. 211 // This STOS sequence does not validate for x86_64 Native Client.
212 // Here we #undef STOS to force use of the slower C version. 212 // Here we #undef STOS to force use of the slower C version.
213 // TODO(bradchen): Profile V8 and implement a faster REP STOS 213 // TODO(bradchen): Profile V8 and implement a faster REP STOS
214 // here if the profile indicates it matters. 214 // here if the profile indicates it matters.
215 #undef STOS 215 #undef STOS
216 #endif 216 #endif
217 217
218 #if defined(MEMORY_SANITIZER)
219 // MemorySanitizer does not understand inline assembly.
220 #undef STOS
221 #endif
222
218 #if defined(__GNUC__) && defined(STOS) 223 #if defined(__GNUC__) && defined(STOS)
219 asm volatile( 224 asm volatile(
220 "cld;" 225 "cld;"
221 "rep ; " STOS 226 "rep ; " STOS
222 : "+&c" (counter), "+&D" (dest) 227 : "+&c" (counter), "+&D" (dest)
223 : "a" (value) 228 : "a" (value)
224 : "memory", "cc"); 229 : "memory", "cc");
225 #else 230 #else
226 for (int i = 0; i < counter; i++) { 231 for (int i = 0; i < counter; i++) {
227 dest[i] = value; 232 dest[i] = value;
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 460
456 // Add formatted contents like printf based on a va_list. 461 // Add formatted contents like printf based on a va_list.
457 void AddFormattedList(const char* format, va_list list); 462 void AddFormattedList(const char* format, va_list list);
458 private: 463 private:
459 DISALLOW_IMPLICIT_CONSTRUCTORS(StringBuilder); 464 DISALLOW_IMPLICIT_CONSTRUCTORS(StringBuilder);
460 }; 465 };
461 466
462 } } // namespace v8::internal 467 } } // namespace v8::internal
463 468
464 #endif // V8_V8UTILS_H_ 469 #endif // V8_V8UTILS_H_
OLDNEW
« no previous file with comments | « src/platform-posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698