aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils/cpuid
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2021-01-04 18:59:43 -0500
committerJack Lloyd <[email protected]>2021-04-16 20:08:37 -0400
commit32bf9784bd6ee29cb3ffa173f0a734e9edce2dac (patch)
tree05815c2441c0f6964fa6fe587330fda8ed86b617 /src/lib/utils/cpuid
parent04fc4b81f0ef44bcfe3a64ffd45bb61f0a92b60d (diff)
Make get_byte take a compile-time constant index
Add get_byte_var for the few cases that need a variable index
Diffstat (limited to 'src/lib/utils/cpuid')
-rw-r--r--src/lib/utils/cpuid/cpuid_x86.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/utils/cpuid/cpuid_x86.cpp b/src/lib/utils/cpuid/cpuid_x86.cpp
index fb0c2fbcd..88c8a9d8f 100644
--- a/src/lib/utils/cpuid/cpuid_x86.cpp
+++ b/src/lib/utils/cpuid/cpuid_x86.cpp
@@ -124,13 +124,13 @@ uint64_t CPUID::CPUID_Data::detect_cpu_features(size_t* cache_line_size)
if(is_intel)
{
// Intel cache line size is in cpuid(1) output
- *cache_line_size = 8 * get_byte(2, cpuid[1]);
+ *cache_line_size = 8 * get_byte<2>(cpuid[1]);
}
else if(is_amd)
{
// AMD puts it in vendor zone
invoke_cpuid(0x80000005, cpuid);
- *cache_line_size = get_byte(3, cpuid[2]);
+ *cache_line_size = get_byte<3>(cpuid[2]);
}
if(max_supported_sublevel >= 7)