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

Side by Side Diff: src/mips/simulator-mips.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 | « src/arm64/simulator-arm64.cc ('k') | src/mips64/simulator-mips64.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 <limits.h> 5 #include <limits.h>
6 #include <stdarg.h> 6 #include <stdarg.h>
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "src/v8.h" 10 #include "src/v8.h"
11 11
12 #if V8_TARGET_ARCH_MIPS 12 #if V8_TARGET_ARCH_MIPS
13 13
14 #include "src/assembler.h" 14 #include "src/assembler.h"
15 #include "src/base/bits.h" 15 #include "src/base/bits.h"
16 #include "src/codegen.h"
16 #include "src/disasm.h" 17 #include "src/disasm.h"
17 #include "src/mips/constants-mips.h" 18 #include "src/mips/constants-mips.h"
18 #include "src/mips/simulator-mips.h" 19 #include "src/mips/simulator-mips.h"
19 #include "src/ostreams.h" 20 #include "src/ostreams.h"
20 21
21 22
22 // Only build the simulator if not compiling for real MIPS hardware. 23 // Only build the simulator if not compiling for real MIPS hardware.
23 #if defined(USE_SIMULATOR) 24 #if defined(USE_SIMULATOR)
24 25
25 namespace v8 { 26 namespace v8 {
(...skipping 2211 matching lines...) Expand 10 before | Expand all | Expand 10 after
2237 case ABS_D: 2238 case ABS_D:
2238 set_fpu_register_double(fd_reg, fabs(fs)); 2239 set_fpu_register_double(fd_reg, fabs(fs));
2239 break; 2240 break;
2240 case MOV_D: 2241 case MOV_D:
2241 set_fpu_register_double(fd_reg, fs); 2242 set_fpu_register_double(fd_reg, fs);
2242 break; 2243 break;
2243 case NEG_D: 2244 case NEG_D:
2244 set_fpu_register_double(fd_reg, -fs); 2245 set_fpu_register_double(fd_reg, -fs);
2245 break; 2246 break;
2246 case SQRT_D: 2247 case SQRT_D:
2247 set_fpu_register_double(fd_reg, sqrt(fs)); 2248 set_fpu_register_double(fd_reg, fast_sqrt(fs));
2248 break; 2249 break;
2249 case C_UN_D: 2250 case C_UN_D:
2250 set_fcsr_bit(fcsr_cc, std::isnan(fs) || std::isnan(ft)); 2251 set_fcsr_bit(fcsr_cc, std::isnan(fs) || std::isnan(ft));
2251 break; 2252 break;
2252 case C_EQ_D: 2253 case C_EQ_D:
2253 set_fcsr_bit(fcsr_cc, (fs == ft)); 2254 set_fcsr_bit(fcsr_cc, (fs == ft));
2254 break; 2255 break;
2255 case C_UEQ_D: 2256 case C_UEQ_D:
2256 set_fcsr_bit(fcsr_cc, 2257 set_fcsr_bit(fcsr_cc,
2257 (fs == ft) || (std::isnan(fs) || std::isnan(ft))); 2258 (fs == ft) || (std::isnan(fs) || std::isnan(ft)));
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after
3259 } 3260 }
3260 3261
3261 3262
3262 #undef UNSUPPORTED 3263 #undef UNSUPPORTED
3263 3264
3264 } } // namespace v8::internal 3265 } } // namespace v8::internal
3265 3266
3266 #endif // USE_SIMULATOR 3267 #endif // USE_SIMULATOR
3267 3268
3268 #endif // V8_TARGET_ARCH_MIPS 3269 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/arm64/simulator-arm64.cc ('k') | src/mips64/simulator-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698