Revert and ignore the compiler warning

This commit is contained in:
Alex 2022-10-27 03:37:35 +03:00
parent 33f95cb427
commit 55f63d26fa
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

@ -14,6 +14,14 @@ NewLock(APICLock);
using namespace CPU::x64; using namespace CPU::x64;
/*
In constructor APIC::APIC::APIC(int):
warning: left shift count >= width of type
| APICBaseAddress = BaseStruct.ApicBaseLo << 12u | BaseStruct.ApicBaseHi << 32u;
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
*/
#pragma GCC diagnostic ignored "-Wshift-count-overflow"
namespace APIC namespace APIC
{ {
// headache // headache
@ -219,7 +227,7 @@ namespace APIC
{ {
SmartCriticalSection(APICLock); SmartCriticalSection(APICLock);
APIC_BASE BaseStruct = {.raw = rdmsr(MSR_APIC_BASE)}; APIC_BASE BaseStruct = {.raw = rdmsr(MSR_APIC_BASE)};
APICBaseAddress = BaseStruct.ApicBaseLo << 12u | (unsigned long)BaseStruct.ApicBaseHi << 32u; APICBaseAddress = BaseStruct.ApicBaseLo << 12u | BaseStruct.ApicBaseHi << 32u;
trace("APIC Address: %#lx", APICBaseAddress); trace("APIC Address: %#lx", APICBaseAddress);
uint32_t rcx; uint32_t rcx;