diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-01-07 00:29:28 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-01-07 00:29:28 +0100 |
commit | 83ff7c8f7a503137e34dd279baa294bcc58a155d (patch) | |
tree | 344c2a6a580ddb51e8d1308034112b4b8fef96e6 /vespamalloc | |
parent | 16b9b998dd0aad126273b33d20a930c98ccb5b66 (diff) |
Replace with the other msbIdx version found in vespalib::Optimized::msbIdx.
Diffstat (limited to 'vespamalloc')
-rw-r--r-- | vespamalloc/src/vespamalloc/malloc/common.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/vespamalloc/src/vespamalloc/malloc/common.h b/vespamalloc/src/vespamalloc/malloc/common.h index 96dd1869a43..5041b545b4d 100644 --- a/vespamalloc/src/vespamalloc/malloc/common.h +++ b/vespamalloc/src/vespamalloc/malloc/common.h @@ -57,9 +57,7 @@ typedef int SizeClassT; inline int msbIdx(uint64_t v) { - int64_t result; - __asm __volatile("bsrq %0,%0" : "=r" (result) : "0" (v)); - return result; + return v ? 63 - __builtin_clzl(v) : 0; } template <size_t MinClassSizeC> |