mudgangster

Tiny, scriptable MUD client
Log | Files | Refs | README

TracyArmCpuTable.hpp (10354B)


      1 namespace tracy
      2 {
      3 
      4 static const char* DecodeArmImplementer( uint32_t v )
      5 {
      6     static char buf[16];
      7     switch( v )
      8     {
      9     case 0x41: return "ARM";
     10     case 0x42: return "Broadcom";
     11     case 0x43: return "Cavium";
     12     case 0x44: return "DEC";
     13     case 0x46: return "Fujitsu";
     14     case 0x48: return "HiSilicon";
     15     case 0x4d: return "Motorola";
     16     case 0x4e: return "Nvidia";
     17     case 0x50: return "Applied Micro";
     18     case 0x51: return "Qualcomm";
     19     case 0x53: return "Samsung";
     20     case 0x54: return "Texas Instruments";
     21     case 0x56: return "Marvell";
     22     case 0x61: return "Apple";
     23     case 0x66: return "Faraday";
     24     case 0x68: return "HXT";
     25     case 0x69: return "Intel";
     26     default: break;
     27     }
     28     sprintf( buf, "0x%x", v );
     29     return buf;
     30 }
     31 
     32 static const char* DecodeArmPart( uint32_t impl, uint32_t part )
     33 {
     34     static char buf[16];
     35     switch( impl )
     36     {
     37     case 0x41:
     38         switch( part )
     39         {
     40         case 0x810: return "810";
     41         case 0x920: return "920";
     42         case 0x922: return "922";
     43         case 0x926: return "926";
     44         case 0x940: return "940";
     45         case 0x946: return "946";
     46         case 0x966: return "966";
     47         case 0xa20: return "1020";
     48         case 0xa22: return "1022";
     49         case 0xa26: return "1026";
     50         case 0xb02: return "11 MPCore";
     51         case 0xb36: return "1136";
     52         case 0xb56: return "1156";
     53         case 0xb76: return "1176";
     54         case 0xc05: return " Cortex-A5";
     55         case 0xc07: return " Cortex-A7";
     56         case 0xc08: return " Cortex-A8";
     57         case 0xc09: return " Cortex-A9";
     58         case 0xc0c: return " Cortex-A12";
     59         case 0xc0d: return " Rockchip RK3288";
     60         case 0xc0f: return " Cortex-A15";
     61         case 0xc0e: return " Cortex-A17";
     62         case 0xc14: return " Cortex-R4";
     63         case 0xc15: return " Cortex-R5";
     64         case 0xc17: return " Cortex-R7";
     65         case 0xc18: return " Cortex-R8";
     66         case 0xc20: return " Cortex-M0";
     67         case 0xc21: return " Cortex-M1";
     68         case 0xc23: return " Cortex-M3";
     69         case 0xc24: return " Cortex-M4";
     70         case 0xc27: return " Cortex-M7";
     71         case 0xc60: return " Cortex-M0+";
     72         case 0xd00: return " AArch64 simulator";
     73         case 0xd01: return " Cortex-A32";
     74         case 0xd03: return " Cortex-A53";
     75         case 0xd04: return " Cortex-A35";
     76         case 0xd05: return " Cortex-A55";
     77         case 0xd06: return " Cortex-A65";
     78         case 0xd07: return " Cortex-A57";
     79         case 0xd08: return " Cortex-A72";
     80         case 0xd09: return " Cortex-A73";
     81         case 0xd0a: return " Cortex-A75";
     82         case 0xd0b: return " Cortex-A76";
     83         case 0xd0c: return " Neoverse N1";
     84         case 0xd0d: return " Cortex-A77";
     85         case 0xd0e: return " Cortex-A76AE";
     86         case 0xd0f: return " AEMv8";
     87         case 0xd13: return " Cortex-R52";
     88         case 0xd20: return " Cortex-M23";
     89         case 0xd21: return " Cortex-M33";
     90         case 0xd4a: return " Neoverse E1";
     91         default: break;
     92         }
     93     case 0x42:
     94         switch( part )
     95         {
     96         case 0xf: return " Brahma B15";
     97         case 0x100: return " Brahma B53";
     98         case 0x516: return " ThunderX2";
     99         default: break;
    100         }
    101     case 0x43:
    102         switch( part )
    103         {
    104         case 0xa0: return " ThunderX";
    105         case 0xa1: return " ThunderX 88XX";
    106         case 0xa2: return " ThunderX 81XX";
    107         case 0xa3: return " ThunderX 83XX";
    108         case 0xaf: return " ThunderX2 99xx";
    109         default: break;
    110         }
    111     case 0x44:
    112         switch( part )
    113         {
    114         case 0xa10: return " SA110";
    115         case 0xa11: return " SA1100";
    116         default: break;
    117         }
    118     case 0x46:
    119         switch( part )
    120         {
    121         case 0x1: return " A64FX";
    122         default: break;
    123         }
    124     case 0x48:
    125         switch( part )
    126         {
    127         case 0xd01: return " TSV100";
    128         case 0xd40: return " Kirin 980";
    129         default: break;
    130         }
    131     case 0x4e:
    132         switch( part )
    133         {
    134         case 0x0: return " Denver";
    135         case 0x3: return " Denver 2";
    136         case 0x4: return " Carmel";
    137         default: break;
    138         }
    139     case 0x50:
    140         switch( part )
    141         {
    142         case 0x0: return " X-Gene";
    143         default: break;
    144         }
    145     case 0x51:
    146         switch( part )
    147         {
    148         case 0xf: return " Scorpion";
    149         case 0x2d: return " Scorpion";
    150         case 0x4d: return " Krait";
    151         case 0x6f: return " Krait";
    152         case 0x200: return " Kryo";
    153         case 0x201: return " Kryo Silver (Snapdragon 821)";
    154         case 0x205: return " Kryo Gold";
    155         case 0x211: return " Kryo Silver (Snapdragon 820)";
    156         case 0x800: return " Kryo 260 / 280 Gold";
    157         case 0x801: return " Kryo 260 / 280 Silver";
    158         case 0x802: return " Kryo 385 Gold";
    159         case 0x803: return " Kryo 385 Silver";
    160         case 0x804: return " Kryo 485 Gold";
    161         case 0xc00: return " Falkor";
    162         case 0xc01: return " Saphira";
    163         default: break;
    164         }
    165     case 0x53:
    166         switch( part )
    167         {
    168         case 0x1: return " Exynos M1/M2";
    169         case 0x2: return " Exynos M3";
    170         default: break;
    171         }
    172     case 0x56:
    173         switch( part )
    174         {
    175         case 0x131: return " Feroceon 88FR131";
    176         case 0x581: return " PJ4 / PJ4B";
    177         case 0x584: return " PJ4B-MP / PJ4C";
    178         default: break;
    179         }
    180     case 0x61:
    181         switch( part )
    182         {
    183         case 0x1: return " Cyclone";
    184         case 0x2: return " Typhoon";
    185         case 0x3: return " Typhoon/Capri";
    186         case 0x4: return " Twister";
    187         case 0x5: return " Twister/Elba/Malta";
    188         case 0x6: return " Hurricane";
    189         case 0x7: return " Hurricane/Myst";
    190         default: break;
    191         }
    192     case 0x66:
    193         switch( part )
    194         {
    195         case 0x526: return " FA526";
    196         case 0x626: return " FA626";
    197         default: break;
    198         }
    199     case 0x68:
    200         switch( part )
    201         {
    202         case 0x0: return " Phecda";
    203         default: break;
    204         }
    205     default: break;
    206     }
    207     sprintf( buf, " 0x%x", part );
    208     return buf;
    209 }
    210 
    211 static const char* DecodeIosDevice( const char* id )
    212 {
    213     static const char* DeviceTable[] = {
    214         "i386", "32-bit simulator",
    215         "x86_64", "64-bit simulator",
    216         "iPhone1,1", "iPhone",
    217         "iPhone1,2", "iPhone 3G",
    218         "iPhone2,1", "iPhone 3GS",
    219         "iPhone3,1", "iPhone 4 (GSM)",
    220         "iPhone3,2", "iPhone 4 (GSM)",
    221         "iPhone3,3", "iPhone 4 (CDMA)",
    222         "iPhone4,1", "iPhone 4S",
    223         "iPhone5,1", "iPhone 5 (A1428)",
    224         "iPhone5,2", "iPhone 5 (A1429)",
    225         "iPhone5,3", "iPhone 5c (A1456/A1532)",
    226         "iPhone5,4", "iPhone 5c (A1507/A1516/1526/A1529)",
    227         "iPhone6,1", "iPhone 5s (A1433/A1533)",
    228         "iPhone6,2", "iPhone 5s (A1457/A1518/A1528/A1530)",
    229         "iPhone7,1", "iPhone 6 Plus",
    230         "iPhone7,2", "iPhone 6",
    231         "iPhone8,1", "iPhone 6S",
    232         "iPhone8,2", "iPhone 6S Plus",
    233         "iPhone8,4", "iPhone SE",
    234         "iPhone9,1", "iPhone 7 (CDMA)",
    235         "iPhone9,2", "iPhone 7 Plus (CDMA)",
    236         "iPhone9,3", "iPhone 7 (GSM)",
    237         "iPhone9,4", "iPhone 7 Plus (GSM)",
    238         "iPhone10,1", "iPhone 8 (CDMA)",
    239         "iPhone10,2", "iPhone 8 Plus (CDMA)",
    240         "iPhone10,3", "iPhone X (CDMA)",
    241         "iPhone10,4", "iPhone 8 (GSM)",
    242         "iPhone10,5", "iPhone 8 Plus (GSM)",
    243         "iPhone10,6", "iPhone X (GSM)",
    244         "iPhone11,2", "iPhone XS",
    245         "iPhone11,4", "iPhone XS Max",
    246         "iPhone11,6", "iPhone XS Max China",
    247         "iPhone11,8", "iPhone XR",
    248         "iPad1,1", "iPad (A1219/A1337)",
    249         "iPad2,1", "iPad 2 (A1395)",
    250         "iPad2,2", "iPad 2 (A1396)",
    251         "iPad2,3", "iPad 2 (A1397)",
    252         "iPad2,4", "iPad 2 (A1395)",
    253         "iPad2,5", "iPad Mini (A1432)",
    254         "iPad2,6", "iPad Mini (A1454)",
    255         "iPad2,7", "iPad Mini (A1455)",
    256         "iPad3,1", "iPad 3 (A1416)",
    257         "iPad3,2", "iPad 3 (A1403)",
    258         "iPad3,3", "iPad 3 (A1430)",
    259         "iPad3,4", "iPad 4 (A1458)",
    260         "iPad3,5", "iPad 4 (A1459)",
    261         "iPad3,6", "iPad 4 (A1460)",
    262         "iPad4,1", "iPad Air (A1474)",
    263         "iPad4,2", "iPad Air (A1475)",
    264         "iPad4,3", "iPad Air (A1476)",
    265         "iPad4,4", "iPad Mini 2 (A1489)",
    266         "iPad4,5", "iPad Mini 2 (A1490)",
    267         "iPad4,6", "iPad Mini 2 (A1491)",
    268         "iPad4,7", "iPad Mini 3 (A1599)",
    269         "iPad4,8", "iPad Mini 3 (A1600)",
    270         "iPad4,9", "iPad Mini 3 (A1601)",
    271         "iPad5,1", "iPad Mini 4 (A1538)",
    272         "iPad5,2", "iPad Mini 4 (A1550)",
    273         "iPad5,3", "iPad Air 2 (A1566)",
    274         "iPad5,4", "iPad Air 2 (A1567)",
    275         "iPad6,3", "iPad Pro 9.7\" (A1673)",
    276         "iPad6,4", "iPad Pro 9.7\" (A1674)",
    277         "iPad6,5", "iPad Pro 9.7\" (A1675)",
    278         "iPad6,7", "iPad Pro 12.9\" (A1584)",
    279         "iPad6,8", "iPad Pro 12.9\" (A1652)",
    280         "iPad6,11", "iPad 5th gen (A1822)",
    281         "iPad6,12", "iPad 5th gen (A1823)",
    282         "iPad7,1", "iPad Pro 12.9\" 2nd gen (A1670)",
    283         "iPad7,2", "iPad Pro 12.9\" 2nd gen (A1671/A1821)",
    284         "iPad7,3", "iPad Pro 10.5\" (A1701)",
    285         "iPad7,4", "iPad Pro 10.5\" (A1709)",
    286         "iPad7,5", "iPad 6th gen (A1893)",
    287         "iPad7,6", "iPad 6th gen (A1954)",
    288         "iPad8,1", "iPad Pro 11\" (A1980)",
    289         "iPad8,2", "iPad Pro 11\" (A1980)",
    290         "iPad8,3", "iPad Pro 11\" (A1934/A1979/A2013)",
    291         "iPad8,4", "iPad Pro 11\" (A1934/A1979/A2013)",
    292         "iPad8,5", "iPad Pro 12.9\" 3rd gen (A1876)",
    293         "iPad8,6", "iPad Pro 12.9\" 3rd gen (A1876)",
    294         "iPad8,7", "iPad Pro 12.9\" 3rd gen (A1895/A1983/A2014)",
    295         "iPad8,8", "iPad Pro 12.9\" 3rd gen (A1895/A1983/A2014)",
    296         "iPad11,1", "iPad Mini 5th gen (A2133)",
    297         "iPad11,2", "iPad Mini 5th gen (A2124/A2125/A2126)",
    298         "iPad11,3", "iPad Air 3rd gen (A2152)",
    299         "iPad11,4", "iPad Air 3rd gen (A2123/A2153/A2154)",
    300         "iPod1,1", "iPod Touch",
    301         "iPod2,1", "iPod Touch 2nd gen",
    302         "iPod3,1", "iPod Touch 3rd gen",
    303         "iPod4,1", "iPod Touch 4th gen",
    304         "iPod5,1", "iPod Touch 5th gen",
    305         "iPod7,1", "iPod Touch 6th gen",
    306         "iPod9,1", "iPod Touch 7th gen",
    307         nullptr
    308     };
    309 
    310     auto ptr = DeviceTable;
    311     while( *ptr )
    312     {
    313         if( strcmp( ptr[0], id ) == 0 ) return ptr[1];
    314         ptr += 2;
    315     }
    316     return id;
    317 }
    318 
    319 }