| OLD | NEW | 
|    1 // Copyright 2009 the V8 project authors. All rights reserved. |    1 // Copyright 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  125   // All registers are clobbered by the operation. |  125   // All registers are clobbered by the operation. | 
|  126   void RecordWriteNonSmi(Register object, |  126   void RecordWriteNonSmi(Register object, | 
|  127                          int offset, |  127                          int offset, | 
|  128                          Register value, |  128                          Register value, | 
|  129                          Register scratch); |  129                          Register scratch); | 
|  130  |  130  | 
|  131 #ifdef ENABLE_DEBUGGER_SUPPORT |  131 #ifdef ENABLE_DEBUGGER_SUPPORT | 
|  132   // --------------------------------------------------------------------------- |  132   // --------------------------------------------------------------------------- | 
|  133   // Debugger Support |  133   // Debugger Support | 
|  134  |  134  | 
|  135   void SaveRegistersToMemory(RegList regs); |  | 
|  136   void RestoreRegistersFromMemory(RegList regs); |  | 
|  137   void PushRegistersFromMemory(RegList regs); |  | 
|  138   void PopRegistersToMemory(RegList regs); |  | 
|  139   void CopyRegistersFromStackToMemory(Register base, |  | 
|  140                                       Register scratch, |  | 
|  141                                       RegList regs); |  | 
|  142   void DebugBreak(); |  135   void DebugBreak(); | 
|  143 #endif |  136 #endif | 
|  144  |  137  | 
|  145   // --------------------------------------------------------------------------- |  138   // --------------------------------------------------------------------------- | 
|  146   // Stack limit support |  139   // Stack limit support | 
|  147  |  140  | 
|  148   // Do simple test for stack overflow. This doesn't handle an overflow. |  141   // Do simple test for stack overflow. This doesn't handle an overflow. | 
|  149   void StackLimitCheck(Label* on_stack_limit_hit); |  142   void StackLimitCheck(Label* on_stack_limit_hit); | 
|  150  |  143  | 
|  151   // --------------------------------------------------------------------------- |  144   // --------------------------------------------------------------------------- | 
|  152   // Activation frames |  145   // Activation frames | 
|  153  |  146  | 
|  154   void EnterInternalFrame() { EnterFrame(StackFrame::INTERNAL); } |  147   void EnterInternalFrame() { EnterFrame(StackFrame::INTERNAL); } | 
|  155   void LeaveInternalFrame() { LeaveFrame(StackFrame::INTERNAL); } |  148   void LeaveInternalFrame() { LeaveFrame(StackFrame::INTERNAL); } | 
|  156  |  149  | 
|  157   void EnterConstructFrame() { EnterFrame(StackFrame::CONSTRUCT); } |  150   void EnterConstructFrame() { EnterFrame(StackFrame::CONSTRUCT); } | 
|  158   void LeaveConstructFrame() { LeaveFrame(StackFrame::CONSTRUCT); } |  151   void LeaveConstructFrame() { LeaveFrame(StackFrame::CONSTRUCT); } | 
|  159  |  152  | 
|  160   // Enter specific kind of exit frame; either in normal or |  153   // Enter specific kind of exit frame; either in normal or | 
|  161   // debug mode. Expects the number of arguments in register rax and |  154   // debug mode. Expects the number of arguments in register rax and | 
|  162   // sets up the number of arguments in register rdi and the pointer |  155   // sets up the number of arguments in register rdi and the pointer | 
|  163   // to the first argument in register rsi. |  156   // to the first argument in register rsi. | 
|  164   void EnterExitFrame(ExitFrame::Mode mode, int result_size = 1); |  157   void EnterExitFrame(int result_size = 1); | 
|  165  |  158  | 
|  166   void EnterApiExitFrame(ExitFrame::Mode mode, |  159   void EnterApiExitFrame(int stack_space, | 
|  167                          int stack_space, |  | 
|  168                          int argc, |  160                          int argc, | 
|  169                          int result_size = 1); |  161                          int result_size = 1); | 
|  170  |  162  | 
|  171   // Leave the current exit frame. Expects/provides the return value in |  163   // Leave the current exit frame. Expects/provides the return value in | 
|  172   // register rax:rdx (untouched) and the pointer to the first |  164   // register rax:rdx (untouched) and the pointer to the first | 
|  173   // argument in register rsi. |  165   // argument in register rsi. | 
|  174   void LeaveExitFrame(ExitFrame::Mode mode, int result_size = 1); |  166   void LeaveExitFrame(int result_size = 1); | 
|  175  |  167  | 
|  176  |  168  | 
|  177   // --------------------------------------------------------------------------- |  169   // --------------------------------------------------------------------------- | 
|  178   // JavaScript invokes |  170   // JavaScript invokes | 
|  179  |  171  | 
|  180   // Invoke the JavaScript function code by either calling or jumping. |  172   // Invoke the JavaScript function code by either calling or jumping. | 
|  181   void InvokeCode(Register code, |  173   void InvokeCode(Register code, | 
|  182                   const ParameterCount& expected, |  174                   const ParameterCount& expected, | 
|  183                   const ParameterCount& actual, |  175                   const ParameterCount& actual, | 
|  184                   InvokeFlag flag); |  176                   InvokeFlag flag); | 
| (...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  871                       const ParameterCount& actual, |  863                       const ParameterCount& actual, | 
|  872                       Handle<Code> code_constant, |  864                       Handle<Code> code_constant, | 
|  873                       Register code_register, |  865                       Register code_register, | 
|  874                       Label* done, |  866                       Label* done, | 
|  875                       InvokeFlag flag); |  867                       InvokeFlag flag); | 
|  876  |  868  | 
|  877   // Activation support. |  869   // Activation support. | 
|  878   void EnterFrame(StackFrame::Type type); |  870   void EnterFrame(StackFrame::Type type); | 
|  879   void LeaveFrame(StackFrame::Type type); |  871   void LeaveFrame(StackFrame::Type type); | 
|  880  |  872  | 
|  881   void EnterExitFramePrologue(ExitFrame::Mode mode, bool save_rax); |  873   void EnterExitFramePrologue(bool save_rax); | 
|  882   void EnterExitFrameEpilogue(ExitFrame::Mode mode, int result_size, int argc); |  874   void EnterExitFrameEpilogue(int result_size, int argc); | 
|  883  |  875  | 
|  884   // Allocation support helpers. |  876   // Allocation support helpers. | 
|  885   // Loads the top of new-space into the result register. |  877   // Loads the top of new-space into the result register. | 
|  886   // If flags contains RESULT_CONTAINS_TOP then result_end is valid and |  878   // If flags contains RESULT_CONTAINS_TOP then result_end is valid and | 
|  887   // already contains the top of new-space, and scratch is invalid. |  879   // already contains the top of new-space, and scratch is invalid. | 
|  888   // Otherwise the address of the new-space top is loaded into scratch (if |  880   // Otherwise the address of the new-space top is loaded into scratch (if | 
|  889   // scratch is valid), and the new-space top is loaded into result. |  881   // scratch is valid), and the new-space top is loaded into result. | 
|  890   void LoadAllocationTopHelper(Register result, |  882   void LoadAllocationTopHelper(Register result, | 
|  891                                Register result_end, |  883                                Register result_end, | 
|  892                                Register scratch, |  884                                Register scratch, | 
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  960   }                                                                       \ |  952   }                                                                       \ | 
|  961   masm-> |  953   masm-> | 
|  962 #else |  954 #else | 
|  963 #define ACCESS_MASM(masm) masm-> |  955 #define ACCESS_MASM(masm) masm-> | 
|  964 #endif |  956 #endif | 
|  965  |  957  | 
|  966  |  958  | 
|  967 } }  // namespace v8::internal |  959 } }  // namespace v8::internal | 
|  968  |  960  | 
|  969 #endif  // V8_X64_MACRO_ASSEMBLER_X64_H_ |  961 #endif  // V8_X64_MACRO_ASSEMBLER_X64_H_ | 
| OLD | NEW |