Index: src/crankshaft/ia32/lithium-ia32.cc |
diff --git a/src/crankshaft/ia32/lithium-ia32.cc b/src/crankshaft/ia32/lithium-ia32.cc |
index 22e923e86899bd91e7247940e44acb07ad43bb09..51295a473fa9087f2a2946fb21a64278407e330d 100644 |
--- a/src/crankshaft/ia32/lithium-ia32.cc |
+++ b/src/crankshaft/ia32/lithium-ia32.cc |
@@ -1093,6 +1093,8 @@ LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { |
LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { |
switch (instr->op()) { |
+ case kMathCos: |
+ return DoMathCos(instr); |
case kMathFloor: |
return DoMathFloor(instr); |
case kMathRound: |
@@ -1111,6 +1113,8 @@ LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { |
return DoMathPowHalf(instr); |
case kMathClz32: |
return DoMathClz32(instr); |
+ case kMathSin: |
+ return DoMathSin(instr); |
default: |
UNREACHABLE(); |
return NULL; |
@@ -1177,6 +1181,19 @@ LInstruction* LChunkBuilder::DoMathClz32(HUnaryMathOperation* instr) { |
return DefineAsRegister(result); |
} |
+LInstruction* LChunkBuilder::DoMathCos(HUnaryMathOperation* instr) { |
+ DCHECK(instr->representation().IsDouble()); |
+ DCHECK(instr->value()->representation().IsDouble()); |
+ LOperand* input = UseRegisterAtStart(instr->value()); |
+ return MarkAsCall(DefineSameAsFirst(new (zone()) LMathCos(input)), instr); |
+} |
+ |
+LInstruction* LChunkBuilder::DoMathSin(HUnaryMathOperation* instr) { |
+ DCHECK(instr->representation().IsDouble()); |
+ DCHECK(instr->value()->representation().IsDouble()); |
+ LOperand* input = UseRegisterAtStart(instr->value()); |
+ return MarkAsCall(DefineSameAsFirst(new (zone()) LMathSin(input)), instr); |
+} |
LInstruction* LChunkBuilder::DoMathExp(HUnaryMathOperation* instr) { |
DCHECK(instr->representation().IsDouble()); |