Chromium Code Reviews| Index: src/compiler/ia32/instruction-selector-ia32.cc |
| diff --git a/src/compiler/ia32/instruction-selector-ia32.cc b/src/compiler/ia32/instruction-selector-ia32.cc |
| index f96eb274d32a80d03fef8022269cd888f8d51dcc..e749721f210caa389ec76dde9001951ebd9c6e07 100644 |
| --- a/src/compiler/ia32/instruction-selector-ia32.cc |
| +++ b/src/compiler/ia32/instruction-selector-ia32.cc |
| @@ -896,9 +896,9 @@ void InstructionSelector::VisitFloat64RoundTiesEven(Node* node) { |
| } |
| -void InstructionSelector::EmitPrepareArguments(NodeVector* arguments, |
| - const CallDescriptor* descriptor, |
| - Node* node) { |
| +void InstructionSelector::EmitPrepareArguments( |
| + ZoneVector<PushParameter>* arguments, const CallDescriptor* descriptor, |
| + Node* node) { |
| IA32OperandGenerator g(this); |
| // Prepare for C function call. |
| @@ -911,29 +911,35 @@ void InstructionSelector::EmitPrepareArguments(NodeVector* arguments, |
| // Poke any stack arguments. |
| for (size_t n = 0; n < arguments->size(); ++n) { |
| - if (Node* input = (*arguments)[n]) { |
| + PushParameter input = (*arguments)[n]; |
| + if (input.node()) { |
| int const slot = static_cast<int>(n); |
| InstructionOperand value = g.CanBeImmediate(node) |
| - ? g.UseImmediate(input) |
| - : g.UseRegister(input); |
| + ? g.UseImmediate(input.node()) |
| + : g.UseRegister(input.node()); |
| Emit(kIA32Poke | MiscField::encode(slot), g.NoOutput(), value); |
| } |
| } |
| } else { |
| // Push any stack arguments. |
| - for (Node* input : base::Reversed(*arguments)) { |
| + for (PushParameter input : base::Reversed(*arguments)) { |
| // Skip any alignment holes in pushed nodes. |
| - if (input == nullptr) continue; |
| - // TODO(titzer): IA32Push cannot handle stack->stack double moves |
| - // because there is no way to encode fixed double slots. |
| + if (input.node() == nullptr) continue; |
| InstructionOperand value = |
| - g.CanBeImmediate(input) |
| - ? g.UseImmediate(input) |
| + g.CanBeImmediate(input.node()) |
| + ? g.UseImmediate(input.node()) |
| : IsSupported(ATOM) || |
| - sequence()->IsFloat(GetVirtualRegister(input)) |
| - ? g.UseRegister(input) |
| - : g.Use(input); |
| - Emit(kIA32Push, g.NoOutput(), value); |
| + sequence()->IsFloat(GetVirtualRegister(input.node())) |
| + ? g.UseRegister(input.node()) |
| + : g.Use(input.node()); |
| + if (descriptor->GetInputType(input.parameter_index()) == |
|
Jarin
2015/12/17 14:33:49
How about using IsFloatingPoint(...)?
ahaas
2015/12/18 10:16:45
I generate different code for float32 and float64
|
| + MachineType::Float32() || |
| + descriptor->GetInputType(input.parameter_index()) == |
|
Jarin
2015/12/17 14:33:49
I am wondering why PushParameter contains the inde
ahaas
2015/12/18 10:16:45
Done. PushParameter now only contains the type of
|
| + MachineType::Float64()) { |
| + Emit(kIA32PushDouble, g.NoOutput(), value); |
|
bradn
2015/12/17 13:58:36
Wait why are float32 a double value on ia32?
ahaas
2015/12/18 10:16:45
Float32 and Float64 are handled differently now.
|
| + } else { |
| + Emit(kIA32Push, g.NoOutput(), value); |
| + } |
| } |
| } |
| } |