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