From b27e6d02bee2858e3d1ea6f6c523b104011ab019 Mon Sep 17 00:00:00 2001 From: "baptiste.afsa@arm.com" Date: Tue, 11 Mar 2014 15:50:01 +0000 Subject: [PATCH] A64: Tidy up a couple of TODOs. R=ulan@chromium.org Review URL: https://codereview.chromium.org/189883006 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19809 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/a64/code-stubs-a64.cc | 3 +-- src/a64/ic-a64.cc | 16 ++-------------- src/a64/macro-assembler-a64.cc | 9 +-------- 3 files changed, 4 insertions(+), 24 deletions(-) diff --git a/src/a64/code-stubs-a64.cc b/src/a64/code-stubs-a64.cc index b896da0..7e0d708 100644 --- a/src/a64/code-stubs-a64.cc +++ b/src/a64/code-stubs-a64.cc @@ -4941,8 +4941,7 @@ void StoreArrayLiteralElementStub::Generate(MacroAssembler* masm) { void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { - // TODO(jbramley): The ARM code leaves the (shifted) offset in r1. Why? - CEntryStub ces(1, kSaveFPRegs); + CEntryStub ces(1, fp_registers_ ? kSaveFPRegs : kDontSaveFPRegs); __ Call(ces.GetCode(masm->isolate()), RelocInfo::CODE_TARGET); int parameter_count_offset = StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; diff --git a/src/a64/ic-a64.cc b/src/a64/ic-a64.cc index ac69e1b..18677f7 100644 --- a/src/a64/ic-a64.cc +++ b/src/a64/ic-a64.cc @@ -474,12 +474,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) { __ IncrementCounter(isolate->counters()->load_miss(), 1, x3, x4); - // TODO(jbramley): Does the target actually expect an argument in x3, or is - // this inherited from ARM's push semantics? - __ Mov(x3, x0); - __ Push(x3, x2); - // Perform tail call to the entry. + __ Push(x0, x2); ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate); __ TailCallExternalReference(ref, 2, 1); @@ -493,11 +489,7 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { // -- x0 : receiver // ----------------------------------- - // TODO(jbramley): Does the target actually expect an argument in x3, or is - // this inherited from ARM's push semantics? - __ Mov(x3, x0); - __ Push(x3, x2); - + __ Push(x0, x2); __ TailCallRuntime(Runtime::kGetProperty, 2, 1); } @@ -985,8 +977,6 @@ static void KeyedStoreGenerateGenericHelper( // We have to go to the runtime if the current value is the hole because there // may be a callback on the element. Label holecheck_passed; - // TODO(all): This address calculation is repeated later (for the store - // itself). We should keep the result to avoid doing the work twice. __ Add(x10, elements, FixedArray::kHeaderSize - kHeapObjectTag); __ Add(x10, x10, Operand::UntagSmiAndScale(key, kPointerSizeLog2)); __ Ldr(x11, MemOperand(x10)); @@ -1039,8 +1029,6 @@ static void KeyedStoreGenerateGenericHelper( // HOLECHECK: guards "A[i] double hole?" // We have to see if the double version of the hole is present. If so go to // the runtime. - // TODO(all): This address calculation was done earlier. We should keep the - // result to avoid doing the work twice. __ Add(x10, elements, FixedDoubleArray::kHeaderSize - kHeapObjectTag); __ Add(x10, x10, Operand::UntagSmiAndScale(key, kPointerSizeLog2)); __ Ldr(x11, MemOperand(x10)); diff --git a/src/a64/macro-assembler-a64.cc b/src/a64/macro-assembler-a64.cc index 2bc2128..aa61f58 100644 --- a/src/a64/macro-assembler-a64.cc +++ b/src/a64/macro-assembler-a64.cc @@ -1516,12 +1516,7 @@ void MacroAssembler::AssertNotSmi(Register object, BailoutReason reason) { void MacroAssembler::AssertName(Register object) { if (emit_debug_code()) { - STATIC_ASSERT(kSmiTag == 0); - // TODO(jbramley): Add AbortIfSmi and related functions. - Label not_smi; - JumpIfNotSmi(object, ¬_smi); - Abort(kOperandIsASmiAndNotAName); - Bind(¬_smi); + AssertNotSmi(object, kOperandIsASmiAndNotAName); UseScratchRegisterScope temps(this); Register temp = temps.AcquireX(); @@ -2847,8 +2842,6 @@ void MacroAssembler::Prologue(PrologueFrameMode frame_mode) { ASSERT(StackPointer().Is(jssp)); UseScratchRegisterScope temps(this); Register temp = temps.AcquireX(); - // TODO(jbramley): Does x1 contain a JSFunction here, or does it already - // have the special STUB smi? __ Mov(temp, Operand(Smi::FromInt(StackFrame::STUB))); // Compiled stubs don't age, and so they don't need the predictable code // ageing sequence. -- 2.7.4