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

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

Issue 9599006: Set x86 FPU precision to 64-bit for MinGW. Original patch by Jonathan Liu <net147@gmail.com>. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: cosmetic changes Created 8 years, 9 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 | « no previous file | src/win32-headers.h » ('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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 // Returns a string identifying the current timezone for the 532 // Returns a string identifying the current timezone for the
533 // timestamp taking into account daylight saving. 533 // timestamp taking into account daylight saving.
534 char* Time::LocalTimezone() { 534 char* Time::LocalTimezone() {
535 // Return the standard or DST time zone name based on whether daylight 535 // Return the standard or DST time zone name based on whether daylight
536 // saving is in effect at the given time. 536 // saving is in effect at the given time.
537 return InDST() ? dst_tz_name_ : std_tz_name_; 537 return InDST() ? dst_tz_name_ : std_tz_name_;
538 } 538 }
539 539
540 540
541 void OS::SetUp() { 541 void OS::SetUp() {
542 #ifdef __MINGW32__
543 // Set x87 FPU precision to 64-bit to be consistent with MSVC.
544 _controlfp(_PC_53, _MCW_PC);
545 #endif
542 // Seed the random number generator. 546 // Seed the random number generator.
543 // Convert the current time to a 64-bit integer first, before converting it 547 // Convert the current time to a 64-bit integer first, before converting it
544 // to an unsigned. Going directly can cause an overflow and the seed to be 548 // to an unsigned. Going directly can cause an overflow and the seed to be
545 // set to all ones. The seed will be identical for different instances that 549 // set to all ones. The seed will be identical for different instances that
546 // call this setup code within the same millisecond. 550 // call this setup code within the same millisecond.
547 uint64_t seed = static_cast<uint64_t>(TimeCurrentMillis()); 551 uint64_t seed = static_cast<uint64_t>(TimeCurrentMillis());
548 srand(static_cast<unsigned int>(seed)); 552 srand(static_cast<unsigned int>(seed));
549 limit_mutex = CreateMutex(); 553 limit_mutex = CreateMutex();
550 } 554 }
551 555
(...skipping 1521 matching lines...) Expand 10 before | Expand all | Expand 10 after
2073 2077
2074 2078
2075 void Sampler::Stop() { 2079 void Sampler::Stop() {
2076 ASSERT(IsActive()); 2080 ASSERT(IsActive());
2077 SamplerThread::RemoveActiveSampler(this); 2081 SamplerThread::RemoveActiveSampler(this);
2078 SetActive(false); 2082 SetActive(false);
2079 } 2083 }
2080 2084
2081 2085
2082 } } // namespace v8::internal 2086 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/win32-headers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698