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

Side by Side Diff: src/assembler.cc

Issue 27156004: Properly export uin32_bias double constant. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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/assembler.h ('k') | src/code-stubs.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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 struct DoubleConstant BASE_EMBEDDED { 91 struct DoubleConstant BASE_EMBEDDED {
92 double min_int; 92 double min_int;
93 double one_half; 93 double one_half;
94 double minus_one_half; 94 double minus_one_half;
95 double minus_zero; 95 double minus_zero;
96 double zero; 96 double zero;
97 double uint8_max_value; 97 double uint8_max_value;
98 double negative_infinity; 98 double negative_infinity;
99 double canonical_non_hole_nan; 99 double canonical_non_hole_nan;
100 double the_hole_nan; 100 double the_hole_nan;
101 double uint32_bias;
101 }; 102 };
102 103
103 static DoubleConstant double_constants; 104 static DoubleConstant double_constants;
104 105
105 const char* const RelocInfo::kFillerCommentString = "DEOPTIMIZATION PADDING"; 106 const char* const RelocInfo::kFillerCommentString = "DEOPTIMIZATION PADDING";
106 107
107 static bool math_exp_data_initialized = false; 108 static bool math_exp_data_initialized = false;
108 static Mutex* math_exp_data_mutex = NULL; 109 static Mutex* math_exp_data_mutex = NULL;
109 static double* math_exp_constants_array = NULL; 110 static double* math_exp_constants_array = NULL;
110 static double* math_exp_log_table_array = NULL; 111 static double* math_exp_log_table_array = NULL;
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 void ExternalReference::SetUp() { 902 void ExternalReference::SetUp() {
902 double_constants.min_int = kMinInt; 903 double_constants.min_int = kMinInt;
903 double_constants.one_half = 0.5; 904 double_constants.one_half = 0.5;
904 double_constants.minus_one_half = -0.5; 905 double_constants.minus_one_half = -0.5;
905 double_constants.minus_zero = -0.0; 906 double_constants.minus_zero = -0.0;
906 double_constants.uint8_max_value = 255; 907 double_constants.uint8_max_value = 255;
907 double_constants.zero = 0.0; 908 double_constants.zero = 0.0;
908 double_constants.canonical_non_hole_nan = OS::nan_value(); 909 double_constants.canonical_non_hole_nan = OS::nan_value();
909 double_constants.the_hole_nan = BitCast<double>(kHoleNanInt64); 910 double_constants.the_hole_nan = BitCast<double>(kHoleNanInt64);
910 double_constants.negative_infinity = -V8_INFINITY; 911 double_constants.negative_infinity = -V8_INFINITY;
912 double_constants.uint32_bias =
913 static_cast<double>(static_cast<uint32_t>(0xFFFFFFFF)) + 1;
911 914
912 math_exp_data_mutex = new Mutex(); 915 math_exp_data_mutex = new Mutex();
913 } 916 }
914 917
915 918
916 void ExternalReference::InitializeMathExpData() { 919 void ExternalReference::InitializeMathExpData() {
917 // Early return? 920 // Early return?
918 if (math_exp_data_initialized) return; 921 if (math_exp_data_initialized) return;
919 922
920 LockGuard<Mutex> lock_guard(math_exp_data_mutex); 923 LockGuard<Mutex> lock_guard(math_exp_data_mutex);
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
1326 reinterpret_cast<void*>(&double_constants.canonical_non_hole_nan)); 1329 reinterpret_cast<void*>(&double_constants.canonical_non_hole_nan));
1327 } 1330 }
1328 1331
1329 1332
1330 ExternalReference ExternalReference::address_of_the_hole_nan() { 1333 ExternalReference ExternalReference::address_of_the_hole_nan() {
1331 return ExternalReference( 1334 return ExternalReference(
1332 reinterpret_cast<void*>(&double_constants.the_hole_nan)); 1335 reinterpret_cast<void*>(&double_constants.the_hole_nan));
1333 } 1336 }
1334 1337
1335 1338
1339 ExternalReference ExternalReference::address_of_uint32_bias() {
1340 return ExternalReference(
1341 reinterpret_cast<void*>(&double_constants.uint32_bias));
1342 }
1343
1344
1336 #ifndef V8_INTERPRETED_REGEXP 1345 #ifndef V8_INTERPRETED_REGEXP
1337 1346
1338 ExternalReference ExternalReference::re_check_stack_guard_state( 1347 ExternalReference ExternalReference::re_check_stack_guard_state(
1339 Isolate* isolate) { 1348 Isolate* isolate) {
1340 Address function; 1349 Address function;
1341 #if V8_TARGET_ARCH_X64 1350 #if V8_TARGET_ARCH_X64
1342 function = FUNCTION_ADDR(RegExpMacroAssemblerX64::CheckStackGuardState); 1351 function = FUNCTION_ADDR(RegExpMacroAssemblerX64::CheckStackGuardState);
1343 #elif V8_TARGET_ARCH_IA32 1352 #elif V8_TARGET_ARCH_IA32
1344 function = FUNCTION_ADDR(RegExpMacroAssemblerIA32::CheckStackGuardState); 1353 function = FUNCTION_ADDR(RegExpMacroAssemblerIA32::CheckStackGuardState);
1345 #elif V8_TARGET_ARCH_ARM 1354 #elif V8_TARGET_ARCH_ARM
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
1694 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); 1703 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position);
1695 state_.written_position = state_.current_position; 1704 state_.written_position = state_.current_position;
1696 written = true; 1705 written = true;
1697 } 1706 }
1698 1707
1699 // Return whether something was written. 1708 // Return whether something was written.
1700 return written; 1709 return written;
1701 } 1710 }
1702 1711
1703 } } // namespace v8::internal 1712 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/assembler.h ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698