From: Jan Engelhardt <jengelh@xxxxxxxxxx> Date: Fri, 2 Jul 2010 15:27:44 +0200 (CEST) > But is there a C-programmatical way that does not rely on external > files? /proc may not be mounted. auxv is usually not accessible, > and forking is a sin too. OpenSSL uses assembler tricks and traps > to determine if something has 4v or not, which leaves the realm of C. > But it looks like it's okay, given x86 programs also do asm/cpuid > to determine SSE availability. I would really prefer that people use the AUXV information. Right now this is what GLIBC uses to determine which optimized memset/memcpy/etc. routines to use. And this is also the case when STT_GNU_IFUNC is used. There are mechanisms by which you can mask the AUXV bits out, and by doing so you can cause libraries that correctly inspect the AUXV for feature bits to use the other optimized code cases. You'd want to use this, for example, to run test suites over all the available optimization cases on a single machine. And that's something I really want a capability for. You can pretty much test all the sparc64 optimized cases on a Niagara2 chip and the performance is reasonable. -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html