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

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

Issue 125133002: ARM: Enable the subnormal floats on QNX. Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 6 years, 11 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 #else 100 #else
101 #error "Your version of GCC does not report the FP ABI compiled for." \ 101 #error "Your version of GCC does not report the FP ABI compiled for." \
102 "Please report it on this issue" \ 102 "Please report it on this issue" \
103 "http://code.google.com/p/v8/issues/detail?id=2140" 103 "http://code.google.com/p/v8/issues/detail?id=2140"
104 104
105 #endif 105 #endif
106 #endif 106 #endif
107 #undef GCC_VERSION 107 #undef GCC_VERSION
108 } 108 }
109 109
110
111 void OS::ArmEnableSubnormalFloat() {
112 // Clear the ARM_VFP_FPSCR_FZ flag in the FPSCR register.
113 uint32_t fpscr;
114 asm volatile("vmrs %0, fpscr" : "=r"(fpscr));
115 fpscr &= ~0x01000000u;
116 asm volatile("vmsr fpscr, %0" : : "r"(fpscr));
Sven Panne 2014/01/07 09:48:49 I think a single parameter-less asm with 3 instruc
117 }
118
119 struct QnxArmStaticInitializer {
120 QnxArmStaticInitializer() {
121 OS::ArmEnableSubnormalFloat();
122 }
123 } qnx_arm_static_initializer;
Sven Panne 2014/01/07 09:48:49 No new static initializers, please, use V8::Initia
124
110 #endif // __arm__ 125 #endif // __arm__
111 126
112 127
113 const char* OS::LocalTimezone(double time) { 128 const char* OS::LocalTimezone(double time) {
114 if (std::isnan(time)) return ""; 129 if (std::isnan(time)) return "";
115 time_t tv = static_cast<time_t>(std::floor(time/msPerSecond)); 130 time_t tv = static_cast<time_t>(std::floor(time/msPerSecond));
116 struct tm* t = localtime(&tv); 131 struct tm* t = localtime(&tv);
117 if (NULL == t) return ""; 132 if (NULL == t) return "";
118 return t->tm_zone; 133 return t->tm_zone;
119 } 134 }
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 bool VirtualMemory::ReleaseRegion(void* base, size_t size) { 407 bool VirtualMemory::ReleaseRegion(void* base, size_t size) {
393 return munmap(base, size) == 0; 408 return munmap(base, size) == 0;
394 } 409 }
395 410
396 411
397 bool VirtualMemory::HasLazyCommits() { 412 bool VirtualMemory::HasLazyCommits() {
398 return false; 413 return false;
399 } 414 }
400 415
401 } } // namespace v8::internal 416 } } // namespace v8::internal
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