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

Side by Side Diff: src/platform.h

Issue 125133002: ARM: Enable the subnormal floats on QNX. Base URL: git://github.com/v8/v8.git@master
Patch Set: Rebaseline previous CL Created 6 years, 6 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/mksnapshot.cc ('k') | test/cctest/cctest.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This module contains the platform-specific code. This make the rest of the 5 // This module contains the platform-specific code. This make the rest of the
6 // code less dependent on operating system, compilers and runtime libraries. 6 // code less dependent on operating system, compilers and runtime libraries.
7 // This module does specifically not deal with differences between different 7 // This module does specifically not deal with differences between different
8 // processor architecture. 8 // processor architecture.
9 // The platform classes have the same definition for all platforms. The 9 // The platform classes have the same definition for all platforms. The
10 // implementation for a particular platform is put in platform_<os>.cc. 10 // implementation for a particular platform is put in platform_<os>.cc.
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 static double nan_value(); 290 static double nan_value();
291 291
292 // Support runtime detection of whether the hard float option of the 292 // Support runtime detection of whether the hard float option of the
293 // EABI is used. 293 // EABI is used.
294 static bool ArmUsingHardFloat(); 294 static bool ArmUsingHardFloat();
295 295
296 // Returns the activation frame alignment constraint or zero if 296 // Returns the activation frame alignment constraint or zero if
297 // the platform doesn't care. Guaranteed to be a power of two. 297 // the platform doesn't care. Guaranteed to be a power of two.
298 static int ActivationFrameAlignment(); 298 static int ActivationFrameAlignment();
299 299
300 // Perform the per-thread setup necessary for specific OSes and CPUs.
301 static void PerformPerThreadSetup() {
302 #if V8_OS_QNX && defined(V8_HOST_ARCH_ARM)
303 // Clear the ARM_VFP_FPSCR_FZ flag in the FPSCR register.
304 // This disables the flush-to-zero mode in the VFP, allowing
305 // the handling of subnormals.
306 asm volatile(
307 "vmrs r3, fpscr \n\t"
308 "bic r3, r3, 0x01000000 \n\t"
309 "vmsr fpscr, r3"
310 : : : "r3");
311 #endif // V8_OS_QNX && V8_HOST_ARCH_ARM
312 }
313
300 static int GetCurrentProcessId(); 314 static int GetCurrentProcessId();
301 315
302 private: 316 private:
303 static const int msPerSecond = 1000; 317 static const int msPerSecond = 1000;
304 318
305 DISALLOW_IMPLICIT_CONSTRUCTORS(OS); 319 DISALLOW_IMPLICIT_CONSTRUCTORS(OS);
306 }; 320 };
307 321
308 // Represents and controls an area of reserved memory. 322 // Represents and controls an area of reserved memory.
309 // Control of the reserved memory can be assigned to another VirtualMemory 323 // Control of the reserved memory can be assigned to another VirtualMemory
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 char name_[kMaxThreadNameLength]; 517 char name_[kMaxThreadNameLength];
504 int stack_size_; 518 int stack_size_;
505 Semaphore* start_semaphore_; 519 Semaphore* start_semaphore_;
506 520
507 DISALLOW_COPY_AND_ASSIGN(Thread); 521 DISALLOW_COPY_AND_ASSIGN(Thread);
508 }; 522 };
509 523
510 } } // namespace v8::internal 524 } } // namespace v8::internal
511 525
512 #endif // V8_PLATFORM_H_ 526 #endif // V8_PLATFORM_H_
OLDNEW
« no previous file with comments | « src/mksnapshot.cc ('k') | test/cctest/cctest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698