On 1 September 2011 10:40, Andrew Stubbs <a...@codesourcery.com> wrote:
> Hi all,
>
> 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.
>
> The problem is finding what magic numbers correspond to what CPU. I've found
> the numbers for A8 and A9 empirically, but I'd like a longer list than that!
>
> Does anybody have a list of such numbers?
>
> Or else, perhaps people could just post any number they happen to know?
>
> I do have a few devices other than A8 and A9 lying around I can look at, but
> the problem there is I don't actually know for certain what exact CPU model
> those numbers map to, so confirmed numbers only please.

The QEMU tree appears to have a list in target-arm/cpu.h (LGPL):

#define ARM_CPUID_ARM1026     0x4106a262
#define ARM_CPUID_ARM926      0x41069265
#define ARM_CPUID_ARM946      0x41059461
#define ARM_CPUID_TI915T      0x54029152
#define ARM_CPUID_TI925T      0x54029252
#define ARM_CPUID_SA1100      0x4401A11B
#define ARM_CPUID_SA1110      0x6901B119
#define ARM_CPUID_PXA250      0x69052100
#define ARM_CPUID_PXA255      0x69052d00
#define ARM_CPUID_PXA260      0x69052903
#define ARM_CPUID_PXA261      0x69052d05
#define ARM_CPUID_PXA262      0x69052d06
#define ARM_CPUID_PXA270      0x69054110
#define ARM_CPUID_PXA270_A0   0x69054110
#define ARM_CPUID_PXA270_A1   0x69054111
#define ARM_CPUID_PXA270_B0   0x69054112
#define ARM_CPUID_PXA270_B1   0x69054113
#define ARM_CPUID_PXA270_C0   0x69054114
#define ARM_CPUID_PXA270_C5   0x69054117
#define ARM_CPUID_ARM1136     0x4117b363
#define ARM_CPUID_ARM1136_R2  0x4107b362
#define ARM_CPUID_ARM1176     0x410fb767
#define ARM_CPUID_ARM11MPCORE 0x410fb022
#define ARM_CPUID_CORTEXA8    0x410fc080
#define ARM_CPUID_CORTEXA8_R2 0x412fc083
#define ARM_CPUID_CORTEXA9    0x410fc090
#define ARM_CPUID_CORTEXM3    0x410fc231

With the field you were looking at being nybbles 3..1

Dave

_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to