| 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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
| (...skipping 2141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2152 return; | 2152 return; |
| 2153 } | 2153 } |
| 2154 | 2154 |
| 2155 if (IsMipsArchVariant(kMips32r6)) { | 2155 if (IsMipsArchVariant(kMips32r6)) { |
| 2156 sizeField = sizeField == D ? L : W; | 2156 sizeField = sizeField == D ? L : W; |
| 2157 } | 2157 } |
| 2158 DCHECK(nan || target); | 2158 DCHECK(nan || target); |
| 2159 // Check for unordered (NaN) cases. | 2159 // Check for unordered (NaN) cases. |
| 2160 if (nan) { | 2160 if (nan) { |
| 2161 bool long_branch = | 2161 bool long_branch = |
| 2162 nan->is_bound() ? is_near(nan) : is_trampoline_emitted(); | 2162 nan->is_bound() ? !is_near(nan) : is_trampoline_emitted(); |
| 2163 if (!IsMipsArchVariant(kMips32r6)) { | 2163 if (!IsMipsArchVariant(kMips32r6)) { |
| 2164 if (long_branch) { | 2164 if (long_branch) { |
| 2165 Label skip; | 2165 Label skip; |
| 2166 c(UN, sizeField, cmp1, cmp2); | 2166 c(UN, sizeField, cmp1, cmp2); |
| 2167 bc1f(&skip); | 2167 bc1f(&skip); |
| 2168 nop(); | 2168 nop(); |
| 2169 BranchLong(nan, bd); | 2169 BranchLong(nan, bd); |
| 2170 bind(&skip); | 2170 bind(&skip); |
| 2171 } else { | 2171 } else { |
| 2172 c(UN, sizeField, cmp1, cmp2); | 2172 c(UN, sizeField, cmp1, cmp2); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 2191 bc1nez(nan, kDoubleCompareReg); | 2191 bc1nez(nan, kDoubleCompareReg); |
| 2192 if (bd == PROTECT) { | 2192 if (bd == PROTECT) { |
| 2193 nop(); | 2193 nop(); |
| 2194 } | 2194 } |
| 2195 } | 2195 } |
| 2196 } | 2196 } |
| 2197 } | 2197 } |
| 2198 | 2198 |
| 2199 if (target) { | 2199 if (target) { |
| 2200 bool long_branch = | 2200 bool long_branch = |
| 2201 target->is_bound() ? is_near(target) : is_trampoline_emitted(); | 2201 target->is_bound() ? !is_near(target) : is_trampoline_emitted(); |
| 2202 if (long_branch) { | 2202 if (long_branch) { |
| 2203 Label skip; | 2203 Label skip; |
| 2204 Condition neg_cond = NegateFpuCondition(cond); | 2204 Condition neg_cond = NegateFpuCondition(cond); |
| 2205 BranchShortF(sizeField, &skip, neg_cond, cmp1, cmp2, bd); | 2205 BranchShortF(sizeField, &skip, neg_cond, cmp1, cmp2, bd); |
| 2206 BranchLong(target, bd); | 2206 BranchLong(target, bd); |
| 2207 bind(&skip); | 2207 bind(&skip); |
| 2208 } else { | 2208 } else { |
| 2209 BranchShortF(sizeField, target, cond, cmp1, cmp2, bd); | 2209 BranchShortF(sizeField, target, cond, cmp1, cmp2, bd); |
| 2210 } | 2210 } |
| 2211 } | 2211 } |
| (...skipping 4768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6980 if (mag.shift > 0) sra(result, result, mag.shift); | 6980 if (mag.shift > 0) sra(result, result, mag.shift); |
| 6981 srl(at, dividend, 31); | 6981 srl(at, dividend, 31); |
| 6982 Addu(result, result, Operand(at)); | 6982 Addu(result, result, Operand(at)); |
| 6983 } | 6983 } |
| 6984 | 6984 |
| 6985 | 6985 |
| 6986 } // namespace internal | 6986 } // namespace internal |
| 6987 } // namespace v8 | 6987 } // namespace v8 |
| 6988 | 6988 |
| 6989 #endif // V8_TARGET_ARCH_MIPS | 6989 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |