From b3d4ea357c67ad4f245a00f2e9b6f3f4cabc44fe Mon Sep 17 00:00:00 2001 From: "ager@chromium.org" Date: Tue, 11 Jan 2011 11:54:37 +0000 Subject: [PATCH] ARM: use existing transcendental cache stub for tagged inputs. Review URL: http://codereview.chromium.org/6167004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6261 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/arm/lithium-arm.h | 4 ++++ src/arm/lithium-codegen-arm.cc | 14 +++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/arm/lithium-arm.h b/src/arm/lithium-arm.h index 0529fb9848..5cfba3886a 100644 --- a/src/arm/lithium-arm.h +++ b/src/arm/lithium-arm.h @@ -445,6 +445,10 @@ class LCallStub: public LInstruction { public: DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub") DECLARE_HYDROGEN_ACCESSOR(CallStub) + + TranscendentalCache::Type transcendental_type() { + return hydrogen()->transcendental_type(); + } }; diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc index a5c8505ded..fb0578846a 100644 --- a/src/arm/lithium-codegen-arm.cc +++ b/src/arm/lithium-codegen-arm.cc @@ -771,7 +771,9 @@ void LCodeGen::DoCallStub(LCallStub* instr) { break; } case CodeStub::TranscendentalCache: { - Abort("TranscendentalCache unimplemented."); + __ ldr(r0, MemOperand(sp, 0)); + TranscendentalCacheStub stub(instr->transcendental_type()); + CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); break; } default: @@ -1482,10 +1484,12 @@ void LCodeGen::DoCmpT(LCmpT* instr) { condition = ReverseCondition(condition); } __ cmp(r0, Operand(0)); - __ LoadRoot(ToRegister(instr->result()), Heap::kTrueValueRootIndex, - condition); - __ LoadRoot(ToRegister(instr->result()), Heap::kFalseValueRootIndex, - NegateCondition(condition)); + __ LoadRoot(ToRegister(instr->result()), + Heap::kTrueValueRootIndex, + condition); + __ LoadRoot(ToRegister(instr->result()), + Heap::kFalseValueRootIndex, + NegateCondition(condition)); }