mirror of
https://github.com/anrieff/libcpuid
synced 2025-02-12 20:24:05 +00:00
Related to #91: Add detection of AMD APUs.
It is very simple detection - if the brand string contains " APU ", the _APU_ bit in amd_code_and_bits_t::bits is set. Simplify one other line as well.
This commit is contained in:
parent
b0cc93a253
commit
a196e8d1bf
1 changed files with 3 additions and 1 deletions
|
@ -61,6 +61,7 @@ enum _amd_bits_t {
|
|||
_X4 = LBIT( 13 ),
|
||||
_X6 = LBIT( 14 ),
|
||||
_FX = LBIT( 15 ),
|
||||
_APU_ = LBIT( 16 ),
|
||||
};
|
||||
typedef enum _amd_bits_t amd_bits_t;
|
||||
|
||||
|
@ -469,11 +470,12 @@ static struct amd_code_and_bits_t decode_amd_codename_part1(const char *bs)
|
|||
if (strstr(bs, "XP")) bits |= _XP_;
|
||||
if (strstr(bs, "XP-M")) bits |= _M_;
|
||||
if (strstr(bs, "(LV)")) bits |= _LV_;
|
||||
if (strstr(bs, " APU ")) bits |= _APU_;
|
||||
|
||||
if (match_pattern(bs, "C-##")) code = FUSION_C;
|
||||
if (match_pattern(bs, "E-###")) code = FUSION_E;
|
||||
if (match_pattern(bs, "Z-##")) code = FUSION_Z;
|
||||
if (match_pattern(bs, "E#-####") || match_pattern(bs, "A#-####")) code = FUSION_EA;
|
||||
if (match_pattern(bs, "[EA]#-####")) code = FUSION_EA;
|
||||
|
||||
result.code = code;
|
||||
result.bits = bits;
|
||||
|
|
Loading…
Add table
Reference in a new issue