From 3483c257d2bf35b59c1772cb71f37a629ebb30b4 Mon Sep 17 00:00:00 2001 From: "olivf@chromium.org" Date: Tue, 10 Sep 2013 13:28:21 +0000 Subject: [PATCH] Revert TranscendentalCacheStub changes in r16615. BUG= R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/23889013 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16616 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/x64/code-stubs-x64.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc index f8c9506f4e..00c5367a10 100644 --- a/src/x64/code-stubs-x64.cc +++ b/src/x64/code-stubs-x64.cc @@ -1154,7 +1154,14 @@ void TranscendentalCacheStub::Generate(MacroAssembler* masm) { __ jmp(&loaded, Label::kNear); __ bind(&input_not_smi); - __ TaggedToI(rbx, rax, xmm1, TREAT_MINUS_ZERO_AS_ZERO, &runtime_call); + // Check if input is a HeapNumber. + __ LoadRoot(rbx, Heap::kHeapNumberMapRootIndex); + __ cmpq(rbx, FieldOperand(rax, HeapObject::kMapOffset)); + __ j(not_equal, &runtime_call); + // Input is a HeapNumber. Push it on the FPU stack and load its + // bits into rbx. + __ fld_d(FieldOperand(rax, HeapNumber::kValueOffset)); + __ movq(rbx, FieldOperand(rax, HeapNumber::kValueOffset)); __ movq(rdx, rbx); __ bind(&loaded);