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

Side by Side Diff: src/v8utils.h

Issue 13704002: Minor Native Client specific changes to files in src. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Cleaner disabling of profiling. Created 7 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
« 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 T* a = NULL; 178 T* a = NULL;
179 U* b = NULL; 179 U* b = NULL;
180 a = b; // Fake assignment to check assignability. 180 a = b; // Fake assignment to check assignability.
181 USE(a); 181 USE(a);
182 #endif // DEBUG 182 #endif // DEBUG
183 #if defined(V8_HOST_ARCH_IA32) 183 #if defined(V8_HOST_ARCH_IA32)
184 #define STOS "stosl" 184 #define STOS "stosl"
185 #elif defined(V8_HOST_ARCH_X64) 185 #elif defined(V8_HOST_ARCH_X64)
186 #define STOS "stosq" 186 #define STOS "stosq"
187 #endif 187 #endif
188 #if defined(__native_client__)
189 // This STOS sequence does not validate for x86_64 Native Client.
190 // Here we #undef STOS to force use of the slower C version.
191 // TODO(bradchen): Profile V8 and implement a faster REP STOS
192 // here if the profile indicates it matters.
193 #undef STOS
194 #endif
188 195
189 #if defined(__GNUC__) && defined(STOS) 196 #if defined(__GNUC__) && defined(STOS)
190 asm volatile( 197 asm volatile(
191 "cld;" 198 "cld;"
192 "rep ; " STOS 199 "rep ; " STOS
193 : "+&c" (counter), "+&D" (dest) 200 : "+&c" (counter), "+&D" (dest)
194 : "a" (value) 201 : "a" (value)
195 : "memory", "cc"); 202 : "memory", "cc");
196 #else 203 #else
197 for (int i = 0; i < counter; i++) { 204 for (int i = 0; i < counter; i++) {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 308
302 // Add formatted contents like printf based on a va_list. 309 // Add formatted contents like printf based on a va_list.
303 void AddFormattedList(const char* format, va_list list); 310 void AddFormattedList(const char* format, va_list list);
304 private: 311 private:
305 DISALLOW_IMPLICIT_CONSTRUCTORS(StringBuilder); 312 DISALLOW_IMPLICIT_CONSTRUCTORS(StringBuilder);
306 }; 313 };
307 314
308 } } // namespace v8::internal 315 } } // namespace v8::internal
309 316
310 #endif // V8_V8UTILS_H_ 317 #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