OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #if V8_TARGET_ARCH_PPC | 5 #if V8_TARGET_ARCH_PPC |
6 | 6 |
7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1181 | 1181 |
1182 | 1182 |
1183 static void Generate_InterpreterNotifyDeoptimizedHelper( | 1183 static void Generate_InterpreterNotifyDeoptimizedHelper( |
1184 MacroAssembler* masm, Deoptimizer::BailoutType type) { | 1184 MacroAssembler* masm, Deoptimizer::BailoutType type) { |
1185 // Enter an internal frame. | 1185 // Enter an internal frame. |
1186 { | 1186 { |
1187 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 1187 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
1188 // Save accumulator register and pass the deoptimization type to | 1188 // Save accumulator register and pass the deoptimization type to |
1189 // the runtime system. | 1189 // the runtime system. |
1190 __ LoadSmiLiteral(r4, Smi::FromInt(static_cast<int>(type))); | 1190 __ LoadSmiLiteral(r4, Smi::FromInt(static_cast<int>(type))); |
1191 __ Push(kInterpreterAccumulatorRegister, r4); | 1191 __ Push(r4); |
1192 __ CallRuntime(Runtime::kNotifyDeoptimized); | 1192 __ CallRuntime(Runtime::kNotifyDeoptimized); |
1193 __ pop(kInterpreterAccumulatorRegister); // Restore accumulator register. | |
1194 // Tear down internal frame. | 1193 // Tear down internal frame. |
1195 } | 1194 } |
1196 | 1195 |
1197 // Drop state (we don't use these for interpreter deopts). | 1196 // Drop state (we don't use these for interpreter deopts) and and pop the |
| 1197 // accumulator value into the accumulator register. |
1198 __ Drop(1); | 1198 __ Drop(1); |
| 1199 __ Pop(kInterpreterAccumulatorRegister); |
1199 | 1200 |
1200 // Enter the bytecode dispatch. | 1201 // Enter the bytecode dispatch. |
1201 Generate_EnterBytecodeDispatch(masm); | 1202 Generate_EnterBytecodeDispatch(masm); |
1202 } | 1203 } |
1203 | 1204 |
1204 | 1205 |
1205 void Builtins::Generate_InterpreterNotifyDeoptimized(MacroAssembler* masm) { | 1206 void Builtins::Generate_InterpreterNotifyDeoptimized(MacroAssembler* masm) { |
1206 Generate_InterpreterNotifyDeoptimizedHelper(masm, Deoptimizer::EAGER); | 1207 Generate_InterpreterNotifyDeoptimizedHelper(masm, Deoptimizer::EAGER); |
1207 } | 1208 } |
1208 | 1209 |
(...skipping 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2747 __ bkpt(0); | 2748 __ bkpt(0); |
2748 } | 2749 } |
2749 } | 2750 } |
2750 | 2751 |
2751 | 2752 |
2752 #undef __ | 2753 #undef __ |
2753 } // namespace internal | 2754 } // namespace internal |
2754 } // namespace v8 | 2755 } // namespace v8 |
2755 | 2756 |
2756 #endif // V8_TARGET_ARCH_PPC | 2757 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |