OLD | NEW |
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 <limits.h> // For LONG_MIN, LONG_MAX. | 5 #include <limits.h> // For LONG_MIN, LONG_MAX. |
6 | 6 |
7 #if V8_TARGET_ARCH_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 #include "src/base/division-by-constant.h" | 9 #include "src/base/division-by-constant.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 2361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2372 return; | 2372 return; |
2373 } | 2373 } |
2374 | 2374 |
2375 if (kArchVariant == kMips64r6) { | 2375 if (kArchVariant == kMips64r6) { |
2376 sizeField = sizeField == D ? L : W; | 2376 sizeField = sizeField == D ? L : W; |
2377 } | 2377 } |
2378 | 2378 |
2379 DCHECK(nan || target); | 2379 DCHECK(nan || target); |
2380 // Check for unordered (NaN) cases. | 2380 // Check for unordered (NaN) cases. |
2381 if (nan) { | 2381 if (nan) { |
2382 bool long_branch = nan->is_bound() ? is_near(nan) : is_trampoline_emitted(); | 2382 bool long_branch = |
| 2383 nan->is_bound() ? !is_near(nan) : is_trampoline_emitted(); |
2383 if (kArchVariant != kMips64r6) { | 2384 if (kArchVariant != kMips64r6) { |
2384 if (long_branch) { | 2385 if (long_branch) { |
2385 Label skip; | 2386 Label skip; |
2386 c(UN, sizeField, cmp1, cmp2); | 2387 c(UN, sizeField, cmp1, cmp2); |
2387 bc1f(&skip); | 2388 bc1f(&skip); |
2388 nop(); | 2389 nop(); |
2389 BranchLong(nan, bd); | 2390 BranchLong(nan, bd); |
2390 bind(&skip); | 2391 bind(&skip); |
2391 } else { | 2392 } else { |
2392 c(UN, sizeField, cmp1, cmp2); | 2393 c(UN, sizeField, cmp1, cmp2); |
(...skipping 19 matching lines...) Expand all Loading... |
2412 bc1nez(nan, kDoubleCompareReg); | 2413 bc1nez(nan, kDoubleCompareReg); |
2413 if (bd == PROTECT) { | 2414 if (bd == PROTECT) { |
2414 nop(); | 2415 nop(); |
2415 } | 2416 } |
2416 } | 2417 } |
2417 } | 2418 } |
2418 } | 2419 } |
2419 | 2420 |
2420 if (target) { | 2421 if (target) { |
2421 bool long_branch = | 2422 bool long_branch = |
2422 target->is_bound() ? is_near(target) : is_trampoline_emitted(); | 2423 target->is_bound() ? !is_near(target) : is_trampoline_emitted(); |
2423 if (long_branch) { | 2424 if (long_branch) { |
2424 Label skip; | 2425 Label skip; |
2425 Condition neg_cond = NegateFpuCondition(cond); | 2426 Condition neg_cond = NegateFpuCondition(cond); |
2426 BranchShortF(sizeField, &skip, neg_cond, cmp1, cmp2, bd); | 2427 BranchShortF(sizeField, &skip, neg_cond, cmp1, cmp2, bd); |
2427 BranchLong(target, bd); | 2428 BranchLong(target, bd); |
2428 bind(&skip); | 2429 bind(&skip); |
2429 } else { | 2430 } else { |
2430 BranchShortF(sizeField, target, cond, cmp1, cmp2, bd); | 2431 BranchShortF(sizeField, target, cond, cmp1, cmp2, bd); |
2431 } | 2432 } |
2432 } | 2433 } |
(...skipping 4974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7407 if (mag.shift > 0) sra(result, result, mag.shift); | 7408 if (mag.shift > 0) sra(result, result, mag.shift); |
7408 srl(at, dividend, 31); | 7409 srl(at, dividend, 31); |
7409 Addu(result, result, Operand(at)); | 7410 Addu(result, result, Operand(at)); |
7410 } | 7411 } |
7411 | 7412 |
7412 | 7413 |
7413 } // namespace internal | 7414 } // namespace internal |
7414 } // namespace v8 | 7415 } // namespace v8 |
7415 | 7416 |
7416 #endif // V8_TARGET_ARCH_MIPS64 | 7417 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |