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 "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 SlowTruncateToI(result_reg, esp, 0); | 339 SlowTruncateToI(result_reg, esp, 0); |
340 add(esp, Immediate(kDoubleSize)); | 340 add(esp, Immediate(kDoubleSize)); |
341 } else { | 341 } else { |
342 SlowTruncateToI(result_reg, input_reg); | 342 SlowTruncateToI(result_reg, input_reg); |
343 } | 343 } |
344 } | 344 } |
345 bind(&done); | 345 bind(&done); |
346 } | 346 } |
347 | 347 |
348 | 348 |
349 void MacroAssembler::LoadUint32(XMMRegister dst, | 349 void MacroAssembler::LoadUint32(XMMRegister dst, const Operand& src) { |
350 Register src) { | |
351 Label done; | 350 Label done; |
352 cmp(src, Immediate(0)); | 351 cmp(src, Immediate(0)); |
353 ExternalReference uint32_bias = | 352 ExternalReference uint32_bias = ExternalReference::address_of_uint32_bias(); |
354 ExternalReference::address_of_uint32_bias(); | |
355 Cvtsi2sd(dst, src); | 353 Cvtsi2sd(dst, src); |
356 j(not_sign, &done, Label::kNear); | 354 j(not_sign, &done, Label::kNear); |
357 addsd(dst, Operand::StaticVariable(uint32_bias)); | 355 addsd(dst, Operand::StaticVariable(uint32_bias)); |
358 bind(&done); | 356 bind(&done); |
359 } | 357 } |
360 | 358 |
361 | 359 |
362 void MacroAssembler::RecordWriteArray( | 360 void MacroAssembler::RecordWriteArray( |
363 Register object, | 361 Register object, |
364 Register value, | 362 Register value, |
(...skipping 3029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3394 if (mag.shift > 0) sar(edx, mag.shift); | 3392 if (mag.shift > 0) sar(edx, mag.shift); |
3395 mov(eax, dividend); | 3393 mov(eax, dividend); |
3396 shr(eax, 31); | 3394 shr(eax, 31); |
3397 add(edx, eax); | 3395 add(edx, eax); |
3398 } | 3396 } |
3399 | 3397 |
3400 | 3398 |
3401 } } // namespace v8::internal | 3399 } } // namespace v8::internal |
3402 | 3400 |
3403 #endif // V8_TARGET_ARCH_IA32 | 3401 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |