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

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

Issue 831393006: Use fast_sqrt instead of std::sqrt in simulators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix includes 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
« no previous file with comments | « no previous file | src/arm64/simulator-arm64.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 #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 3051 matching lines...) Expand 10 before | Expand all | Expand 10 after
3062 set_d_register_from_double(vd, fixed_value / divide); 3062 set_d_register_from_double(vd, fixed_value / divide);
3063 } else if (((instr->Opc2Value() >> 1) == 0x6) && 3063 } else if (((instr->Opc2Value() >> 1) == 0x6) &&
3064 (instr->Opc3Value() & 0x1)) { 3064 (instr->Opc3Value() & 0x1)) {
3065 DecodeVCVTBetweenFloatingPointAndInteger(instr); 3065 DecodeVCVTBetweenFloatingPointAndInteger(instr);
3066 } else if (((instr->Opc2Value() == 0x4) || (instr->Opc2Value() == 0x5)) && 3066 } else if (((instr->Opc2Value() == 0x4) || (instr->Opc2Value() == 0x5)) &&
3067 (instr->Opc3Value() & 0x1)) { 3067 (instr->Opc3Value() & 0x1)) {
3068 DecodeVCMP(instr); 3068 DecodeVCMP(instr);
3069 } else if (((instr->Opc2Value() == 0x1)) && (instr->Opc3Value() == 0x3)) { 3069 } else if (((instr->Opc2Value() == 0x1)) && (instr->Opc3Value() == 0x3)) {
3070 // vsqrt 3070 // vsqrt
3071 double dm_value = get_double_from_d_register(vm); 3071 double dm_value = get_double_from_d_register(vm);
3072 double dd_value = std::sqrt(dm_value); 3072 double dd_value = fast_sqrt(dm_value);
3073 dd_value = canonicalizeNaN(dd_value); 3073 dd_value = canonicalizeNaN(dd_value);
3074 set_d_register_from_double(vd, dd_value); 3074 set_d_register_from_double(vd, dd_value);
3075 } else if (instr->Opc3Value() == 0x0) { 3075 } else if (instr->Opc3Value() == 0x0) {
3076 // vmov immediate. 3076 // vmov immediate.
3077 if (instr->SzValue() == 0x1) { 3077 if (instr->SzValue() == 0x1) {
3078 set_d_register_from_double(vd, instr->DoubleImmedVmov()); 3078 set_d_register_from_double(vd, instr->DoubleImmedVmov());
3079 } else { 3079 } else {
3080 UNREACHABLE(); // Not used by v8. 3080 UNREACHABLE(); // Not used by v8.
3081 } 3081 }
3082 } else if (((instr->Opc2Value() == 0x6)) && (instr->Opc3Value() == 0x3)) { 3082 } else if (((instr->Opc2Value() == 0x6)) && (instr->Opc3Value() == 0x3)) {
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after
4022 uintptr_t address = *stack_slot; 4022 uintptr_t address = *stack_slot;
4023 set_register(sp, current_sp + sizeof(uintptr_t)); 4023 set_register(sp, current_sp + sizeof(uintptr_t));
4024 return address; 4024 return address;
4025 } 4025 }
4026 4026
4027 } } // namespace v8::internal 4027 } } // namespace v8::internal
4028 4028
4029 #endif // USE_SIMULATOR 4029 #endif // USE_SIMULATOR
4030 4030
4031 #endif // V8_TARGET_ARCH_ARM 4031 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm64/simulator-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698