From def4980625cc4bbe906a8341a762833c42f15952 Mon Sep 17 00:00:00 2001 From: "ricow@chromium.org" Date: Fri, 26 Feb 2010 11:09:06 +0000 Subject: [PATCH] Changed GeneratePow ensure xmm1 is loaded with y before making the test for NaN Review URL: http://codereview.chromium.org/660172 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3966 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/ia32/codegen-ia32.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ia32/codegen-ia32.cc b/src/ia32/codegen-ia32.cc index f869fec4fe..b7eaa12c8b 100644 --- a/src/ia32/codegen-ia32.cc +++ b/src/ia32/codegen-ia32.cc @@ -5368,13 +5368,12 @@ void CodeGenerator::GeneratePow(ZoneList* args) { __ cmp(FieldOperand(y.reg(), HeapObject::kMapOffset), Factory::heap_number_map()); __ j(not_equal, &go_runtime); + // Y must be a double. + __ movdbl(xmm1, FieldOperand(y.reg(), HeapNumber::kValueOffset)); // Test if y is nan. __ ucomisd(xmm1, xmm1); __ j(parity_even, &go_runtime); - // Y must be a double. - __ movdbl(xmm1, FieldOperand(y.reg(), HeapNumber::kValueOffset)); - Label x_not_smi; Label handle_special_cases; __ test(x.reg(), Immediate(kSmiTagMask));