| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <limits.h> // For LONG_MIN, LONG_MAX. | 5 #include <limits.h> // For LONG_MIN, LONG_MAX. |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
| (...skipping 2523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2534 | 2534 |
| 2535 void MacroAssembler::TailCallStub(CodeStub* stub, Condition cond) { | 2535 void MacroAssembler::TailCallStub(CodeStub* stub, Condition cond) { |
| 2536 Jump(stub->GetCode(), RelocInfo::CODE_TARGET, cond); | 2536 Jump(stub->GetCode(), RelocInfo::CODE_TARGET, cond); |
| 2537 } | 2537 } |
| 2538 | 2538 |
| 2539 | 2539 |
| 2540 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { | 2540 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { |
| 2541 return has_frame_ || !stub->SometimesSetsUpAFrame(); | 2541 return has_frame_ || !stub->SometimesSetsUpAFrame(); |
| 2542 } | 2542 } |
| 2543 | 2543 |
| 2544 | |
| 2545 void MacroAssembler::IndexFromHash(Register hash, Register index) { | |
| 2546 // If the hash field contains an array index pick it out. The assert checks | |
| 2547 // that the constants for the maximum number of digits for an array index | |
| 2548 // cached in the hash field and the number of bits reserved for it does not | |
| 2549 // conflict. | |
| 2550 DCHECK(TenToThe(String::kMaxCachedArrayIndexLength) < | |
| 2551 (1 << String::kArrayIndexValueBits)); | |
| 2552 DecodeFieldToSmi<String::ArrayIndexValueBits>(index, hash); | |
| 2553 } | |
| 2554 | |
| 2555 | |
| 2556 void MacroAssembler::SmiToDouble(LowDwVfpRegister value, Register smi) { | 2544 void MacroAssembler::SmiToDouble(LowDwVfpRegister value, Register smi) { |
| 2557 if (CpuFeatures::IsSupported(VFPv3)) { | 2545 if (CpuFeatures::IsSupported(VFPv3)) { |
| 2558 CpuFeatureScope scope(this, VFPv3); | 2546 CpuFeatureScope scope(this, VFPv3); |
| 2559 vmov(value.low(), smi); | 2547 vmov(value.low(), smi); |
| 2560 vcvt_f64_s32(value, 1); | 2548 vcvt_f64_s32(value, 1); |
| 2561 } else { | 2549 } else { |
| 2562 SmiUntag(ip, smi); | 2550 SmiUntag(ip, smi); |
| 2563 vmov(value.low(), ip); | 2551 vmov(value.low(), ip); |
| 2564 vcvt_f64_s32(value, value.low()); | 2552 vcvt_f64_s32(value, value.low()); |
| 2565 } | 2553 } |
| (...skipping 1508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4074 } | 4062 } |
| 4075 } | 4063 } |
| 4076 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); | 4064 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); |
| 4077 add(result, result, Operand(dividend, LSR, 31)); | 4065 add(result, result, Operand(dividend, LSR, 31)); |
| 4078 } | 4066 } |
| 4079 | 4067 |
| 4080 } // namespace internal | 4068 } // namespace internal |
| 4081 } // namespace v8 | 4069 } // namespace v8 |
| 4082 | 4070 |
| 4083 #endif // V8_TARGET_ARCH_ARM | 4071 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |