Re: [PATCH 2/8] compat: make gcc bswap an inline function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 3/16/2011 8:00, schrieb Jonathan Nieder:
> +static inline uint32_t git_bswap32(uint32_t x)
> +{
> +	uint32_t result;
> +	if (__builtin_constant_p(x))

Can this predicate ever be true? Isn't it false even if the function is
inlined?

> +		result = default_swab32(x);
> +	else
> +		__asm__("bswap %0" : "=r" (result) : "0" (x));
> +	return result;
> +}

-- Hannes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]