Index: src/arm/macro-assembler-arm.cc |
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
index ecedfd83899103df0cf6776f048c2860c6a939c2..465bd1067a726da97aabdc8bf2d3f4126e01c378 100644 |
--- a/src/arm/macro-assembler-arm.cc |
+++ b/src/arm/macro-assembler-arm.cc |
@@ -291,8 +291,6 @@ void MacroAssembler::Move(Register dst, Register src, Condition cond) { |
void MacroAssembler::Move(DwVfpRegister dst, DwVfpRegister src) { |
- ASSERT(CpuFeatures::IsSupported(VFP2)); |
- CpuFeatureScope scope(this, VFP2); |
if (!dst.is(src)) { |
vmov(dst, src); |
} |
@@ -811,7 +809,6 @@ void MacroAssembler::VFPCompareAndLoadFlags(const DwVfpRegister src1, |
void MacroAssembler::Vmov(const DwVfpRegister dst, |
const double imm, |
const Register scratch) { |
- ASSERT(IsEnabled(VFP2)); |
static const DoubleRepresentation minus_zero(-0.0); |
static const DoubleRepresentation zero(0.0); |
DoubleRepresentation value(imm); |
@@ -873,7 +870,6 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, int stack_space) { |
// Optionally save all double registers. |
if (save_doubles) { |
- CpuFeatureScope scope(this, VFP2); |
// Check CPU flags for number of registers, setting the Z condition flag. |
CheckFor32DRegs(ip); |
@@ -938,7 +934,6 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles, |
Register argument_count) { |
// Optionally restore all double registers. |
if (save_doubles) { |
- CpuFeatureScope scope(this, VFP2); |
// Calculate the stack location of the saved doubles and restore them. |
const int offset = 2 * kPointerSize; |
sub(r3, fp, |
@@ -975,7 +970,6 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles, |
} |
void MacroAssembler::GetCFunctionDoubleResult(const DwVfpRegister dst) { |
- ASSERT(CpuFeatures::IsSupported(VFP2)); |
if (use_eabi_hardfloat()) { |
Move(dst, d0); |
} else { |
@@ -2046,11 +2040,7 @@ void MacroAssembler::StoreNumberToDoubleElements(Register value_reg, |
// scratch1 is now effective address of the double element |
FloatingPointHelper::Destination destination; |
- if (CpuFeatures::IsSupported(VFP2)) { |
- destination = FloatingPointHelper::kVFPRegisters; |
- } else { |
- destination = FloatingPointHelper::kCoreRegisters; |
- } |
+ destination = FloatingPointHelper::kVFPRegisters; |
Register untagged_value = elements_reg; |
SmiUntag(untagged_value, value_reg); |
@@ -2063,7 +2053,6 @@ void MacroAssembler::StoreNumberToDoubleElements(Register value_reg, |
scratch4, |
s2); |
if (destination == FloatingPointHelper::kVFPRegisters) { |
- CpuFeatureScope scope(this, VFP2); |
vstr(d0, scratch1, 0); |
} else { |
str(mantissa_reg, MemOperand(scratch1, 0)); |
@@ -2423,9 +2412,6 @@ void MacroAssembler::SmiToDoubleVFPRegister(Register smi, |
void MacroAssembler::TestDoubleIsInt32(DwVfpRegister double_input, |
DwVfpRegister double_scratch) { |
ASSERT(!double_input.is(double_scratch)); |
- ASSERT(CpuFeatures::IsSupported(VFP2)); |
- CpuFeatureScope scope(this, VFP2); |
- |
vcvt_s32_f64(double_scratch.low(), double_input); |
vcvt_f64_s32(double_scratch, double_scratch.low()); |
VFPCompareAndSetFlags(double_input, double_scratch); |
@@ -2436,9 +2422,6 @@ void MacroAssembler::TryDoubleToInt32Exact(Register result, |
DwVfpRegister double_input, |
DwVfpRegister double_scratch) { |
ASSERT(!double_input.is(double_scratch)); |
- ASSERT(CpuFeatures::IsSupported(VFP2)); |
- CpuFeatureScope scope(this, VFP2); |
- |
vcvt_s32_f64(double_scratch.low(), double_input); |
vmov(result, double_scratch.low()); |
vcvt_f64_s32(double_scratch, double_scratch.low()); |
@@ -2454,8 +2437,6 @@ void MacroAssembler::TryInt32Floor(Register result, |
Label* exact) { |
ASSERT(!result.is(input_high)); |
ASSERT(!double_input.is(double_scratch)); |
- ASSERT(CpuFeatures::IsSupported(VFP2)); |
- CpuFeatureScope scope(this, VFP2); |
Label negative, exception; |
// Test for NaN and infinities. |
@@ -2500,26 +2481,18 @@ void MacroAssembler::ECMAConvertNumberToInt32(Register source, |
Register scratch, |
DwVfpRegister double_scratch1, |
DwVfpRegister double_scratch2) { |
- if (CpuFeatures::IsSupported(VFP2)) { |
- CpuFeatureScope scope(this, VFP2); |
- vldr(double_scratch1, FieldMemOperand(source, HeapNumber::kValueOffset)); |
- ECMAToInt32VFP(result, double_scratch1, double_scratch2, |
- scratch, input_high, input_low); |
- } else { |
- Ldrd(input_low, input_high, |
- FieldMemOperand(source, HeapNumber::kValueOffset)); |
- ECMAToInt32NoVFP(result, scratch, input_high, input_low); |
- } |
+ vldr(double_scratch1, FieldMemOperand(source, HeapNumber::kValueOffset)); |
+ ECMAToInt32(result, double_scratch1, double_scratch2, |
+ scratch, input_high, input_low); |
} |
-void MacroAssembler::ECMAToInt32VFP(Register result, |
- DwVfpRegister double_input, |
- DwVfpRegister double_scratch, |
- Register scratch, |
- Register input_high, |
- Register input_low) { |
- CpuFeatureScope scope(this, VFP2); |
+void MacroAssembler::ECMAToInt32(Register result, |
+ DwVfpRegister double_input, |
+ DwVfpRegister double_scratch, |
+ Register scratch, |
+ Register input_high, |
+ Register input_low) { |
ASSERT(!input_high.is(result)); |
ASSERT(!input_low.is(result)); |
ASSERT(!input_low.is(input_high)); |
@@ -2559,58 +2532,6 @@ void MacroAssembler::ECMAToInt32VFP(Register result, |
} |
-void MacroAssembler::ECMAToInt32NoVFP(Register result, |
- Register scratch, |
- Register input_high, |
- Register input_low) { |
- ASSERT(!result.is(scratch)); |
- ASSERT(!result.is(input_high)); |
- ASSERT(!result.is(input_low)); |
- ASSERT(!scratch.is(input_high)); |
- ASSERT(!scratch.is(input_low)); |
- ASSERT(!input_high.is(input_low)); |
- |
- Label both, out_of_range, negate, done; |
- |
- Ubfx(scratch, input_high, |
- HeapNumber::kExponentShift, HeapNumber::kExponentBits); |
- // Load scratch with exponent. |
- sub(scratch, scratch, Operand(HeapNumber::kExponentBias)); |
- // If exponent is negative, 0 < input < 1, the result is 0. |
- // If exponent is greater than or equal to 84, the 32 less significant |
- // bits are 0s (2^84 = 1, 52 significant bits, 32 uncoded bits), |
- // the result is 0. |
- // This test also catch Nan and infinities which also return 0. |
- cmp(scratch, Operand(84)); |
- // We do an unsigned comparison so negative numbers are treated as big |
- // positive number and the two tests above are done in one test. |
- b(hs, &out_of_range); |
- |
- // Load scratch with 20 - exponent. |
- rsb(scratch, scratch, Operand(20), SetCC); |
- b(mi, &both); |
- |
- // Test 0 and -0. |
- bic(result, input_high, Operand(HeapNumber::kSignMask)); |
- orr(result, result, Operand(input_low), SetCC); |
- b(eq, &done); |
- // 0 <= exponent <= 20, shift only input_high. |
- // Scratch contains: 20 - exponent. |
- Ubfx(result, input_high, |
- 0, HeapNumber::kMantissaBitsInTopWord); |
- // Set the implicit 1 before the mantissa part in input_high. |
- orr(result, result, Operand(1 << HeapNumber::kMantissaBitsInTopWord)); |
- mov(result, Operand(result, LSR, scratch)); |
- b(&negate); |
- |
- bind(&both); |
- // Restore scratch to exponent - 1 to be consistent with ECMAToInt32VFP. |
- rsb(scratch, scratch, Operand(19)); |
- ECMAToInt32Tail(result, scratch, input_high, input_low, |
- &out_of_range, &negate, &done); |
-} |
- |
- |
void MacroAssembler::ECMAToInt32Tail(Register result, |
Register scratch, |
Register input_high, |
@@ -2713,10 +2634,7 @@ void MacroAssembler::CallRuntimeSaveDoubles(Runtime::FunctionId id) { |
const Runtime::Function* function = Runtime::FunctionForId(id); |
mov(r0, Operand(function->nargs)); |
mov(r1, Operand(ExternalReference(function, isolate()))); |
- SaveFPRegsMode mode = CpuFeatures::IsSupported(VFP2) |
- ? kSaveFPRegs |
- : kDontSaveFPRegs; |
- CEntryStub stub(1, mode); |
+ CEntryStub stub(1, kSaveFPRegs); |
CallStub(&stub); |
} |
@@ -3461,7 +3379,6 @@ void MacroAssembler::PrepareCallCFunction(int num_reg_arguments, |
void MacroAssembler::SetCallCDoubleArguments(DwVfpRegister dreg) { |
- ASSERT(CpuFeatures::IsSupported(VFP2)); |
if (use_eabi_hardfloat()) { |
Move(d0, dreg); |
} else { |
@@ -3472,7 +3389,6 @@ void MacroAssembler::SetCallCDoubleArguments(DwVfpRegister dreg) { |
void MacroAssembler::SetCallCDoubleArguments(DwVfpRegister dreg1, |
DwVfpRegister dreg2) { |
- ASSERT(CpuFeatures::IsSupported(VFP2)); |
if (use_eabi_hardfloat()) { |
if (dreg2.is(d0)) { |
ASSERT(!dreg1.is(d1)); |
@@ -3491,7 +3407,6 @@ void MacroAssembler::SetCallCDoubleArguments(DwVfpRegister dreg1, |
void MacroAssembler::SetCallCDoubleArguments(DwVfpRegister dreg, |
Register reg) { |
- ASSERT(CpuFeatures::IsSupported(VFP2)); |
if (use_eabi_hardfloat()) { |
Move(d0, dreg); |
Move(r0, reg); |