cpuid/x86: minor type formatting

This commit is contained in:
Danny Robson 2024-02-21 14:53:24 +10:00
parent db4d75bb1c
commit 14c9a103ef

View File

@ -8,13 +8,13 @@
#include "x86.hpp" #include "x86.hpp"
#include "endian.hpp" #include "../std.hpp"
#include "view.hpp" #include "../endian.hpp"
#include "bitwise.hpp" #include "../view.hpp"
#include "../bitwise.hpp"
#include <fmt/ostream.h> #include <fmt/ostream.h>
#include <cstdint>
#include <ostream> #include <ostream>
using cruft::cpu::x86; using cruft::cpu::x86;
@ -23,15 +23,16 @@ using cruft::cpu::x86;
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
namespace { namespace {
struct cpuid_t { struct cpuid_t {
uint32_t a, b, c, d; u32 a, b, c, d;
}; };
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
cpuid_t cpuid (u32 query, u32 param = 0) static cpuid_t
cpuid (u32 query, u32 param = 0)
{ {
cpuid_t res; ::cpuid_t res;
asm ( asm (
"cpuid" "cpuid"