LTTng-Tools fails to compile for the x32 ABI:
| .../src/common/utils.c: Assembler messages:
| .../src/common/utils.c:1026: Error: register type mismatch for `bsr'
| .../src/common/utils.c:1028: Error: operand type mismatch for `movq'
Add a macro to only use the x86_64 inline assembly version of fls_u64()
when the LP64 ABI is used.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
#define HAS_FLS_U32
#endif
-#if defined(__x86_64)
+#if defined(__x86_64) && defined(__LP64__)
static inline
unsigned int fls_u64(uint64_t x)
{
#define HAS_FLS_U32
#endif
-#if defined(__x86_64)
+#if defined(__x86_64) && defined(__LP64__)
static inline
unsigned int fls_u64(uint64_t x)
{