| 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/base/adapters.h" | 5 #include "src/base/adapters.h" |
| 6 #include "src/compiler/instruction-selector-impl.h" | 6 #include "src/compiler/instruction-selector-impl.h" |
| 7 #include "src/compiler/node-matchers.h" | 7 #include "src/compiler/node-matchers.h" |
| 8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 850 ? g.UseImmediate(input) | 850 ? g.UseImmediate(input) |
| 851 : g.UseRegister(input); | 851 : g.UseRegister(input); |
| 852 Emit(kIA32Poke | MiscField::encode(slot), g.NoOutput(), value); | 852 Emit(kIA32Poke | MiscField::encode(slot), g.NoOutput(), value); |
| 853 } | 853 } |
| 854 } | 854 } |
| 855 } else { | 855 } else { |
| 856 // Push any stack arguments. | 856 // Push any stack arguments. |
| 857 for (Node* input : base::Reversed(buffer.pushed_nodes)) { | 857 for (Node* input : base::Reversed(buffer.pushed_nodes)) { |
| 858 // Skip any alignment holes in pushed nodes. | 858 // Skip any alignment holes in pushed nodes. |
| 859 if (input == nullptr) continue; | 859 if (input == nullptr) continue; |
| 860 // TODO(titzer): IA32Push cannot handle stack->stack double moves |
| 861 // because there is no way to encode fixed double slots. |
| 860 InstructionOperand value = | 862 InstructionOperand value = |
| 861 g.CanBeImmediate(input) | 863 g.CanBeImmediate(input) |
| 862 ? g.UseImmediate(input) | 864 ? g.UseImmediate(input) |
| 863 : IsSupported(ATOM) ? g.UseRegister(input) : g.Use(input); | 865 : IsSupported(ATOM) || |
| 866 sequence()->IsFloat(GetVirtualRegister(input)) |
| 867 ? g.UseRegister(input) |
| 868 : g.Use(input); |
| 864 Emit(kIA32Push, g.NoOutput(), value); | 869 Emit(kIA32Push, g.NoOutput(), value); |
| 865 } | 870 } |
| 866 } | 871 } |
| 867 | 872 |
| 868 // Pass label of exception handler block. | 873 // Pass label of exception handler block. |
| 869 CallDescriptor::Flags flags = descriptor->flags(); | 874 CallDescriptor::Flags flags = descriptor->flags(); |
| 870 if (handler) { | 875 if (handler) { |
| 871 DCHECK_EQ(IrOpcode::kIfException, handler->front()->opcode()); | 876 DCHECK_EQ(IrOpcode::kIfException, handler->front()->opcode()); |
| 872 IfExceptionHint hint = OpParameter<IfExceptionHint>(handler->front()); | 877 IfExceptionHint hint = OpParameter<IfExceptionHint>(handler->front()); |
| 873 if (hint == IfExceptionHint::kLocallyCaught) { | 878 if (hint == IfExceptionHint::kLocallyCaught) { |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1344 if (CpuFeatures::IsSupported(SSE4_1)) { | 1349 if (CpuFeatures::IsSupported(SSE4_1)) { |
| 1345 flags |= MachineOperatorBuilder::kFloat64RoundDown | | 1350 flags |= MachineOperatorBuilder::kFloat64RoundDown | |
| 1346 MachineOperatorBuilder::kFloat64RoundTruncate; | 1351 MachineOperatorBuilder::kFloat64RoundTruncate; |
| 1347 } | 1352 } |
| 1348 return flags; | 1353 return flags; |
| 1349 } | 1354 } |
| 1350 | 1355 |
| 1351 } // namespace compiler | 1356 } // namespace compiler |
| 1352 } // namespace internal | 1357 } // namespace internal |
| 1353 } // namespace v8 | 1358 } // namespace v8 |
| OLD | NEW |