Permalink
Browse files

Fix Math.pow crashes on machines without SSE2.

This is a back-port of r8577 from V8's upstream 3.1 branch.

Fixes #829.
  • Loading branch information...
1 parent e8bc80c commit 9f9a4cb9284794cea04098735f0dcc4c771db153 @bnoordhuis bnoordhuis committed Jul 16, 2011
Showing with 7 additions and 3 deletions.
  1. +6 −2 deps/v8/src/ia32/full-codegen-ia32.cc
  2. +1 −1 deps/v8/src/version.cc
View
8 deps/v8/src/ia32/full-codegen-ia32.cc
@@ -2772,8 +2772,12 @@ void FullCodeGenerator::EmitMathPow(ZoneList<Expression*>* args) {
VisitForStackValue(args->at(0));
VisitForStackValue(args->at(1));
- MathPowStub stub;
- __ CallStub(&stub);
+ if (CpuFeatures::IsSupported(SSE2)) {
+ MathPowStub stub;
+ __ CallStub(&stub);
+ } else {
+ __ CallRuntime(Runtime::kMath_pow, 2);
+ }
context()->Plug(eax);
}
View
2 deps/v8/src/version.cc
@@ -35,7 +35,7 @@
#define MAJOR_VERSION 3
#define MINOR_VERSION 1
#define BUILD_NUMBER 8
-#define PATCH_LEVEL 25
+#define PATCH_LEVEL 26
#define CANDIDATE_VERSION false
// Define SONAME to have the SCons build the put a specific SONAME into the

0 comments on commit 9f9a4cb

Please sign in to comment.