| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/compilation-info.h" | 7 #include "src/compilation-info.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 2438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2449 } | 2449 } |
| 2450 | 2450 |
| 2451 void CodeGenerator::AssembleReturn(InstructionOperand* pop) { | 2451 void CodeGenerator::AssembleReturn(InstructionOperand* pop) { |
| 2452 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); | 2452 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); |
| 2453 | 2453 |
| 2454 // Clear the FPU stack only if there is no return value in the stack. | 2454 // Clear the FPU stack only if there is no return value in the stack. |
| 2455 if (FLAG_debug_code && FLAG_enable_slow_asserts) { | 2455 if (FLAG_debug_code && FLAG_enable_slow_asserts) { |
| 2456 __ VerifyX87StackDepth(1); | 2456 __ VerifyX87StackDepth(1); |
| 2457 } | 2457 } |
| 2458 bool clear_stack = true; | 2458 bool clear_stack = true; |
| 2459 for (int i = 0; i < descriptor->ReturnCount(); i++) { | 2459 for (size_t i = 0; i < descriptor->ReturnCount(); i++) { |
| 2460 MachineRepresentation rep = descriptor->GetReturnType(i).representation(); | 2460 MachineRepresentation rep = descriptor->GetReturnType(i).representation(); |
| 2461 LinkageLocation loc = descriptor->GetReturnLocation(i); | 2461 LinkageLocation loc = descriptor->GetReturnLocation(i); |
| 2462 if (IsFloatingPoint(rep) && loc == LinkageLocation::ForRegister(0)) { | 2462 if (IsFloatingPoint(rep) && loc == LinkageLocation::ForRegister(0)) { |
| 2463 clear_stack = false; | 2463 clear_stack = false; |
| 2464 break; | 2464 break; |
| 2465 } | 2465 } |
| 2466 } | 2466 } |
| 2467 if (clear_stack) __ fstp(0); | 2467 if (clear_stack) __ fstp(0); |
| 2468 | 2468 |
| 2469 const RegList saves = descriptor->CalleeSavedRegisters(); | 2469 const RegList saves = descriptor->CalleeSavedRegisters(); |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2734 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2734 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
| 2735 __ Nop(padding_size); | 2735 __ Nop(padding_size); |
| 2736 } | 2736 } |
| 2737 } | 2737 } |
| 2738 | 2738 |
| 2739 #undef __ | 2739 #undef __ |
| 2740 | 2740 |
| 2741 } // namespace compiler | 2741 } // namespace compiler |
| 2742 } // namespace internal | 2742 } // namespace internal |
| 2743 } // namespace v8 | 2743 } // namespace v8 |
| OLD | NEW |