[PATCH] PPC enable Alitvec hardware, part 1

Steve Munroe sjmunroe@us.ibm.com
Sun Jan 11 16:41:00 GMT 2004


Roland McGrath writes:

> > The attached patch provides base enabling for PowerPC Altivec (AKA 
VMX) 
> > and for versioning effected functions. 2.6.0 kernels provide a 
> > PPC_FEATURE_HAS_ALTIVEC status in the AT_HWCAP. We need to capture 
this 
> > status as a static flag (__has_altivec) so functions enabled for 
altivec 
> > can run safely on PowerPC hardware without the Altivec feature.
>
> Why did you introduce this variable?  Using GL(dl_hwcap) should be fine.

GL(dl_hwcap) is not very asm friendly. ldsodefs.h is full of things that 
gas does not like. Plus in the shared case _rtld_global.dl_hwcap is a 
struct/field and there is no (automatic/correct) way to obtain the offset 
of the dl_hwcap field for the asm code. 

Steven J. Munroe
Power Linux Toolchain Architect
IBM Corporation, Linux Technology Center



More information about the Libc-hacker mailing list