Commit 80607c40 authored by Toon Verwaest's avatar Toon Verwaest Committed by Commit Bot

[macro-assembler] Delete unused SmiToDouble

Bug: v8:6921
Change-Id: Ice3d280619dd26054affabb7a128714b9aeb422d
Reviewed-on: https://chromium-review.googlesource.com/707241
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48527}
parent cfce134a
...@@ -1715,20 +1715,6 @@ bool TurboAssembler::AllowThisStubCall(CodeStub* stub) { ...@@ -1715,20 +1715,6 @@ bool TurboAssembler::AllowThisStubCall(CodeStub* stub) {
return has_frame() || !stub->SometimesSetsUpAFrame(); return has_frame() || !stub->SometimesSetsUpAFrame();
} }
void MacroAssembler::SmiToDouble(LowDwVfpRegister value, Register smi) {
if (CpuFeatures::IsSupported(VFPv3)) {
CpuFeatureScope scope(this, VFPv3);
vmov(value.low(), smi);
vcvt_f64_s32(value, 1);
} else {
UseScratchRegisterScope temps(this);
Register scratch = temps.Acquire();
SmiUntag(scratch, smi);
vmov(value.low(), scratch);
vcvt_f64_s32(value, value.low());
}
}
void MacroAssembler::TryDoubleToInt32Exact(Register result, void MacroAssembler::TryDoubleToInt32Exact(Register result,
DwVfpRegister double_input, DwVfpRegister double_input,
LowDwVfpRegister double_scratch) { LowDwVfpRegister double_scratch) {
......
...@@ -784,10 +784,6 @@ class MacroAssembler : public TurboAssembler { ...@@ -784,10 +784,6 @@ class MacroAssembler : public TurboAssembler {
b(ne, if_not_equal); b(ne, if_not_equal);
} }
// Load the value of a smi object into a double register.
// The register value must be between d0 and d15.
void SmiToDouble(LowDwVfpRegister value, Register smi);
// Try to convert a double to a signed 32-bit integer. // Try to convert a double to a signed 32-bit integer.
// Z flag set to one and result assigned if the conversion is exact. // Z flag set to one and result assigned if the conversion is exact.
void TryDoubleToInt32Exact(Register result, void TryDoubleToInt32Exact(Register result,
......
...@@ -1564,11 +1564,6 @@ bool TurboAssembler::AllowThisStubCall(CodeStub* stub) { ...@@ -1564,11 +1564,6 @@ bool TurboAssembler::AllowThisStubCall(CodeStub* stub) {
return has_frame_ || !stub->SometimesSetsUpAFrame(); return has_frame_ || !stub->SometimesSetsUpAFrame();
} }
void MacroAssembler::SmiToDouble(DoubleRegister value, Register smi) {
SmiUntag(ip, smi);
ConvertIntToDouble(ip, value);
}
void MacroAssembler::TryDoubleToInt32Exact(Register result, void MacroAssembler::TryDoubleToInt32Exact(Register result,
DoubleRegister double_input, DoubleRegister double_input,
Register scratch, Register scratch,
......
...@@ -890,9 +890,6 @@ class MacroAssembler : public TurboAssembler { ...@@ -890,9 +890,6 @@ class MacroAssembler : public TurboAssembler {
bne(if_not_equal); bne(if_not_equal);
} }
// Load the value of a smi object into a double register.
void SmiToDouble(DoubleRegister value, Register smi);
// Try to convert a double to a signed 32-bit integer. // Try to convert a double to a signed 32-bit integer.
// CR_EQ in cr7 is set and result assigned if the conversion is exact. // CR_EQ in cr7 is set and result assigned if the conversion is exact.
void TryDoubleToInt32Exact(Register result, DoubleRegister double_input, void TryDoubleToInt32Exact(Register result, DoubleRegister double_input,
......
...@@ -1448,11 +1448,6 @@ void MacroAssembler::CompareRoot(Register obj, Heap::RootListIndex index) { ...@@ -1448,11 +1448,6 @@ void MacroAssembler::CompareRoot(Register obj, Heap::RootListIndex index) {
CmpP(obj, MemOperand(kRootRegister, index << kPointerSizeLog2)); CmpP(obj, MemOperand(kRootRegister, index << kPointerSizeLog2));
} }
void MacroAssembler::SmiToDouble(DoubleRegister value, Register smi) {
SmiUntag(ip, smi);
ConvertIntToDouble(value, ip);
}
void MacroAssembler::GetWeakValue(Register value, Handle<WeakCell> cell) { void MacroAssembler::GetWeakValue(Register value, Handle<WeakCell> cell) {
mov(value, Operand(cell)); mov(value, Operand(cell));
LoadP(value, FieldMemOperand(value, WeakCell::kValueOffset)); LoadP(value, FieldMemOperand(value, WeakCell::kValueOffset));
......
...@@ -1097,11 +1097,6 @@ class MacroAssembler : public TurboAssembler { ...@@ -1097,11 +1097,6 @@ class MacroAssembler : public TurboAssembler {
bne(if_not_equal); bne(if_not_equal);
} }
// Load the value of a smi object into a FP double register. The register
// scratch1 can be the same register as smi in which case smi will hold the
// untagged value afterwards.
void SmiToDouble(DoubleRegister value, Register smi);
// Try to convert a double to a signed 32-bit integer. // Try to convert a double to a signed 32-bit integer.
// CR_EQ in cr7 is set and result assigned if the conversion is exact. // CR_EQ in cr7 is set and result assigned if the conversion is exact.
void TryDoubleToInt32Exact(Register result, DoubleRegister double_input, void TryDoubleToInt32Exact(Register result, DoubleRegister double_input,
......
...@@ -662,12 +662,6 @@ class MacroAssembler : public TurboAssembler { ...@@ -662,12 +662,6 @@ class MacroAssembler : public TurboAssembler {
void SmiToInteger64(Register dst, Register src); void SmiToInteger64(Register dst, Register src);
void SmiToInteger64(Register dst, const Operand& src); void SmiToInteger64(Register dst, const Operand& src);
// Convert smi to double.
void SmiToDouble(XMMRegister dst, Register src) {
SmiToInteger32(kScratchRegister, src);
Cvtlsi2sd(dst, kScratchRegister);
}
// Multiply a positive smi's integer value by a power of two. // Multiply a positive smi's integer value by a power of two.
// Provides result as 64-bit integer value. // Provides result as 64-bit integer value.
void PositiveSmiTimesPowerOfTwoToInteger64(Register dst, void PositiveSmiTimesPowerOfTwoToInteger64(Register dst,
......
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