OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 93 |
94 | 94 |
95 #define __ ACCESS_MASM(masm) | 95 #define __ ACCESS_MASM(masm) |
96 | 96 |
97 | 97 |
98 static void Generate_DebugBreakCallHelper(MacroAssembler* masm, | 98 static void Generate_DebugBreakCallHelper(MacroAssembler* masm, |
99 RegList object_regs, | 99 RegList object_regs, |
100 RegList non_object_regs, | 100 RegList non_object_regs, |
101 bool convert_call_to_jmp) { | 101 bool convert_call_to_jmp) { |
102 // Enter an internal frame. | 102 // Enter an internal frame. |
103 __ EnterInternalFrame(); | 103 { |
| 104 FrameScope scope(masm, StackFrame::INTERNAL); |
104 | 105 |
105 // Store the registers containing live values on the expression stack to | 106 // Store the registers containing live values on the expression stack to |
106 // make sure that these are correctly updated during GC. Non object values | 107 // make sure that these are correctly updated during GC. Non object values |
107 // are stored as as two smis causing it to be untouched by GC. | 108 // are stored as as two smis causing it to be untouched by GC. |
108 ASSERT((object_regs & ~kJSCallerSaved) == 0); | 109 ASSERT((object_regs & ~kJSCallerSaved) == 0); |
109 ASSERT((non_object_regs & ~kJSCallerSaved) == 0); | 110 ASSERT((non_object_regs & ~kJSCallerSaved) == 0); |
110 ASSERT((object_regs & non_object_regs) == 0); | 111 ASSERT((object_regs & non_object_regs) == 0); |
111 for (int i = 0; i < kNumJSCallerSaved; i++) { | 112 for (int i = 0; i < kNumJSCallerSaved; i++) { |
112 int r = JSCallerSavedCode(i); | 113 int r = JSCallerSavedCode(i); |
113 Register reg = { r }; | 114 Register reg = { r }; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 __ pop(kScratchRegister); | 151 __ pop(kScratchRegister); |
151 __ SmiToInteger32(kScratchRegister, kScratchRegister); | 152 __ SmiToInteger32(kScratchRegister, kScratchRegister); |
152 __ shl(kScratchRegister, Immediate(32)); | 153 __ shl(kScratchRegister, Immediate(32)); |
153 __ pop(reg); | 154 __ pop(reg); |
154 __ SmiToInteger32(reg, reg); | 155 __ SmiToInteger32(reg, reg); |
155 __ or_(reg, kScratchRegister); | 156 __ or_(reg, kScratchRegister); |
156 } | 157 } |
157 } | 158 } |
158 | 159 |
159 // Get rid of the internal frame. | 160 // Get rid of the internal frame. |
160 __ LeaveInternalFrame(); | 161 } |
161 | 162 |
162 // If this call did not replace a call but patched other code then there will | 163 // If this call did not replace a call but patched other code then there will |
163 // be an unwanted return address left on the stack. Here we get rid of that. | 164 // be an unwanted return address left on the stack. Here we get rid of that. |
164 if (convert_call_to_jmp) { | 165 if (convert_call_to_jmp) { |
165 __ addq(rsp, Immediate(kPointerSize)); | 166 __ addq(rsp, Immediate(kPointerSize)); |
166 } | 167 } |
167 | 168 |
168 // Now that the break point has been handled, resume normal execution by | 169 // Now that the break point has been handled, resume normal execution by |
169 // jumping to the target address intended by the caller and that was | 170 // jumping to the target address intended by the caller and that was |
170 // overwritten by the address of DebugBreakXXX. | 171 // overwritten by the address of DebugBreakXXX. |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 | 311 |
311 const bool Debug::kFrameDropperSupported = true; | 312 const bool Debug::kFrameDropperSupported = true; |
312 | 313 |
313 #undef __ | 314 #undef __ |
314 | 315 |
315 #endif // ENABLE_DEBUGGER_SUPPORT | 316 #endif // ENABLE_DEBUGGER_SUPPORT |
316 | 317 |
317 } } // namespace v8::internal | 318 } } // namespace v8::internal |
318 | 319 |
319 #endif // V8_TARGET_ARCH_X64 | 320 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |