From f4ef1dc9a0bb4932e4f52344f6e77df487c75b9f Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Mon, 15 Apr 2019 10:35:12 +1000 Subject: [PATCH] cpuid/x86: avoid coercing cpuid params from int to unsigned --- cpuid/x86.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cpuid/x86.cpp b/cpuid/x86.cpp index f59f919f..0b3a246d 100644 --- a/cpuid/x86.cpp +++ b/cpuid/x86.cpp @@ -20,7 +20,7 @@ using cruft::cpu::x86; /////////////////////////////////////////////////////////////////////////////// -auto cpuid (int query, int param = 0) +auto cpuid (u32 query, u32 param = 0) { struct { uint32_t a, b, c, d; @@ -64,9 +64,9 @@ x86::x86 () } { - const auto product0 = cpuid (0x8000'0002); - const auto product1 = cpuid (0x8000'0003); - const auto product2 = cpuid (0x8000'0004); + const auto product0 = cpuid (0x8000'0002u); + const auto product1 = cpuid (0x8000'0003u); + const auto product2 = cpuid (0x8000'0004u); memcpy (&product_name[0x00], &product0, sizeof (product0)); memcpy (&product_name[0x10], &product1, sizeof (product1));