Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 728058
Collapse All | Expand All

(-)./include/jemalloc/internal/bit_util.h.orig (-3 / +3 lines)
Lines 82-88 Link Here
82
82
83
BIT_UTIL_INLINE uint64_t
83
BIT_UTIL_INLINE uint64_t
84
pow2_ceil_u64(uint64_t x) {
84
pow2_ceil_u64(uint64_t x) {
85
#if (defined(__amd64__) || defined(__x86_64__) || defined(JEMALLOC_HAVE_BUILTIN_CLZ))
85
#if ((defined(__amd64__) || defined(__x86_64__) || defined(JEMALLOC_HAVE_BUILTIN_CLZ))) && !defined(__ILP32__)
86
	if(unlikely(x <= 1)) {
86
	if(unlikely(x <= 1)) {
87
		return x;
87
		return x;
88
	}
88
	}
Lines 112-123 Link Here
112
112
113
BIT_UTIL_INLINE uint32_t
113
BIT_UTIL_INLINE uint32_t
114
pow2_ceil_u32(uint32_t x) {
114
pow2_ceil_u32(uint32_t x) {
115
#if ((defined(__i386__) || defined(JEMALLOC_HAVE_BUILTIN_CLZ)) && (!defined(__s390__)))
115
#if (((defined(__i386__) || (defined(__amd64__) || defined(__x86_64__)) && defined(__ILP32__)) || defined(JEMALLOC_HAVE_BUILTIN_CLZ)) && (!defined(__s390__)))
116
	if(unlikely(x <= 1)) {
116
	if(unlikely(x <= 1)) {
117
		return x;
117
		return x;
118
	}
118
	}
119
	size_t msb_on_index;
119
	size_t msb_on_index;
120
#if (defined(__i386__))
120
#if (defined(__i386__)) || defined(__ILP32__)
121
	asm ("bsr %1, %0"
121
	asm ("bsr %1, %0"
122
			: "=r"(msb_on_index) // Outputs.
122
			: "=r"(msb_on_index) // Outputs.
123
			: "r"(x-1)           // Inputs.
123
			: "r"(x-1)           // Inputs.

Return to bug 728058