| 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 #include "src/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
| 6 | 6 |
| 7 #include "src/arm64/macro-assembler-arm64.h" | 7 #include "src/arm64/macro-assembler-arm64.h" |
| 8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
| 9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
| 10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
| (...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1146 __ Add(csp, csp, AlignedStackSlots(stack_slots) * kPointerSize); | 1146 __ Add(csp, csp, AlignedStackSlots(stack_slots) * kPointerSize); |
| 1147 } | 1147 } |
| 1148 // Restore registers. | 1148 // Restore registers. |
| 1149 // TODO(dcarney): correct callee saved registers. | 1149 // TODO(dcarney): correct callee saved registers. |
| 1150 __ PopCalleeSavedRegisters(); | 1150 __ PopCalleeSavedRegisters(); |
| 1151 } | 1151 } |
| 1152 __ Mov(csp, fp); | 1152 __ Mov(csp, fp); |
| 1153 __ Pop(fp, lr); | 1153 __ Pop(fp, lr); |
| 1154 __ Ret(); | 1154 __ Ret(); |
| 1155 } else if (descriptor->IsJSFunctionCall() || needs_frame_) { | 1155 } else if (descriptor->IsJSFunctionCall() || needs_frame_) { |
| 1156 __ Mov(jssp, fp); | 1156 // Canonicalize JSFunction return sites for now. |
| 1157 __ Pop(fp, lr); | 1157 if (return_label_.is_bound()) { |
| 1158 int pop_count = descriptor->IsJSFunctionCall() | 1158 __ B(&return_label_); |
| 1159 ? static_cast<int>(descriptor->JSParameterCount()) | 1159 } else { |
| 1160 : 0; | 1160 __ Bind(&return_label_); |
| 1161 __ Drop(pop_count); | 1161 __ Mov(jssp, fp); |
| 1162 __ Ret(); | 1162 __ Pop(fp, lr); |
| 1163 int pop_count = descriptor->IsJSFunctionCall() |
| 1164 ? static_cast<int>(descriptor->JSParameterCount()) |
| 1165 : 0; |
| 1166 __ Drop(pop_count); |
| 1167 __ Ret(); |
| 1168 } |
| 1163 } else { | 1169 } else { |
| 1164 __ Ret(); | 1170 __ Ret(); |
| 1165 } | 1171 } |
| 1166 } | 1172 } |
| 1167 | 1173 |
| 1168 | 1174 |
| 1169 void CodeGenerator::AssembleMove(InstructionOperand* source, | 1175 void CodeGenerator::AssembleMove(InstructionOperand* source, |
| 1170 InstructionOperand* destination) { | 1176 InstructionOperand* destination) { |
| 1171 Arm64OperandConverter g(this, NULL); | 1177 Arm64OperandConverter g(this, NULL); |
| 1172 // Dispatch on the source and destination operand kinds. Not all | 1178 // Dispatch on the source and destination operand kinds. Not all |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1346 } | 1352 } |
| 1347 } | 1353 } |
| 1348 } | 1354 } |
| 1349 } | 1355 } |
| 1350 | 1356 |
| 1351 #undef __ | 1357 #undef __ |
| 1352 | 1358 |
| 1353 } // namespace compiler | 1359 } // namespace compiler |
| 1354 } // namespace internal | 1360 } // namespace internal |
| 1355 } // namespace v8 | 1361 } // namespace v8 |
| OLD | NEW |