OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 <assert.h> // For assert | 5 #include <assert.h> // For assert |
6 #include <limits.h> // For LONG_MIN, LONG_MAX. | 6 #include <limits.h> // For LONG_MIN, LONG_MAX. |
7 | 7 |
8 #if V8_TARGET_ARCH_PPC | 8 #if V8_TARGET_ARCH_PPC |
9 | 9 |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 2413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2424 | 2424 |
2425 void MacroAssembler::TailCallStub(CodeStub* stub, Condition cond) { | 2425 void MacroAssembler::TailCallStub(CodeStub* stub, Condition cond) { |
2426 Jump(stub->GetCode(), RelocInfo::CODE_TARGET, cond); | 2426 Jump(stub->GetCode(), RelocInfo::CODE_TARGET, cond); |
2427 } | 2427 } |
2428 | 2428 |
2429 | 2429 |
2430 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { | 2430 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { |
2431 return has_frame_ || !stub->SometimesSetsUpAFrame(); | 2431 return has_frame_ || !stub->SometimesSetsUpAFrame(); |
2432 } | 2432 } |
2433 | 2433 |
2434 | |
2435 void MacroAssembler::IndexFromHash(Register hash, Register index) { | |
2436 // If the hash field contains an array index pick it out. The assert checks | |
2437 // that the constants for the maximum number of digits for an array index | |
2438 // cached in the hash field and the number of bits reserved for it does not | |
2439 // conflict. | |
2440 DCHECK(TenToThe(String::kMaxCachedArrayIndexLength) < | |
2441 (1 << String::kArrayIndexValueBits)); | |
2442 DecodeFieldToSmi<String::ArrayIndexValueBits>(index, hash); | |
2443 } | |
2444 | |
2445 | |
2446 void MacroAssembler::SmiToDouble(DoubleRegister value, Register smi) { | 2434 void MacroAssembler::SmiToDouble(DoubleRegister value, Register smi) { |
2447 SmiUntag(ip, smi); | 2435 SmiUntag(ip, smi); |
2448 ConvertIntToDouble(ip, value); | 2436 ConvertIntToDouble(ip, value); |
2449 } | 2437 } |
2450 | 2438 |
2451 | 2439 |
2452 void MacroAssembler::TestDoubleIsInt32(DoubleRegister double_input, | 2440 void MacroAssembler::TestDoubleIsInt32(DoubleRegister double_input, |
2453 Register scratch1, Register scratch2, | 2441 Register scratch1, Register scratch2, |
2454 DoubleRegister double_scratch) { | 2442 DoubleRegister double_scratch) { |
2455 TryDoubleToInt32Exact(scratch1, double_input, scratch2, double_scratch); | 2443 TryDoubleToInt32Exact(scratch1, double_input, scratch2, double_scratch); |
(...skipping 2325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4781 } | 4769 } |
4782 if (mag.shift > 0) srawi(result, result, mag.shift); | 4770 if (mag.shift > 0) srawi(result, result, mag.shift); |
4783 ExtractBit(r0, dividend, 31); | 4771 ExtractBit(r0, dividend, 31); |
4784 add(result, result, r0); | 4772 add(result, result, r0); |
4785 } | 4773 } |
4786 | 4774 |
4787 } // namespace internal | 4775 } // namespace internal |
4788 } // namespace v8 | 4776 } // namespace v8 |
4789 | 4777 |
4790 #endif // V8_TARGET_ARCH_PPC | 4778 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |