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

Unified Diff: src/a64/utils-a64.h

Issue 170383003: Merge a few A64 utils into the CompilerIntrinsics. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixes and cleaning Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/a64/simulator-a64.cc ('k') | src/a64/utils-a64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/a64/utils-a64.h
diff --git a/src/a64/utils-a64.h b/src/a64/utils-a64.h
index 16c51a9c8b52770b44d09fe738adc1cc34dbd80c..b25f29e468c06207559810469dd78364ddd55e86 100644
--- a/src/a64/utils-a64.h
+++ b/src/a64/utils-a64.h
@@ -71,11 +71,10 @@ static inline double rawbits_to_double(uint64_t bits) {
// Bits counting.
-int CountLeadingZeros(uint64_t value, int width);
-int CountLeadingSignBits(int64_t value, int width);
-int CountTrailingZeros(uint64_t value, int width);
-int CountSetBits(uint64_t value, int width);
-int MaskToBit(uint64_t mask);
+inline int MaskToBit(uint64_t mask) {
+ ASSERT(CountSetBits(mask, 64) == 1);
+ return CountTrailingZeros(mask, 64);
+}
// NaN tests.
« no previous file with comments | « src/a64/simulator-a64.cc ('k') | src/a64/utils-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698