From: vegorov@chromium.org Date: Fri, 25 Mar 2011 12:51:32 +0000 (+0000) Subject: Check for SSE2 support in FullCodeGenerator::EmitMathPow. X-Git-Tag: upstream/4.7.83~19811 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b97fc27c938952702fdb12e6b5d6c9b3b9f798e9;p=platform%2Fupstream%2Fv8.git Check for SSE2 support in FullCodeGenerator::EmitMathPow. Do not emit call to the MathPowStub when SSE2 is not available because it requires SSE2. Review URL: http://codereview.chromium.org/6736006 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc index 24b3f47..2c82220 100644 --- a/src/ia32/full-codegen-ia32.cc +++ b/src/ia32/full-codegen-ia32.cc @@ -2800,8 +2800,12 @@ void FullCodeGenerator::EmitMathPow(ZoneList* 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); }