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

Side by Side Diff: src/arm/simulator-arm.cc

Issue 863633002: Use signaling NaN for holes in fixed double arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Restore SSE2 Created 5 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
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 #include <stdarg.h> 5 #include <stdarg.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 1899 matching lines...) Expand 10 before | Expand all | Expand 10 after
1910 // This is not a valid svc code. 1910 // This is not a valid svc code.
1911 UNREACHABLE(); 1911 UNREACHABLE();
1912 break; 1912 break;
1913 } 1913 }
1914 } 1914 }
1915 } 1915 }
1916 } 1916 }
1917 1917
1918 1918
1919 double Simulator::canonicalizeNaN(double value) { 1919 double Simulator::canonicalizeNaN(double value) {
1920 return (FPSCR_default_NaN_mode_ && std::isnan(value)) ? 1920 // Default NaN value, see "NaN handling" in "IEEE 754 standard implementation
1921 FixedDoubleArray::canonical_not_the_hole_nan_as_double() : value; 1921 // choices" of the ARM Reference Manual.
1922 const uint64_t kDefaultNaN = V8_UINT64_C(0x7FF8000000000000);
1923 if (FPSCR_default_NaN_mode_ && std::isnan(value)) {
1924 value = bit_cast<double>(kDefaultNaN);
1925 }
1926 return value;
1922 } 1927 }
1923 1928
1924 1929
1925 // Stop helper functions. 1930 // Stop helper functions.
1926 bool Simulator::isStopInstruction(Instruction* instr) { 1931 bool Simulator::isStopInstruction(Instruction* instr) {
1927 return (instr->Bits(27, 24) == 0xF) && (instr->SvcValue() >= kStopCode); 1932 return (instr->Bits(27, 24) == 0xF) && (instr->SvcValue() >= kStopCode);
1928 } 1933 }
1929 1934
1930 1935
1931 bool Simulator::isWatchedStop(uint32_t code) { 1936 bool Simulator::isWatchedStop(uint32_t code) {
(...skipping 2090 matching lines...) Expand 10 before | Expand all | Expand 10 after
4022 uintptr_t address = *stack_slot; 4027 uintptr_t address = *stack_slot;
4023 set_register(sp, current_sp + sizeof(uintptr_t)); 4028 set_register(sp, current_sp + sizeof(uintptr_t));
4024 return address; 4029 return address;
4025 } 4030 }
4026 4031
4027 } } // namespace v8::internal 4032 } } // namespace v8::internal
4028 4033
4029 #endif // USE_SIMULATOR 4034 #endif // USE_SIMULATOR
4030 4035
4031 #endif // V8_TARGET_ARCH_ARM 4036 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698