Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Fix Math.pow crashes on machines without SSE2.
Browse files Browse the repository at this point in the history
This is a back-port of r8577 from V8's upstream 3.1 branch.

Fixes #829.
  • Loading branch information
bnoordhuis committed Jul 16, 2011
1 parent e8bc80c commit 9f9a4cb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions deps/v8/src/ia32/full-codegen-ia32.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion deps/v8/src/version.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9f9a4cb

Please sign in to comment.