Index: src/ia32/full-codegen-ia32.cc |
diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc |
index 24b3f4702fa26b082affd98c2445b3b19a916cbf..2c82220c24d82070dc5e52718315449fbde172a7 100644 |
--- a/src/ia32/full-codegen-ia32.cc |
+++ b/src/ia32/full-codegen-ia32.cc |
@@ -2800,8 +2800,12 @@ void FullCodeGenerator::EmitMathPow(ZoneList<Expression*>* args) { |
VisitForStackValue(args->at(0)); |
VisitForStackValue(args->at(1)); |
- MathPowStub stub; |
- __ CallStub(&stub); |
+ if (masm()->isolate()->cpu_features()->IsSupported(SSE2)) { |
+ MathPowStub stub; |
+ __ CallStub(&stub); |
+ } else { |
+ __ CallRuntime(Runtime::kMath_pow, 2); |
+ } |
context()->Plug(eax); |
} |