Skip to content

Commit 9f9a4cb

Browse files
committed
Fix Math.pow crashes on machines without SSE2.
This is a back-port of r8577 from V8's upstream 3.1 branch. Fixes #829.
1 parent e8bc80c commit 9f9a4cb

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

deps/v8/src/ia32/full-codegen-ia32.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2772,8 +2772,12 @@ void FullCodeGenerator::EmitMathPow(ZoneList<Expression*>* args) {
27722772
VisitForStackValue(args->at(0));
27732773
VisitForStackValue(args->at(1));
27742774

2775-
MathPowStub stub;
2776-
__ CallStub(&stub);
2775+
if (CpuFeatures::IsSupported(SSE2)) {
2776+
MathPowStub stub;
2777+
__ CallStub(&stub);
2778+
} else {
2779+
__ CallRuntime(Runtime::kMath_pow, 2);
2780+
}
27772781
context()->Plug(eax);
27782782
}
27792783

deps/v8/src/version.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#define MAJOR_VERSION 3
3636
#define MINOR_VERSION 1
3737
#define BUILD_NUMBER 8
38-
#define PATCH_LEVEL 25
38+
#define PATCH_LEVEL 26
3939
#define CANDIDATE_VERSION false
4040

4141
// Define SONAME to have the SCons build the put a specific SONAME into the

0 commit comments

Comments
 (0)