Remove unused 'unsafe smi' code on x64.

Review URL: http://codereview.chromium.org/293003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3087 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 42257793
......@@ -1249,34 +1249,6 @@ void MacroAssembler::JumpIfNotBothSmi(Register src1, Register src2,
j(NegateCondition(both_smi), on_not_both_smi);
}
bool MacroAssembler::IsUnsafeSmi(Smi* value) {
return false;
}
void MacroAssembler::LoadUnsafeSmi(Register dst, Smi* source) {
UNIMPLEMENTED();
}
void MacroAssembler::Move(Register dst, Smi* source) {
if (IsUnsafeSmi(source)) {
LoadUnsafeSmi(dst, source);
} else {
Set(dst, reinterpret_cast<int64_t>(source));
}
}
void MacroAssembler::Move(const Operand& dst, Smi* source) {
if (IsUnsafeSmi(source)) {
LoadUnsafeSmi(kScratchRegister, source);
movq(dst, kScratchRegister);
} else {
Set(dst, reinterpret_cast<int64_t>(source));
}
}
void MacroAssembler::Move(Register dst, Handle<Object> source) {
ASSERT(!source->IsFailure());
......@@ -1332,33 +1304,23 @@ void MacroAssembler::Push(Handle<Object> source) {
void MacroAssembler::Push(Smi* source) {
if (IsUnsafeSmi(source)) {
LoadUnsafeSmi(kScratchRegister, source);
push(kScratchRegister);
intptr_t smi = reinterpret_cast<intptr_t>(source);
if (is_int32(smi)) {
push(Immediate(static_cast<int32_t>(smi)));
} else {
intptr_t smi = reinterpret_cast<intptr_t>(source);
if (is_int32(smi)) {
push(Immediate(static_cast<int32_t>(smi)));
} else {
Set(kScratchRegister, smi);
push(kScratchRegister);
}
Set(kScratchRegister, smi);
push(kScratchRegister);
}
}
void MacroAssembler::Test(const Operand& src, Smi* source) {
if (IsUnsafeSmi(source)) {
LoadUnsafeSmi(kScratchRegister, source);
testq(src, kScratchRegister);
intptr_t smi = reinterpret_cast<intptr_t>(source);
if (is_int32(smi)) {
testl(src, Immediate(static_cast<int32_t>(smi)));
} else {
intptr_t smi = reinterpret_cast<intptr_t>(source);
if (is_int32(smi)) {
testl(src, Immediate(static_cast<int32_t>(smi)));
} else {
Move(kScratchRegister, source);
testq(src, kScratchRegister);
}
Move(kScratchRegister, source);
testq(src, kScratchRegister);
}
}
......
......@@ -374,12 +374,15 @@ class MacroAssembler: public Assembler {
// Converts a positive smi to a negative index.
SmiIndex SmiToNegativeIndex(Register dst, Register src, int shift);
bool IsUnsafeSmi(Smi* value);
void LoadUnsafeSmi(Register dst, Smi* source);
// Basic Smi operations.
void Move(Register dst, Smi* source);
void Move(const Operand& dst, Smi* source);
void Move(Register dst, Smi* source) {
Set(dst, reinterpret_cast<int64_t>(source));
}
void Move(const Operand& dst, Smi* source) {
Set(dst, reinterpret_cast<int64_t>(source));
}
void Push(Smi* smi);
void Test(const Operand& dst, Smi* source);
......@@ -391,14 +394,6 @@ class MacroAssembler: public Assembler {
void Set(const Operand& dst, int64_t x);
// Handle support
bool IsUnsafeSmi(Handle<Object> value) {
return IsUnsafeSmi(Smi::cast(*value));
}
void LoadUnsafeSmi(Register dst, Handle<Object> source) {
LoadUnsafeSmi(dst, Smi::cast(*source));
}
void Move(Register dst, Handle<Object> source);
void Move(const Operand& dst, Handle<Object> source);
void Cmp(Register dst, Handle<Object> source);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment