Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(471)

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 300023011: Convert String array index/length hash to BitField (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm64/macro-assembler-arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "v8.h" 7 #include "v8.h"
8 8
9 #if V8_TARGET_ARCH_ARM 9 #if V8_TARGET_ARCH_ARM
10 10
(...skipping 2421 matching lines...) Expand 10 before | Expand all | Expand 10 after
2432 } 2432 }
2433 2433
2434 2434
2435 void MacroAssembler::IndexFromHash(Register hash, Register index) { 2435 void MacroAssembler::IndexFromHash(Register hash, Register index) {
2436 // If the hash field contains an array index pick it out. The assert checks 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 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 2438 // cached in the hash field and the number of bits reserved for it does not
2439 // conflict. 2439 // conflict.
2440 ASSERT(TenToThe(String::kMaxCachedArrayIndexLength) < 2440 ASSERT(TenToThe(String::kMaxCachedArrayIndexLength) <
2441 (1 << String::kArrayIndexValueBits)); 2441 (1 << String::kArrayIndexValueBits));
2442 // We want the smi-tagged index in key. kArrayIndexValueMask has zeros in 2442 DecodeFieldToSmi<String::ArrayIndexValueBits>(index, hash);
2443 // the low kHashShift bits.
2444 Ubfx(hash, hash, String::kHashShift, String::kArrayIndexValueBits);
2445 SmiTag(index, hash);
2446 } 2443 }
2447 2444
2448 2445
2449 void MacroAssembler::SmiToDouble(LowDwVfpRegister value, Register smi) { 2446 void MacroAssembler::SmiToDouble(LowDwVfpRegister value, Register smi) {
2450 if (CpuFeatures::IsSupported(VFP3)) { 2447 if (CpuFeatures::IsSupported(VFP3)) {
2451 vmov(value.low(), smi); 2448 vmov(value.low(), smi);
2452 vcvt_f64_s32(value, 1); 2449 vcvt_f64_s32(value, 1);
2453 } else { 2450 } else {
2454 SmiUntag(ip, smi); 2451 SmiUntag(ip, smi);
2455 vmov(value.low(), ip); 2452 vmov(value.low(), ip);
(...skipping 1587 matching lines...) Expand 10 before | Expand all | Expand 10 after
4043 sub(result, result, Operand(dividend)); 4040 sub(result, result, Operand(dividend));
4044 } 4041 }
4045 if (ms.shift() > 0) mov(result, Operand(result, ASR, ms.shift())); 4042 if (ms.shift() > 0) mov(result, Operand(result, ASR, ms.shift()));
4046 add(result, result, Operand(dividend, LSR, 31)); 4043 add(result, result, Operand(dividend, LSR, 31));
4047 } 4044 }
4048 4045
4049 4046
4050 } } // namespace v8::internal 4047 } } // namespace v8::internal
4051 4048
4052 #endif // V8_TARGET_ARCH_ARM 4049 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm64/macro-assembler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698