| 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/base/division-by-constant.h" | 8 #include "src/base/division-by-constant.h" |
| 9 #include "src/base/utils/random-number-generator.h" | 9 #include "src/base/utils/random-number-generator.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 2462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2473 void MacroAssembler::CallCFunction(ExternalReference function, | 2473 void MacroAssembler::CallCFunction(ExternalReference function, |
| 2474 int num_arguments) { | 2474 int num_arguments) { |
| 2475 // Trashing eax is ok as it will be the return value. | 2475 // Trashing eax is ok as it will be the return value. |
| 2476 mov(eax, Immediate(function)); | 2476 mov(eax, Immediate(function)); |
| 2477 CallCFunction(eax, num_arguments); | 2477 CallCFunction(eax, num_arguments); |
| 2478 } | 2478 } |
| 2479 | 2479 |
| 2480 | 2480 |
| 2481 void MacroAssembler::CallCFunction(Register function, | 2481 void MacroAssembler::CallCFunction(Register function, |
| 2482 int num_arguments) { | 2482 int num_arguments) { |
| 2483 DCHECK_LE(num_arguments, kMaxCParameters); |
| 2483 DCHECK(has_frame()); | 2484 DCHECK(has_frame()); |
| 2484 // Check stack alignment. | 2485 // Check stack alignment. |
| 2485 if (emit_debug_code()) { | 2486 if (emit_debug_code()) { |
| 2486 CheckStackAlignment(); | 2487 CheckStackAlignment(); |
| 2487 } | 2488 } |
| 2488 | 2489 |
| 2489 call(function); | 2490 call(function); |
| 2490 if (base::OS::ActivationFrameAlignment() != 0) { | 2491 if (base::OS::ActivationFrameAlignment() != 0) { |
| 2491 mov(esp, Operand(esp, num_arguments * kPointerSize)); | 2492 mov(esp, Operand(esp, num_arguments * kPointerSize)); |
| 2492 } else { | 2493 } else { |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2777 mov(eax, dividend); | 2778 mov(eax, dividend); |
| 2778 shr(eax, 31); | 2779 shr(eax, 31); |
| 2779 add(edx, eax); | 2780 add(edx, eax); |
| 2780 } | 2781 } |
| 2781 | 2782 |
| 2782 | 2783 |
| 2783 } // namespace internal | 2784 } // namespace internal |
| 2784 } // namespace v8 | 2785 } // namespace v8 |
| 2785 | 2786 |
| 2786 #endif // V8_TARGET_ARCH_IA32 | 2787 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |