ARM CPU part numbers
ams at codesourcery.com
Mon Sep 5 09:28:44 UTC 2011
On 01/09/11 10:40, Andrew Stubbs wrote:
> I'm currently trying to get GCC to auto-detect what CPU to optimize for
> by finding out what CPU it's actually running on (the user would only
> have to pass -mcpu=native). It does this simply by reading /proc/cpuinfo.
Thanks to everybody who answered my previous questions. I now have
sufficient numbers to be going on with. :)
Next question ... is /proc/cpuinfo really the best way to detect this?
I mean, is auxv a better approach? Or something else? What's the most
efficient, and most stable API to read the CPU architecture, CPU model,
and FPU/NEON availability?
There's some worry among the toolchain team that /proc/cpuinfo is a
somewhat fragile and inefficient way to achieve this goal. Some insight
from the kernel experts would be helpful!
More information about the linaro-dev