From 116038349884a15aeaae3001207803b36075bc0e Mon Sep 17 00:00:00 2001 From: "haitao.feng@intel.com" Date: Mon, 30 Sep 2013 13:36:39 +0000 Subject: [PATCH] Remove unused SmiTryAddConstant from X64 macro assembler R=yangguo@chromium.org Review URL: https://codereview.chromium.org/24978003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17007 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/x64/macro-assembler-x64.cc | 22 ---------------------- src/x64/macro-assembler-x64.h | 9 --------- 2 files changed, 31 deletions(-) diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc index e224ef6..0809ccd 100644 --- a/src/x64/macro-assembler-x64.cc +++ b/src/x64/macro-assembler-x64.cc @@ -1447,28 +1447,6 @@ void MacroAssembler::JumpUnlessBothNonNegativeSmi(Register src1, } -void MacroAssembler::SmiTryAddConstant(Register dst, - Register src, - Smi* constant, - Label* on_not_smi_result, - Label::Distance near_jump) { - // Does not assume that src is a smi. - ASSERT_EQ(static_cast(1), static_cast(kSmiTagMask)); - STATIC_ASSERT(kSmiTag == 0); - ASSERT(!dst.is(kScratchRegister)); - ASSERT(!src.is(kScratchRegister)); - - JumpIfNotSmi(src, on_not_smi_result, near_jump); - Register tmp = (dst.is(src) ? kScratchRegister : dst); - LoadSmiConstant(tmp, constant); - addq(tmp, src); - j(overflow, on_not_smi_result, near_jump); - if (dst.is(src)) { - movq(dst, tmp); - } -} - - void MacroAssembler::SmiAddConstant(Register dst, Register src, Smi* constant) { if (constant->value() == 0) { if (!dst.is(src)) { diff --git a/src/x64/macro-assembler-x64.h b/src/x64/macro-assembler-x64.h index 646d7fa..8c73dd9 100644 --- a/src/x64/macro-assembler-x64.h +++ b/src/x64/macro-assembler-x64.h @@ -532,15 +532,6 @@ class MacroAssembler: public Assembler { // Smis represent a subset of integers. The subset is always equivalent to // a two's complement interpretation of a fixed number of bits. - // Optimistically adds an integer constant to a supposed smi. - // If the src is not a smi, or the result is not a smi, jump to - // the label. - void SmiTryAddConstant(Register dst, - Register src, - Smi* constant, - Label* on_not_smi_result, - Label::Distance near_jump = Label::kFar); - // Add an integer constant to a tagged smi, giving a tagged smi as result. // No overflow testing on the result is done. void SmiAddConstant(Register dst, Register src, Smi* constant); -- 2.7.4