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 03f35fe306a86ec27cdc4f33891338de87c03bca..7de35fa8eb8511710b0607434990b5364a0e667f 100644 |
--- a/src/compiler/ia32/instruction-selector-ia32.cc |
+++ b/src/compiler/ia32/instruction-selector-ia32.cc |
@@ -47,12 +47,15 @@ void InstructionSelector::VisitLoad(Node* node) { |
Node* base = node->InputAt(0); |
Node* index = node->InputAt(1); |
- InstructionOperand* output = rep == kRepFloat64 |
+ InstructionOperand* output = (rep == kRepFloat32 || rep == kRepFloat64) |
? g.DefineAsDoubleRegister(node) |
: g.DefineAsRegister(node); |
ArchOpcode opcode; |
// TODO(titzer): signed/unsigned small loads |
switch (rep) { |
+ case kRepFloat32: |
+ opcode = kIA32Movss; |
+ break; |
case kRepFloat64: |
opcode = kIA32Movsd; |
break; |
@@ -111,7 +114,7 @@ void InstructionSelector::VisitStore(Node* node) { |
} |
DCHECK_EQ(kNoWriteBarrier, store_rep.write_barrier_kind); |
InstructionOperand* val; |
- if (rep == kRepFloat64) { |
+ if (rep == kRepFloat32 || rep == kRepFloat64) { |
val = g.UseDoubleRegister(value); |
} else { |
if (g.CanBeImmediate(value)) { |
@@ -124,6 +127,9 @@ void InstructionSelector::VisitStore(Node* node) { |
} |
ArchOpcode opcode; |
switch (rep) { |
+ case kRepFloat32: |
+ opcode = kIA32Movss; |
+ break; |
case kRepFloat64: |
opcode = kIA32Movsd; |
break; |