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

Side by Side Diff: src/platform-posix.cc

Issue 136643008: A64: Synchronize with r18256. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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.h ('k') | src/platform-win32.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 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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 297
298 #define UNARY_MATH_FUNCTION(name, generator) \ 298 #define UNARY_MATH_FUNCTION(name, generator) \
299 static UnaryMathFunction fast_##name##_function = NULL; \ 299 static UnaryMathFunction fast_##name##_function = NULL; \
300 void init_fast_##name##_function() { \ 300 void init_fast_##name##_function() { \
301 fast_##name##_function = generator; \ 301 fast_##name##_function = generator; \
302 } \ 302 } \
303 double fast_##name(double x) { \ 303 double fast_##name(double x) { \
304 return (*fast_##name##_function)(x); \ 304 return (*fast_##name##_function)(x); \
305 } 305 }
306 306
307 UNARY_MATH_FUNCTION(sin, CreateTranscendentalFunction(TranscendentalCache::SIN))
308 UNARY_MATH_FUNCTION(cos, CreateTranscendentalFunction(TranscendentalCache::COS))
309 UNARY_MATH_FUNCTION(tan, CreateTranscendentalFunction(TranscendentalCache::TAN))
310 UNARY_MATH_FUNCTION(log, CreateTranscendentalFunction(TranscendentalCache::LOG)) 307 UNARY_MATH_FUNCTION(log, CreateTranscendentalFunction(TranscendentalCache::LOG))
311 UNARY_MATH_FUNCTION(exp, CreateExpFunction()) 308 UNARY_MATH_FUNCTION(exp, CreateExpFunction())
312 UNARY_MATH_FUNCTION(sqrt, CreateSqrtFunction()) 309 UNARY_MATH_FUNCTION(sqrt, CreateSqrtFunction())
313 310
314 #undef UNARY_MATH_FUNCTION 311 #undef UNARY_MATH_FUNCTION
315 312
316 313
317 void lazily_initialize_fast_exp() { 314 void lazily_initialize_fast_exp() {
318 if (fast_exp_function == NULL) { 315 if (fast_exp_function == NULL) {
319 init_fast_exp_function(); 316 init_fast_exp_function();
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 OS::MemMoveFunction generated_memmove = CreateMemMoveFunction(); 513 OS::MemMoveFunction generated_memmove = CreateMemMoveFunction();
517 if (generated_memmove != NULL) { 514 if (generated_memmove != NULL) {
518 memmove_function = generated_memmove; 515 memmove_function = generated_memmove;
519 } 516 }
520 #elif defined(V8_HOST_ARCH_ARM) 517 #elif defined(V8_HOST_ARCH_ARM)
521 OS::memcopy_uint8_function = 518 OS::memcopy_uint8_function =
522 CreateMemCopyUint8Function(&OS::MemCopyUint8Wrapper); 519 CreateMemCopyUint8Function(&OS::MemCopyUint8Wrapper);
523 OS::memcopy_uint16_uint8_function = 520 OS::memcopy_uint16_uint8_function =
524 CreateMemCopyUint16Uint8Function(&OS::MemCopyUint16Uint8Wrapper); 521 CreateMemCopyUint16Uint8Function(&OS::MemCopyUint16Uint8Wrapper);
525 #endif 522 #endif
526 init_fast_sin_function();
527 init_fast_cos_function();
528 init_fast_tan_function();
529 init_fast_log_function(); 523 init_fast_log_function();
530 // fast_exp is initialized lazily. 524 // fast_exp is initialized lazily.
531 init_fast_sqrt_function(); 525 init_fast_sqrt_function();
532 } 526 }
533 527
534 528
535 // ---------------------------------------------------------------------------- 529 // ----------------------------------------------------------------------------
536 // POSIX string support. 530 // POSIX string support.
537 // 531 //
538 532
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 764
771 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { 765 void Thread::SetThreadLocal(LocalStorageKey key, void* value) {
772 pthread_key_t pthread_key = LocalKeyToPthreadKey(key); 766 pthread_key_t pthread_key = LocalKeyToPthreadKey(key);
773 int result = pthread_setspecific(pthread_key, value); 767 int result = pthread_setspecific(pthread_key, value);
774 ASSERT_EQ(0, result); 768 ASSERT_EQ(0, result);
775 USE(result); 769 USE(result);
776 } 770 }
777 771
778 772
779 } } // namespace v8::internal 773 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform.h ('k') | src/platform-win32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698