| 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_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 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 3966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3977 Nop(kNoCodeAgeSequenceLength - Assembler::kShortCallInstructionLength); | 3977 Nop(kNoCodeAgeSequenceLength - Assembler::kShortCallInstructionLength); |
| 3978 } else { | 3978 } else { |
| 3979 pushq(rbp); // Caller's frame pointer. | 3979 pushq(rbp); // Caller's frame pointer. |
| 3980 movp(rbp, rsp); | 3980 movp(rbp, rsp); |
| 3981 Push(rsi); // Callee's context. | 3981 Push(rsi); // Callee's context. |
| 3982 Push(rdi); // Callee's JS function. | 3982 Push(rdi); // Callee's JS function. |
| 3983 } | 3983 } |
| 3984 } | 3984 } |
| 3985 | 3985 |
| 3986 | 3986 |
| 3987 void MacroAssembler::EnterFrame(StackFrame::Type type) { | 3987 void MacroAssembler::EnterFrame(StackFrame::Type type, |
| 3988 bool load_constant_pool_pointer_reg) { |
| 3989 DCHECK(!load_constant_pool_pointer_reg); |
| 3988 pushq(rbp); | 3990 pushq(rbp); |
| 3989 movp(rbp, rsp); | 3991 movp(rbp, rsp); |
| 3990 Push(rsi); // Context. | 3992 Push(rsi); // Context. |
| 3991 Push(Smi::FromInt(type)); | 3993 Push(Smi::FromInt(type)); |
| 3992 Move(kScratchRegister, CodeObject(), RelocInfo::EMBEDDED_OBJECT); | 3994 Move(kScratchRegister, CodeObject(), RelocInfo::EMBEDDED_OBJECT); |
| 3993 Push(kScratchRegister); | 3995 Push(kScratchRegister); |
| 3994 if (emit_debug_code()) { | 3996 if (emit_debug_code()) { |
| 3995 Move(kScratchRegister, | 3997 Move(kScratchRegister, |
| 3996 isolate()->factory()->undefined_value(), | 3998 isolate()->factory()->undefined_value(), |
| 3997 RelocInfo::EMBEDDED_OBJECT); | 3999 RelocInfo::EMBEDDED_OBJECT); |
| (...skipping 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5335 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); | 5337 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); |
| 5336 movl(rax, dividend); | 5338 movl(rax, dividend); |
| 5337 shrl(rax, Immediate(31)); | 5339 shrl(rax, Immediate(31)); |
| 5338 addl(rdx, rax); | 5340 addl(rdx, rax); |
| 5339 } | 5341 } |
| 5340 | 5342 |
| 5341 | 5343 |
| 5342 } } // namespace v8::internal | 5344 } } // namespace v8::internal |
| 5343 | 5345 |
| 5344 #endif // V8_TARGET_ARCH_X64 | 5346 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |