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 #ifndef V8_X64_MACRO_ASSEMBLER_X64_H_ | 5 #ifndef V8_X64_MACRO_ASSEMBLER_X64_H_ |
6 #define V8_X64_MACRO_ASSEMBLER_X64_H_ | 6 #define V8_X64_MACRO_ASSEMBLER_X64_H_ |
7 | 7 |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
10 #include "src/base/flags.h" | 10 #include "src/base/flags.h" |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 ExternalReference roots_array_start = | 361 ExternalReference roots_array_start = |
362 ExternalReference::roots_array_start(isolate()); | 362 ExternalReference::roots_array_start(isolate()); |
363 Move(kRootRegister, roots_array_start); | 363 Move(kRootRegister, roots_array_start); |
364 addp(kRootRegister, Immediate(kRootRegisterBias)); | 364 addp(kRootRegister, Immediate(kRootRegisterBias)); |
365 } | 365 } |
366 | 366 |
367 // --------------------------------------------------------------------------- | 367 // --------------------------------------------------------------------------- |
368 // JavaScript invokes | 368 // JavaScript invokes |
369 | 369 |
370 // Invoke the JavaScript function code by either calling or jumping. | 370 // Invoke the JavaScript function code by either calling or jumping. |
371 void InvokeCode(Register code, | 371 void InvokeFunctionCode(Register function, Register new_target, |
372 Register new_target, | 372 const ParameterCount& expected, |
373 const ParameterCount& expected, | 373 const ParameterCount& actual, InvokeFlag flag, |
374 const ParameterCount& actual, | 374 const CallWrapper& call_wrapper); |
375 InvokeFlag flag, | |
376 const CallWrapper& call_wrapper); | |
377 | 375 |
378 // Invoke the JavaScript function in the given register. Changes the | 376 // Invoke the JavaScript function in the given register. Changes the |
379 // current context to the context in the function before invoking. | 377 // current context to the context in the function before invoking. |
380 void InvokeFunction(Register function, | 378 void InvokeFunction(Register function, |
381 Register new_target, | 379 Register new_target, |
382 const ParameterCount& actual, | 380 const ParameterCount& actual, |
383 InvokeFlag flag, | 381 InvokeFlag flag, |
384 const CallWrapper& call_wrapper); | 382 const CallWrapper& call_wrapper); |
385 | 383 |
386 void InvokeFunction(Register function, | 384 void InvokeFunction(Register function, |
387 Register new_target, | 385 Register new_target, |
388 const ParameterCount& expected, | 386 const ParameterCount& expected, |
389 const ParameterCount& actual, | 387 const ParameterCount& actual, |
390 InvokeFlag flag, | 388 InvokeFlag flag, |
391 const CallWrapper& call_wrapper); | 389 const CallWrapper& call_wrapper); |
392 | 390 |
393 void InvokeFunction(Handle<JSFunction> function, | 391 void InvokeFunction(Handle<JSFunction> function, |
394 const ParameterCount& expected, | 392 const ParameterCount& expected, |
395 const ParameterCount& actual, | 393 const ParameterCount& actual, |
396 InvokeFlag flag, | 394 InvokeFlag flag, |
397 const CallWrapper& call_wrapper); | 395 const CallWrapper& call_wrapper); |
398 | 396 |
399 // Invoke specified builtin JavaScript function. | 397 // Invoke specified builtin JavaScript function. |
400 void InvokeBuiltin(int native_context_index, InvokeFlag flag, | 398 void InvokeBuiltin(int native_context_index, InvokeFlag flag, |
401 const CallWrapper& call_wrapper = NullCallWrapper()); | 399 const CallWrapper& call_wrapper = NullCallWrapper()); |
402 | 400 |
403 // Store the function for the given builtin in the target register. | 401 // Store the function for the given builtin in the target register. |
404 void GetBuiltinFunction(Register target, int native_context_index); | 402 void GetBuiltinFunction(Register target, int native_context_index); |
405 | 403 |
406 // Store the code object for the given builtin in the target register. | |
407 void GetBuiltinEntry(Register target, int native_context_index); | |
408 | |
409 | |
410 // --------------------------------------------------------------------------- | 404 // --------------------------------------------------------------------------- |
411 // Smi tagging, untagging and operations on tagged smis. | 405 // Smi tagging, untagging and operations on tagged smis. |
412 | 406 |
413 // Support for constant splitting. | 407 // Support for constant splitting. |
414 bool IsUnsafeInt(const int32_t x); | 408 bool IsUnsafeInt(const int32_t x); |
415 void SafeMove(Register dst, Smi* src); | 409 void SafeMove(Register dst, Smi* src); |
416 void SafePush(Smi* src); | 410 void SafePush(Smi* src); |
417 | 411 |
418 // Conversions between tagged smi values and non-tagged integer values. | 412 // Conversions between tagged smi values and non-tagged integer values. |
419 | 413 |
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1585 | 1579 |
1586 // Helper functions for generating invokes. | 1580 // Helper functions for generating invokes. |
1587 void InvokePrologue(const ParameterCount& expected, | 1581 void InvokePrologue(const ParameterCount& expected, |
1588 const ParameterCount& actual, | 1582 const ParameterCount& actual, |
1589 Label* done, | 1583 Label* done, |
1590 bool* definitely_mismatches, | 1584 bool* definitely_mismatches, |
1591 InvokeFlag flag, | 1585 InvokeFlag flag, |
1592 Label::Distance near_jump, | 1586 Label::Distance near_jump, |
1593 const CallWrapper& call_wrapper); | 1587 const CallWrapper& call_wrapper); |
1594 | 1588 |
| 1589 void FloodFunctionIfStepping(Register fun, Register new_target, |
| 1590 const ParameterCount& expected, |
| 1591 const ParameterCount& actual); |
| 1592 |
1595 void EnterExitFramePrologue(bool save_rax); | 1593 void EnterExitFramePrologue(bool save_rax); |
1596 | 1594 |
1597 // Allocates arg_stack_space * kPointerSize memory (not GCed) on the stack | 1595 // Allocates arg_stack_space * kPointerSize memory (not GCed) on the stack |
1598 // accessible via StackSpaceOperand. | 1596 // accessible via StackSpaceOperand. |
1599 void EnterExitFrameEpilogue(int arg_stack_space, bool save_doubles); | 1597 void EnterExitFrameEpilogue(int arg_stack_space, bool save_doubles); |
1600 | 1598 |
1601 void LeaveExitFrameEpilogue(bool restore_context); | 1599 void LeaveExitFrameEpilogue(bool restore_context); |
1602 | 1600 |
1603 // Allocation support helpers. | 1601 // Allocation support helpers. |
1604 // Loads the top of new-space into the result register. | 1602 // Loads the top of new-space into the result register. |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1732 } \ | 1730 } \ |
1733 masm-> | 1731 masm-> |
1734 #else | 1732 #else |
1735 #define ACCESS_MASM(masm) masm-> | 1733 #define ACCESS_MASM(masm) masm-> |
1736 #endif | 1734 #endif |
1737 | 1735 |
1738 } // namespace internal | 1736 } // namespace internal |
1739 } // namespace v8 | 1737 } // namespace v8 |
1740 | 1738 |
1741 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1739 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |