<commit_before>/*
 * Copyright 2008  <NAME>,
 * anrieffNOSPAM @ <EMAIL> (convert to gmail)
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include <stdio.h>
#include <string.h>
#include "libcpuid.h"
#include "recog_amd.h"
#include "libcpuid_util.h"

enum _amd_code_t {
	NA,
	NO_CODE,
	OPTERON_GENERIC,
	OPTERON_800,
	ATHLON_XP,
	ATHLON_XP_BARTON,
	ATHLON_XP_M,
	ATHLON_XP_M_LV,
	ATHLON,
	ATHLON_MP,
	MOBILE_ATHLON64,
	ATHLON_FX,
	DURON,
	DURON_MP,
	MOBILE_DURON,
	SEMPRON,
	MOBILE_SEMPRON,
	OPTERON_SINGLE,
	OPTERON_DUALCORE,
	OPTERON_800_DUALCORE,
	MOBILE_TURION,
	ATHLON_64_512K,
	ATHLON_64_1M,
	ATHLON_64_X2_512K,
	ATHLON_64_X2_1M,
	ATHLON_64_FX,
	TURION_64_512K,
	TURION_64_1M,
	TURION_X2_512K,
	TURION_X2_1M,
	SEMPRON_64_128K,
	SEMPRON_64_256K,
	SEMPRON_64_512K,
	M_SEMPRON_64_256K,
	M_SEMPRON_64_512K,
	SEMPRON_DUALCORE,
	PHENOM,
	PHENOM_X2,
	PHENOM_X3,
	PHENOM_X4,
};
typedef enum _amd_code_t amd_code_t;

const struct match_entry_t cpudb_amd[] = {
	{ -1, -1, -1, -1, -1, NO_CODE          , "Unknown AMD CPU"         },
	
	/* 486 and the likes */
	{  4, -1, -1, -1, -1, NO_CODE          , "Unknown AMD 486"         },
	{  4,  3, -1, -1, -1, NO_CODE          , "AMD 486DX2"              },
	{  4,  7, -1, -1, -1, NO_CODE          , "AMD 486DX2WB"            },
	{  4,  8, -1, -1, -1, NO_CODE          , "AMD 486DX4"              },
	{  4,  9, -1, -1, -1, NO_CODE          , "AMD 486DX4WB"            },
	
	/* Pentia clones */
	{  5, -1, -1, -1, -1, NO_CODE          , "Unknown AMD 586"         },
	{  5,  0, -1, -1, -1, NO_CODE          , "K5"                      },
	{  5,  1, -1, -1, -1, NO_CODE          , "K5"                      },
	{  5,  2, -1, -1, -1, NO_CODE          , "K5"                      },
	{  5,  3, -1, -1, -1, NO_CODE          , "K5"                      },
	
	/* The K6 */
	{  5,  6, -1, -1, -1, NO_CODE          , "K6"                      },
	{  5,  7, -1, -1, -1, NO_CODE          , "K6"                      },
	
	{  5,  8, -1, -1, -1, NO_CODE          , "K6-2"                    },
	{  5,  9, -1, -1, -1, NO_CODE          , "K6-III"                  },
	{  5, 10, -1, -1, -1, NO_CODE          , "Unknown K6"              },
	{  5, 11, -1, -1, -1, NO_CODE          , "Unknown K6"              },
	{  5, 12, -1, -1, -1, NO_CODE          , "Unknown K6"              },
	{  5, 13, -1, -1, -1, NO_CODE          , "K6-2+"                   },
	
	/* Athlon et al. */
	{  6,  1, -1, -1, -1, NO_CODE          , "Athlon (Slot-A)"         },
	{  6,  2, -1, -1, -1, NO_CODE          , "Athlon (Slot-A)"         },
	{  6,  3, -1, -1, -1, NO_CODE          , "Duron (Spitfire)"        },
	{  6,  4, -1, -1, -1, NO_CODE          , "Athlon (ThunderBird)"    },
	
	{  6,  6, -1, -1, -1, NO_CODE          , "Unknown Athlon"          },
	{  6,  6, -1, -1, -1, ATHLON           , "Athlon (Palomino)"       },
	{  6,  6, -1, -1, -1, ATHLON_MP        , "Athlon MP (Palomino)"    },
	{  6,  6, -1, -1, -1, DURON            , "Duron (Palomino)"        },
	{  6,  6, -1, -1, -1, ATHLON_XP        , "Athlon XP"               },
	
	{  6,  7, -1, -1, -1, NO_CODE          , "Unknown Athlon XP"       },
	{  6,  7, -1, -1, -1, DURON            , "Duron (Morgan)"          },
	
	{  6,  8, -1, -1, -1, NO_CODE          , "Athlon XP"               },
	{  6,  8, -1, -1, -1, ATHLON           , "Athlon XP"               },
	{  6,  8, -1, -1, -1, ATHLON_XP        , "Athlon XP"               },
	{  6,  8, -1, -1, -1, DURON            , "Duron (Applebred)"       },
	{  6,  8, -1, -1, -1, SEMPRON          , "Sempron (Thoroughbred)"  },
	{  6,  8, -1, -1, -1, SEMPRON_64_128K  , "Sempron (Thoroughbred)"  },
	{  6,  8, -1, -1, -1, SEMPRON_64_256K  , "Sempron (Thoroughbred)"  },
	{  6,  8, -1, -1, -1, ATHLON_MP        , "Athlon MP (Thoroughbred)"},
	{  6,  8, -1, -1, -1, ATHLON_XP_M      , "Mobile Athlon (T-Bred)"  },
	{  6,  8, -1, -1, -1, ATHLON_XP_M_LV   , "Mobile Athlon (T-Bred)"  },
	
	{  6, 10, -1, -1, -1, NO_CODE          , "Athlon XP (Barton)"      },
	{  6, 10, -1, -1, -1, ATHLON           , "Athlon XP (Barton)"      },
	{  6, 10, -1, -1, -1, ATHLON_XP_BARTON , "Athlon XP (Barton)"      },
	{  6, 10, -1, -1, -1, SEMPRON          , "Sempron (Barton)"        },
	{  6, 10, -1, -1, -1, SEMPRON_64_256K  , "Sempron (Barton)"        },
	{  6, 10, -1, -1, -1, ATHLON_XP        , "Athlon XP"               },
	/* ^^ Actually, Thorton, but it's equivallent to Thoroughbred */
	{  6, 10, -1, -1, -1, ATHLON_MP        , "Athlon MP (Barton)"      },
	{  6, 10, -1, -1, -1, ATHLON_XP_M      , "Mobile Athlon (Barton)"  },
	{  6, 10, -1, -1, -1, ATHLON_XP_M_LV   , "Mobile Athlon (Barton)"  },
	
	/* K8 Architecture */
	{ 15, -1, -1, 15, -1, NO_CODE          , "Unknown K8"              },
	{ 15, -1, -1, 16, -1, NO_CODE          , "Unknown K9"              },
	
	{ 15, -1, -1, 15, -1, NO_CODE          , "Unknown A64"             },
	{ 15, -1, -1, 15, -1, OPTERON_SINGLE   , "Opteron"                 },
	{ 15, -1, -1, 15, -1, OPTERON_DUALCORE , "Opteron (Dual Core)"     },
	{ 15,  3, -1, 15, -1, OPTERON_SINGLE   , "Opteron"                 },
	{ 15,  3, -1, 15, -1, OPTERON_DUALCORE , "Opteron (Dual Core)"     },
	{ 15, -1, -1, 15, -1, ATHLON_64_512K   , "Athlon 64 (512K)"        },
	{ 15, -1, -1, 15, -1, ATHLON_64_1M     , "Athlon 64 (1024K)"       },
	{ 15, -1, -1, 15, 0x2c, ATHLON_64_512K   , "Athlon 64 (Venice/512K)"        },
	{ 15, -1, -1, 15, -1, ATHLON_64_X2_512K, "Athlon 64 X2 (512K)"     },
	{ 15, -1, -1, 15, 0x6b, ATHLON_64_X2_512K, "Athlon 64 X2 (Brisbane/512K)"     },
	{ 15, -1, -1, 15, -1, ATHLON_64_X2_1M  , "Athlon 64 X2 (1024K)"    },
	{ 15, -1, -1, 15, -1, ATHLON_FX        , "Athlon FX"               },
	{ 15, -1, -1, 15, -1, ATHLON_64_FX     , "Athlon 64 FX"            },
	{ 15, -1, -1, 15, -1, TURION_64_512K   , "Turion 64 (512K)"        },
	{ 15, -1, -1, 15, -1, TURION_64_1M     , "Turion 64 (1024K)"       },
	{ 15, -1, -1, 15, -1, TURION_X2_512K   , "Turion 64 X2 (512K)"     },
	{ 15, -1, -1, 15, -1, TURION_X2_1M     , "Turion 64 X2 (1024K)"    },
	{ 15, -1, -1, 15, -1, SEMPRON_64_128K  , "A64 Sempron (128K)"      },
	{ 15, -1, -1, 15, -1, SEMPRON_64_256K  , "A64 Sempron (256K)"      },
	{ 15, -1, -1, 15, -1, SEMPRON_64_512K  , "A64 Sempron (512K)"      },
	{ 15, -1, -1, 15, 0x2c, SEMPRON_64_128K, "Sempron 64 (Palermo/128K)"      },
	{ 15, -1, -1, 15, 0x2c, SEMPRON_64_256K, "Sempron 64 (Palermo/256K)"      },
	{ 15, -1, -1, 15, 0x2f, SEMPRON_64_128K, "Sempron 64 (Palermo/128K)"      },
	{ 15, -1, -1, 15, 0x2f, SEMPRON_64_256K, "Sempron 64 (Palermo/256K)"      },
	{ 15, -1, -1, 15, 0x4f, SEMPRON_64_128K, "Sempron 64 (Manila/128K)"      },
	{ 15, -1, -1, 15, 0x4f, SEMPRON_64_256K, "Sempron 64 (Manila/256K)"      },
	{ 15, -1, -1, 15, 0x7f, SEMPRON_64_256K, "Sempron 64 (Sparta/256K)"      },
	{ 15, -1, -1, 15, 0x7f, SEMPRON_64_512K, "Sempron 64 (Sparta/512K)"      },
	{ 15, -1, -1, 15, -1, M_SEMPRON_64_256K, "Mobile Sempron 64 (Keene/256K)"  },
	{ 15, -1, -1, 15, -1, M_SEMPRON_64_512K, "Mobile Sempron 64 (Keene/512K)"  },
	{ 15, -1, -1, 15, -1, SEMPRON_DUALCORE , "A64 Sempron (Dual Core)" },
	
	/* K9 Architecture */
	{ 15, -1, -1, 16, -1, PHENOM           , "Unknown AMD Phenom"      },
	{ 15,  2, -1, 16, -1, PHENOM           , "Phenom"                  },
	{ 15,  2, -1, 16, -1, PHENOM_X3        , "Phenom X3 (Toliman)"     },
	{ 15,  2, -1, 16, -1, PHENOM_X4        , "Phenom X4 (Agena)"       },
};


static void load_amd_features(struct cpu_raw_data_t* raw, struct cpu_id_t* data)<commit_msg>Added core codenames of most Athlon 64 and Athlon X2 CPUs<commit_after>/*
 * Copyright 2008  <NAME>,
 * <EMAIL> (convert to gmail)
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include <stdio.h>
#include <string.h>
#include "libcpuid.h"
#include "recog_amd.h"
#include "libcpuid_util.h"

enum _amd_code_t {
	NA,
	NO_CODE,
	OPTERON_GENERIC,
	OPTERON_800,
	ATHLON_XP,
	ATHLON_XP_BARTON,
	ATHLON_XP_M,
	ATHLON_XP_M_LV,
	ATHLON,
	ATHLON_MP,
	MOBILE_ATHLON64,
	ATHLON_FX,
	DURON,
	DURON_MP,
	MOBILE_DURON,
	SEMPRON,
	MOBILE_SEMPRON,
	OPTERON_SINGLE,
	OPTERON_DUALCORE,
	OPTERON_800_DUALCORE,
	MOBILE_TURION,
	ATHLON_64_512K,
	ATHLON_64_1M,
	ATHLON_64_X2_512K,
	ATHLON_64_X2_1M,
	ATHLON_64_FX,
	TURION_64_512K,
	TURION_64_1M,
	TURION_X2_512K,
	TURION_X2_1M,
	SEMPRON_64_128K,
	SEMPRON_64_256K,
	SEMPRON_64_512K,
	M_SEMPRON_64_256K,
	M_SEMPRON_64_512K,
	SEMPRON_DUALCORE,
	PHENOM,
	PHENOM_X2,
	PHENOM_X3,
	PHENOM_X4,
};
typedef enum _amd_code_t amd_code_t;

const struct match_entry_t cpudb_amd[] = {
	{ -1, -1, -1, -1,   -1, NO_CODE                 , "Unknown AMD CPU"               },
	
	/* 486 and the likes */
	{  4, -1, -1, -1,   -1, NO_CODE                 , "Unknown AMD 486"               },
	{  4,  3, -1, -1,   -1, NO_CODE                 , "AMD 486DX2"                    },
	{  4,  7, -1, -1,   -1, NO_CODE                 , "AMD 486DX2WB"                  },
	{  4,  8, -1, -1,   -1, NO_CODE                 , "AMD 486DX4"                    },
	{  4,  9, -1, -1,   -1, NO_CODE                 , "AMD 486DX4WB"                  },
	
	/* Pentia clones */
	{  5, -1, -1, -1,   -1, NO_CODE                 , "Unknown AMD 586"               },
	{  5,  0, -1, -1,   -1, NO_CODE                 , "K5"                            },
	{  5,  1, -1, -1,   -1, NO_CODE                 , "K5"                            },
	{  5,  2, -1, -1,   -1, NO_CODE                 , "K5"                            },
	{  5,  3, -1, -1,   -1, NO_CODE                 , "K5"                            },
	
	/* The K6 */
	{  5,  6, -1, -1,   -1, NO_CODE                 , "K6"                            },
	{  5,  7, -1, -1,   -1, NO_CODE                 , "K6"                            },
	
	{  5,  8, -1, -1,   -1, NO_CODE                 , "K6-2"                          },
	{  5,  9, -1, -1,   -1, NO_CODE                 , "K6-III"                        },
	{  5, 10, -1, -1,   -1, NO_CODE                 , "Unknown K6"                    },
	{  5, 11, -1, -1,   -1, NO_CODE                 , "Unknown K6"                    },
	{  5, 12, -1, -1,   -1, NO_CODE                 , "Unknown K6"                    },
	{  5, 13, -1, -1,   -1, NO_CODE                 , "K6-2+"                         },
	
	/* Athlon et al. */
	{  6,  1, -1, -1,   -1, NO_CODE                 , "Athlon (Slot-A)"               },
	{  6,  2, -1, -1,   -1, NO_CODE                 , "Athlon (Slot-A)"               },
	{  6,  3, -1, -1,   -1, NO_CODE                 , "Duron (Spitfire)"              },
	{  6,  4, -1, -1,   -1, NO_CODE                 , "Athlon (ThunderBird)"          },
	
	{  6,  6, -1, -1,   -1, NO_CODE                 , "Unknown Athlon"                },
	{  6,  6, -1, -1,   -1, ATHLON                  , "Athlon (Palomino)"             },
	{  6,  6, -1, -1,   -1, ATHLON_MP               , "Athlon MP (Palomino)"          },
	{  6,  6, -1, -1,   -1, DURON                   , "Duron (Palomino)"              },
	{  6,  6, -1, -1,   -1, ATHLON_XP               , "Athlon XP"                     },
	
	{  6,  7, -1, -1,   -1, NO_CODE                 , "Unknown Athlon XP"             },
	{  6,  7, -1, -1,   -1, DURON                   , "Duron (Morgan)"                },
	
	{  6,  8, -1, -1,   -1, NO_CODE                 , "Athlon XP"                     },
	{  6,  8, -1, -1,   -1, ATHLON                  , "Athlon XP"                     },
	{  6,  8, -1, -1,   -1, ATHLON_XP               , "Athlon XP"                     },
	{  6,  8, -1, -1,   -1, DURON                   , "Duron (Applebred)"             },
	{  6,  8, -1, -1,   -1, SEMPRON                 , "Sempron (Thoroughbred)"        },
	{  6,  8, -1, -1,   -1, SEMPRON_64_128K         , "Sempron (Thoroughbred)"        },
	{  6,  8, -1, -1,   -1, SEMPRON_64_256K         , "Sempron (Thoroughbred)"        },
	{  6,  8, -1, -1,   -1, ATHLON_MP               , "Athlon MP (Thoroughbred)"      },
	{  6,  8, -1, -1,   -1, ATHLON_XP_M             , "Mobile Athlon (T-Bred)"        },
	{  6,  8, -1, -1,   -1, ATHLON_XP_M_LV          , "Mobile Athlon (T-Bred)"        },
	
	{  6, 10, -1, -1,   -1, NO_CODE                 , "Athlon XP (Barton)"            },
	{  6, 10, -1, -1,   -1, ATHLON                  , "Athlon XP (Barton)"            },
	{  6, 10, -1, -1,   -1, ATHLON_XP_BARTON        , "Athlon XP (Barton)"            },
	{  6, 10, -1, -1,   -1, SEMPRON                 , "Sempron (Barton)"              },
	{  6, 10, -1, -1,   -1, SEMPRON_64_256K         , "Sempron (Barton)"              },
	{  6, 10, -1, -1,   -1, ATHLON_XP               , "Athlon XP"                     },
	/* ^^ Actually, Thorton, but it's equivallent to Thoroughbred */
	{  6, 10, -1, -1,   -1, ATHLON_MP               , "Athlon MP (Barton)"            },
	{  6, 10, -1, -1,   -1, ATHLON_XP_M             , "Mobile Athlon (Barton)"        },
	{  6, 10, -1, -1,   -1, ATHLON_XP_M_LV          , "Mobile Athlon (Barton)"        },
	
	/* K8 Architecture */
	{ 15, -1, -1, 15,   -1, NO_CODE                 , "Unknown K8"                    },
	{ 15, -1, -1, 16,   -1, NO_CODE                 , "Unknown K9"                    },
	
	{ 15, -1, -1, 15,   -1, NO_CODE                 , "Unknown A64"                   },
	{ 15, -1, -1, 15,   -1, OPTERON_SINGLE          , "Opteron"                       },
	{ 15, -1, -1, 15,   -1, OPTERON_DUALCORE        , "Opteron (Dual Core)"           },
	{ 15,  3, -1, 15,   -1, OPTERON_SINGLE          , "Opteron"                       },
	{ 15,  3, -1, 15,   -1, OPTERON_DUALCORE        , "Opteron (Dual Core)"           },
	{ 15, -1, -1, 15,   -1, ATHLON_64_512K          , "Athlon 64 (512K)"              },
	{ 15, -1, -1, 15,   -1, ATHLON_64_1M            , "Athlon 64 (1024K)"             },
	{ 15, -1, -1, 15,   -1, ATHLON_FX               , "Athlon FX"                     },
	{ 15, -1, -1, 15,   -1, ATHLON_64_FX            , "Athlon 64 FX"                  },
	{ 15, -1, -1, 15,   -1, ATHLON_64_X2_512K       , "Athlon 64 X2 (512K)"           },
	{ 15, -1, -1, 15,   -1, ATHLON_64_X2_1M         , "Athlon 64 X2 (1024K)"          },
	{ 15, -1, -1, 15,   -1, TURION_64_512K          , "Turion 64 (512K)"              },
	{ 15, -1, -1, 15,   -1, TURION_64_1M            , "Turion 64 (1024K)"             },
	{ 15, -1, -1, 15,   -1, TURION_X2_512K          , "Turion 64 X2 (512K)"           },
	{ 15, -1, -1, 15,   -1, TURION_X2_1M            , "Turion 64 X2 (1024K)"          },
	{ 15, -1, -1, 15,   -1, SEMPRON_64_128K         , "A64 Sempron (128K)"            },
	{ 15, -1, -1, 15,   -1, SEMPRON_64_256K         , "A64 Sempron (256K)"            },
	{ 15, -1, -1, 15,   -1, SEMPRON_64_512K         , "A64 Sempron (512K)"            },
	{ 15, -1, -1, 15, 0x4f, ATHLON_64_512K          , "Athlon 64 (Orleans/512K)"      },
	{ 15, -1, -1, 15, 0x5f, ATHLON_64_512K          , "Athlon 64 (Orleans/512K)"      },
	{ 15, -1, -1, 15, 0x2f, ATHLON_64_512K          , "Athlon 64 (Venice/512K)"       },
	{ 15, -1, -1, 15, 0x2c, ATHLON_64_512K          , "Athlon 64 (Venice/512K)"       },
	{ 15, -1, -1, 15, 0x1f, ATHLON_64_512K          , "Athlon 64 (Winchester/512K)"   },
	{ 15, -1, -1, 15, 0x0c, ATHLON_64_512K          , "Athlon 64 (Newcastle/512K)"    },
	{ 15, -1, -1, 15, 0x27, ATHLON_64_512K          , "Athlon 64 (San Diego/512K)"    },
	{ 15, -1, -1, 15, 0x37, ATHLON_64_512K          , "Athlon 64 (San Diego/512K)"    },
	{ 15, -1, -1, 15, 0x04, ATHLON_64_512K          , "Athlon 64 (ClawHammer/512K)"   },
	
	{ 15, -1, -1, 15, 0x5f, ATHLON_64_1M            , "Athlon 64 (Orleans/1024K)"     },
	{ 15, -1, -1, 15, 0x27, ATHLON_64_1M            , "Athlon 64 (San Diego/1024K)"   },
	{ 15, -1, -1, 15, 0x04, ATHLON_64_1M            , "Athlon 64 (ClawHammer/1024K)"  },
	
	{ 15, -1, -1, 15, 0x4b, SEMPRON_DUALCORE        , "Athlon 64 X2 (Windsor/256K)"   },
	
	{ 15, -1, -1, 15, 0x23, ATHLON_64_X2_512K       , "Athlon 64 X2 (Toledo/512K)"    },
	{ 15, -1, -1, 15, 0x4b, ATHLON_64_X2_512K       , "Athlon 64 X2 (Windsor/512K)"   },
	{ 15, -1, -1, 15, 0x43, ATHLON_64_X2_512K       , "Athlon 64 X2 (Windsor/512K)"   },
	{ 15, -1, -1, 15, 0x6b, ATHLON_64_X2_512K       , "Athlon 64 X2 (Brisbane/512K)"  },
	{ 15, -1, -1, 15, 0x2b, ATHLON_64_X2_512K       , "Athlon 64 X2 (Manchester/512K)"},
	
	{ 15, -1, -1, 15, 0x23, ATHLON_64_X2_1M         , "Athlon 64 X2 (Toledo/1024K)"   },
	{ 15, -1, -1, 15, 0x43, ATHLON_64_X2_1M         , "Athlon 64 X2 (Windsor/1024K)"  },
	
	{ 15, -1, -1, 15, 0x2c, SEMPRON_64_128K         , "Sempron 64 (Palermo/128K)"     },
	{ 15, -1, -1, 15, 0x2c, SEMPRON_64_256K         , "Sempron 64 (Palermo/256K)"     },
	{ 15, -1, -1, 15, 0x2f, SEMPRON_64_128K         , "Sempron 64 (Palermo/128K)"     },
	{ 15, -1, -1, 15, 0x2f, SEMPRON_64_256K         , "Sempron 64 (Palermo/256K)"     },
	{ 15, -1, -1, 15, 0x4f, SEMPRON_64_128K         , "Sempron 64 (Manila/128K)"      },
	{ 15, -1, -1, 15, 0x4f, SEMPRON_64_256K         , "Sempron 64 (Manila/256K)"      },
	{ 15, -1, -1, 15, 0x7f, SEMPRON_64_256K         , "Sempron 64 (Sparta/256K)"      },
	{ 15, -1, -1, 15, 0x7f, SEMPRON_64_512K         , "Sempron 64 (Sparta/512K)"      },
	{ 15, -1, -1, 15,   -1, M_SEMPRON_64_256K       , "Mobile Sempron 64 (Keene/256K)"},
	{ 15, -1, -1, 15,   -1, M_SEMPRON_64_512K       , "Mobile Sempron 64 (Keene/512K)"},
	{ 15, -1, -1, 15,   -1, SEMPRON_DUALCORE        , "Sempron Dual Core"             },
	
	/* K9 Architecture */
	{ 15, -1, -1, 16,   -1, PHENOM                  , "Unknown AMD Phenom"            },
	{ 15,  2, -1, 16,   -1, PHENOM                  , "Phenom"                        },
	{ 15,  2, -1, 16,   -1, PHENOM_X3               , "Phenom X3 (Toliman)"           },
	{ 15,  2, -1, 16,   -1, PHENOM_X4               , "Phenom X4 (Agena)"             },
};


static void load_amd_features(struct cpu_raw_data_t* raw, struct cpu_id_t* data)
{'fraction_non_alphanumeric': 0.1631244413546529, 'fraction_numerical': 0.10671367563809712, 'mean_word_length': 1.5599339011058853, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 82, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7017442', 'n_tokens_mistral': 10116, 'n_tokens_neox': 8636, 'n_words': 2191}