Skip to content

Commit 5b4f5c1

Browse files
committed
Cosmetic changes - clearer comments and error messages
1 parent 011e3ed commit 5b4f5c1

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

autoAdjust.hpp

+7-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
#include <unistd.h>
99
#endif // _WIN32
1010

11-
int32_t get_masked(int32_t val, int32_t h, int32_t l)
11+
// Mask bits between h and l and return the value
12+
// This enables us to put in values exactly like in the manual
13+
// For example EBX[31:22] is get_masked(cpu_info[1], 31, 22)
14+
inline int32_t get_masked(int32_t val, int32_t h, int32_t l)
1215
{
1316
val &= (0x7FFFFFFF >> (31-(h-l))) << l;
1417
return val >> l;
@@ -34,15 +37,15 @@ class autoAdjust
3437

3538
if(L3KB_size < 1024 || L3KB_size > 102400)
3639
{
37-
printer::inst()->print_msg(L0, "Autoconf failed: L3 size sanity check failed %u.", L3KB_size);
40+
printer::inst()->print_msg(L0, "Autoconf failed: L3 size sanity check failed - %u KB.", L3KB_size);
3841
return;
3942
}
4043

41-
printer::inst()->print_msg(L0, "Autoconf L3 size detected at %u.", L3KB_size);
44+
printer::inst()->print_msg(L0, "Autoconf L3 size detected at %u KB.", L3KB_size);
4245

4346
detectCPUConf();
4447

45-
printer::inst()->print_msg(L0, "Autoconf cores detected at %u on %s.", corecnt,
48+
printer::inst()->print_msg(L0, "Autoconf core count detected as %u on %s.", corecnt,
4649
linux_layout ? "Linux" : "Windows");
4750

4851
printer::inst()->print_str("\n**************** Copy&Paste ****************\n\n");

0 commit comments

Comments
 (0)