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

Side by Side Diff: src/platform.h

Issue 157503002: A64: Synchronize with r18444. (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/parser.cc ('k') | 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 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "v8globals.h" 52 #include "v8globals.h"
53 53
54 #ifdef __sun 54 #ifdef __sun
55 # ifndef signbit 55 # ifndef signbit
56 namespace std { 56 namespace std {
57 int signbit(double x); 57 int signbit(double x);
58 } 58 }
59 # endif 59 # endif
60 #endif 60 #endif
61 61
62 #if V8_OS_QNX
63 #include "qnx-math.h"
64 #endif
65
62 // Microsoft Visual C++ specific stuff. 66 // Microsoft Visual C++ specific stuff.
63 #if V8_CC_MSVC 67 #if V8_CC_MSVC
64 68
65 #include "win32-headers.h" 69 #include "win32-headers.h"
66 #include "win32-math.h" 70 #include "win32-math.h"
67 71
68 int strncasecmp(const char* s1, const char* s2, int n); 72 int strncasecmp(const char* s1, const char* s2, int n);
69 73
70 // Visual C++ 2013 and higher implement this function. 74 // Visual C++ 2013 and higher implement this function.
71 #if (_MSC_VER < 1800) 75 #if (_MSC_VER < 1800)
(...skipping 17 matching lines...) Expand all
89 #endif // _MSC_VER < 1800 93 #endif // _MSC_VER < 1800
90 94
91 #endif // V8_CC_MSVC 95 #endif // V8_CC_MSVC
92 96
93 namespace v8 { 97 namespace v8 {
94 namespace internal { 98 namespace internal {
95 99
96 double modulo(double x, double y); 100 double modulo(double x, double y);
97 101
98 // Custom implementation of math functions. 102 // Custom implementation of math functions.
99 double fast_log(double input);
100 double fast_exp(double input); 103 double fast_exp(double input);
101 double fast_sqrt(double input); 104 double fast_sqrt(double input);
102 // The custom exp implementation needs 16KB of lookup data; initialize it 105 // The custom exp implementation needs 16KB of lookup data; initialize it
103 // on demand. 106 // on demand.
104 void lazily_initialize_fast_exp(); 107 void lazily_initialize_fast_exp();
105 108
106 // ---------------------------------------------------------------------------- 109 // ----------------------------------------------------------------------------
107 // Fast TLS support 110 // Fast TLS support
108 111
109 #ifndef V8_NO_FAST_TLS 112 #ifndef V8_NO_FAST_TLS
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 static void MemCopyUint16Uint8Wrapper(uint16_t* dest, 361 static void MemCopyUint16Uint8Wrapper(uint16_t* dest,
359 const uint8_t* src, 362 const uint8_t* src,
360 size_t chars); 363 size_t chars);
361 // For values < 12, the assembler function is slower than the inlined C code. 364 // For values < 12, the assembler function is slower than the inlined C code.
362 static const int kMinComplexConvertMemCopy = 12; 365 static const int kMinComplexConvertMemCopy = 12;
363 static void MemCopyUint16Uint8(uint16_t* dest, 366 static void MemCopyUint16Uint8(uint16_t* dest,
364 const uint8_t* src, 367 const uint8_t* src,
365 size_t size) { 368 size_t size) {
366 (*memcopy_uint16_uint8_function)(dest, src, size); 369 (*memcopy_uint16_uint8_function)(dest, src, size);
367 } 370 }
371 #elif defined(V8_HOST_ARCH_MIPS)
372 typedef void (*MemCopyUint8Function)(uint8_t* dest,
373 const uint8_t* src,
374 size_t size);
375 static MemCopyUint8Function memcopy_uint8_function;
376 static void MemCopyUint8Wrapper(uint8_t* dest,
377 const uint8_t* src,
378 size_t chars) {
379 memcpy(dest, src, chars);
380 }
381 // For values < 16, the assembler function is slower than the inlined C code.
382 static const int kMinComplexMemCopy = 16;
383 static void MemCopy(void* dest, const void* src, size_t size) {
384 (*memcopy_uint8_function)(reinterpret_cast<uint8_t*>(dest),
385 reinterpret_cast<const uint8_t*>(src),
386 size);
387 }
388 static void MemMove(void* dest, const void* src, size_t size) {
389 memmove(dest, src, size);
390 }
368 #else 391 #else
369 // Copy memory area to disjoint memory area. 392 // Copy memory area to disjoint memory area.
370 static void MemCopy(void* dest, const void* src, size_t size) { 393 static void MemCopy(void* dest, const void* src, size_t size) {
371 memcpy(dest, src, size); 394 memcpy(dest, src, size);
372 } 395 }
373 static void MemMove(void* dest, const void* src, size_t size) { 396 static void MemMove(void* dest, const void* src, size_t size) {
374 memmove(dest, src, size); 397 memmove(dest, src, size);
375 } 398 }
376 static const int kMinComplexMemCopy = 16 * kPointerSize; 399 static const int kMinComplexMemCopy = 16 * kPointerSize;
377 #endif // V8_TARGET_ARCH_IA32 400 #endif // V8_TARGET_ARCH_IA32
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 char name_[kMaxThreadNameLength]; 611 char name_[kMaxThreadNameLength];
589 int stack_size_; 612 int stack_size_;
590 Semaphore* start_semaphore_; 613 Semaphore* start_semaphore_;
591 614
592 DISALLOW_COPY_AND_ASSIGN(Thread); 615 DISALLOW_COPY_AND_ASSIGN(Thread);
593 }; 616 };
594 617
595 } } // namespace v8::internal 618 } } // namespace v8::internal
596 619
597 #endif // V8_PLATFORM_H_ 620 #endif // V8_PLATFORM_H_
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | src/platform-posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698