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

Side by Side Diff: src/arm64/utils-arm64.cc

Issue 364653003: ARM64: Reland faster immediate check (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/arm64/utils-arm64.h ('k') | test/cctest/test-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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/arm64/utils-arm64.h" 7 #include "src/arm64/utils-arm64.h"
8 8
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 value = ((value >> 2) & 0x3333333333333333) + (value & 0x3333333333333333); 71 value = ((value >> 2) & 0x3333333333333333) + (value & 0x3333333333333333);
72 value = ((value >> 4) & 0x0f0f0f0f0f0f0f0f) + (value & 0x0f0f0f0f0f0f0f0f); 72 value = ((value >> 4) & 0x0f0f0f0f0f0f0f0f) + (value & 0x0f0f0f0f0f0f0f0f);
73 value = ((value >> 8) & 0x00ff00ff00ff00ff) + (value & 0x00ff00ff00ff00ff); 73 value = ((value >> 8) & 0x00ff00ff00ff00ff) + (value & 0x00ff00ff00ff00ff);
74 value = ((value >> 16) & 0x0000ffff0000ffff) + (value & 0x0000ffff0000ffff); 74 value = ((value >> 16) & 0x0000ffff0000ffff) + (value & 0x0000ffff0000ffff);
75 value = ((value >> 32) & 0x00000000ffffffff) + (value & 0x00000000ffffffff); 75 value = ((value >> 32) & 0x00000000ffffffff) + (value & 0x00000000ffffffff);
76 76
77 return value; 77 return value;
78 } 78 }
79 79
80 80
81 uint64_t LargestPowerOf2Divisor(uint64_t value) {
82 return value & -value;
83 }
84
85
81 int MaskToBit(uint64_t mask) { 86 int MaskToBit(uint64_t mask) {
82 ASSERT(CountSetBits(mask, 64) == 1); 87 ASSERT(CountSetBits(mask, 64) == 1);
83 return CountTrailingZeros(mask, 64); 88 return CountTrailingZeros(mask, 64);
84 } 89 }
85 90
86 91
87 } } // namespace v8::internal 92 } } // namespace v8::internal
88 93
89 #endif // V8_TARGET_ARCH_ARM64 94 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/utils-arm64.h ('k') | test/cctest/test-assembler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698