| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // operation. RecordWrite filters out smis so it does not update the | 92 // operation. RecordWrite filters out smis so it does not update the |
| 93 // write barrier if the value is a smi. | 93 // write barrier if the value is a smi. |
| 94 void RecordWrite(Register object, | 94 void RecordWrite(Register object, |
| 95 Register address, | 95 Register address, |
| 96 Register value); | 96 Register value); |
| 97 | 97 |
| 98 #ifdef ENABLE_DEBUGGER_SUPPORT | 98 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 99 // --------------------------------------------------------------------------- | 99 // --------------------------------------------------------------------------- |
| 100 // Debugger Support | 100 // Debugger Support |
| 101 | 101 |
| 102 void SaveRegistersToMemory(RegList regs); | |
| 103 void RestoreRegistersFromMemory(RegList regs); | |
| 104 void PushRegistersFromMemory(RegList regs); | |
| 105 void PopRegistersToMemory(RegList regs); | |
| 106 void CopyRegistersFromStackToMemory(Register base, | |
| 107 Register scratch, | |
| 108 RegList regs); | |
| 109 void DebugBreak(); | 102 void DebugBreak(); |
| 110 #endif | 103 #endif |
| 111 | 104 |
| 112 // --------------------------------------------------------------------------- | 105 // --------------------------------------------------------------------------- |
| 113 // Stack limit support | 106 // Stack limit support |
| 114 | 107 |
| 115 // Do simple test for stack overflow. This doesn't handle an overflow. | 108 // Do simple test for stack overflow. This doesn't handle an overflow. |
| 116 void StackLimitCheck(Label* on_stack_limit_hit); | 109 void StackLimitCheck(Label* on_stack_limit_hit); |
| 117 | 110 |
| 118 // --------------------------------------------------------------------------- | 111 // --------------------------------------------------------------------------- |
| 119 // Activation frames | 112 // Activation frames |
| 120 | 113 |
| 121 void EnterInternalFrame() { EnterFrame(StackFrame::INTERNAL); } | 114 void EnterInternalFrame() { EnterFrame(StackFrame::INTERNAL); } |
| 122 void LeaveInternalFrame() { LeaveFrame(StackFrame::INTERNAL); } | 115 void LeaveInternalFrame() { LeaveFrame(StackFrame::INTERNAL); } |
| 123 | 116 |
| 124 void EnterConstructFrame() { EnterFrame(StackFrame::CONSTRUCT); } | 117 void EnterConstructFrame() { EnterFrame(StackFrame::CONSTRUCT); } |
| 125 void LeaveConstructFrame() { LeaveFrame(StackFrame::CONSTRUCT); } | 118 void LeaveConstructFrame() { LeaveFrame(StackFrame::CONSTRUCT); } |
| 126 | 119 |
| 127 // Enter specific kind of exit frame; either in normal or debug mode. | 120 // Enter specific kind of exit frame; either in normal or debug mode. |
| 128 // Expects the number of arguments in register eax and | 121 // Expects the number of arguments in register eax and |
| 129 // sets up the number of arguments in register edi and the pointer | 122 // sets up the number of arguments in register edi and the pointer |
| 130 // to the first argument in register esi. | 123 // to the first argument in register esi. |
| 131 void EnterExitFrame(ExitFrame::Mode mode); | 124 void EnterExitFrame(); |
| 132 | 125 |
| 133 void EnterApiExitFrame(ExitFrame::Mode mode, int stack_space, int argc); | 126 void EnterApiExitFrame(int stack_space, int argc); |
| 134 | 127 |
| 135 // Leave the current exit frame. Expects the return value in | 128 // Leave the current exit frame. Expects the return value in |
| 136 // register eax:edx (untouched) and the pointer to the first | 129 // register eax:edx (untouched) and the pointer to the first |
| 137 // argument in register esi. | 130 // argument in register esi. |
| 138 void LeaveExitFrame(ExitFrame::Mode mode); | 131 void LeaveExitFrame(); |
| 139 | 132 |
| 140 // Find the function context up the context chain. | 133 // Find the function context up the context chain. |
| 141 void LoadContext(Register dst, int context_chain_length); | 134 void LoadContext(Register dst, int context_chain_length); |
| 142 | 135 |
| 143 // --------------------------------------------------------------------------- | 136 // --------------------------------------------------------------------------- |
| 144 // JavaScript invokes | 137 // JavaScript invokes |
| 145 | 138 |
| 146 // Invoke the JavaScript function code by either calling or jumping. | 139 // Invoke the JavaScript function code by either calling or jumping. |
| 147 void InvokeCode(const Operand& code, | 140 void InvokeCode(const Operand& code, |
| 148 const ParameterCount& expected, | 141 const ParameterCount& expected, |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 const ParameterCount& actual, | 550 const ParameterCount& actual, |
| 558 Handle<Code> code_constant, | 551 Handle<Code> code_constant, |
| 559 const Operand& code_operand, | 552 const Operand& code_operand, |
| 560 Label* done, | 553 Label* done, |
| 561 InvokeFlag flag); | 554 InvokeFlag flag); |
| 562 | 555 |
| 563 // Activation support. | 556 // Activation support. |
| 564 void EnterFrame(StackFrame::Type type); | 557 void EnterFrame(StackFrame::Type type); |
| 565 void LeaveFrame(StackFrame::Type type); | 558 void LeaveFrame(StackFrame::Type type); |
| 566 | 559 |
| 567 void EnterExitFramePrologue(ExitFrame::Mode mode); | 560 void EnterExitFramePrologue(); |
| 568 void EnterExitFrameEpilogue(ExitFrame::Mode mode, int argc); | 561 void EnterExitFrameEpilogue(int argc); |
| 569 | 562 |
| 570 // Allocation support helpers. | 563 // Allocation support helpers. |
| 571 void LoadAllocationTopHelper(Register result, | 564 void LoadAllocationTopHelper(Register result, |
| 572 Register result_end, | 565 Register result_end, |
| 573 Register scratch, | 566 Register scratch, |
| 574 AllocationFlags flags); | 567 AllocationFlags flags); |
| 575 void UpdateAllocationTopHelper(Register result_end, Register scratch); | 568 void UpdateAllocationTopHelper(Register result_end, Register scratch); |
| 576 | 569 |
| 577 // Helper for PopHandleScope. Allowed to perform a GC and returns | 570 // Helper for PopHandleScope. Allowed to perform a GC and returns |
| 578 // NULL if gc_allowed. Does not perform a GC if !gc_allowed, and | 571 // NULL if gc_allowed. Does not perform a GC if !gc_allowed, and |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 } \ | 632 } \ |
| 640 masm-> | 633 masm-> |
| 641 #else | 634 #else |
| 642 #define ACCESS_MASM(masm) masm-> | 635 #define ACCESS_MASM(masm) masm-> |
| 643 #endif | 636 #endif |
| 644 | 637 |
| 645 | 638 |
| 646 } } // namespace v8::internal | 639 } } // namespace v8::internal |
| 647 | 640 |
| 648 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 641 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
| OLD | NEW |