From 9f9a4cb9284794cea04098735f0dcc4c771db153 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 16 Jul 2011 16:00:06 +0200 Subject: [PATCH] Fix Math.pow crashes on machines without SSE2. This is a back-port of r8577 from V8's upstream 3.1 branch. Fixes #829. --- deps/v8/src/ia32/full-codegen-ia32.cc | 8 ++++++-- deps/v8/src/version.cc | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/deps/v8/src/ia32/full-codegen-ia32.cc b/deps/v8/src/ia32/full-codegen-ia32.cc index 67e0e8fac977..375ff2e1ecd2 100644 --- a/deps/v8/src/ia32/full-codegen-ia32.cc +++ b/deps/v8/src/ia32/full-codegen-ia32.cc @@ -2772,8 +2772,12 @@ void FullCodeGenerator::EmitMathPow(ZoneList* 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); } diff --git a/deps/v8/src/version.cc b/deps/v8/src/version.cc index f70e405915a5..b7c59dcde400 100644 --- a/deps/v8/src/version.cc +++ b/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