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 #if V8_TARGET_ARCH_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 __ neg(ecx); | 268 __ neg(ecx); |
269 if (stash_exponent_copy) { | 269 if (stash_exponent_copy) { |
270 __ mov(result_reg, MemOperand(esp, 0)); | 270 __ mov(result_reg, MemOperand(esp, 0)); |
271 } else { | 271 } else { |
272 __ mov(result_reg, exponent_operand); | 272 __ mov(result_reg, exponent_operand); |
273 } | 273 } |
274 __ and_(result_reg, | 274 __ and_(result_reg, |
275 Immediate(static_cast<uint32_t>(Double::kSignificandMask >> 32))); | 275 Immediate(static_cast<uint32_t>(Double::kSignificandMask >> 32))); |
276 __ add(result_reg, | 276 __ add(result_reg, |
277 Immediate(static_cast<uint32_t>(Double::kHiddenBit >> 32))); | 277 Immediate(static_cast<uint32_t>(Double::kHiddenBit >> 32))); |
278 __ shrd(result_reg, scratch1); | 278 __ shrd_cl(scratch1, result_reg); |
279 __ shr_cl(result_reg); | 279 __ shr_cl(result_reg); |
280 __ test(ecx, Immediate(32)); | 280 __ test(ecx, Immediate(32)); |
281 __ cmov(not_equal, scratch1, result_reg); | 281 __ cmov(not_equal, scratch1, result_reg); |
282 } | 282 } |
283 | 283 |
284 // If the double was negative, negate the integer result. | 284 // If the double was negative, negate the integer result. |
285 __ bind(&check_negative); | 285 __ bind(&check_negative); |
286 __ mov(result_reg, scratch1); | 286 __ mov(result_reg, scratch1); |
287 __ neg(result_reg); | 287 __ neg(result_reg); |
288 if (stash_exponent_copy) { | 288 if (stash_exponent_copy) { |
(...skipping 5613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5902 return_value_operand, NULL); | 5902 return_value_operand, NULL); |
5903 } | 5903 } |
5904 | 5904 |
5905 | 5905 |
5906 #undef __ | 5906 #undef __ |
5907 | 5907 |
5908 } // namespace internal | 5908 } // namespace internal |
5909 } // namespace v8 | 5909 } // namespace v8 |
5910 | 5910 |
5911 #endif // V8_TARGET_ARCH_IA32 | 5911 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |