[PATCH] powerpc: New feature - HWCAP/HWCAP2 bits in the TCB
Mike Frysinger
vapier@gentoo.org
Wed Jul 8 06:00:00 GMT 2015
On 08 Jun 2015 18:03, Carlos Eduardo Seo wrote:
> +/* Get the hwcap/hwcap2 information from the TCB. Offsets taken
> + from tcb-offsets.h. */
> +static inline uint32_t
> +__ppc_get_hwcap (void)
> +{
> +
> + uint32_t __tcb_hwcap;
> +
> +#ifdef __powerpc64__
> + register unsigned long __tp __asm__ ("r13");
> + __asm__ volatile ("lwz %0,-28772(%1)\n"
> + : "=r" (__tcb_hwcap)
> + : "r" (__tp));
> +#else
> + register unsigned long __tp __asm__ ("r2");
> + __asm__ volatile ("lwz %0,-28724(%1)\n"
> + : "=r" (__tcb_hwcap)
> + : "r" (__tp));
> +#endif
> +
> + return __tcb_hwcap;
> +}
i'm confused ... why can't the offsets you've already calculated via the
offsets header be used instead of duplicating them all over this file ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20150708/e2a803a0/attachment.sig>
More information about the Libc-alpha
mailing list