summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MdePkg/Library/BaseLib/X64/GccInlinePriv.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/MdePkg/Library/BaseLib/X64/GccInlinePriv.c b/MdePkg/Library/BaseLib/X64/GccInlinePriv.c
index e4920f2116..244bd62ee6 100644
--- a/MdePkg/Library/BaseLib/X64/GccInlinePriv.c
+++ b/MdePkg/Library/BaseLib/X64/GccInlinePriv.c
@@ -80,7 +80,7 @@ AsmReadMsr64 (
}
FilterAfterMsrRead (Index, &Value);
- return (((UINT64)HighData) << 32) | LowData;
+ return Value;
}
/**
@@ -111,11 +111,10 @@ AsmWriteMsr64 (
UINT32 HighData;
BOOLEAN Flag;
- LowData = (UINT32)(Value);
- HighData = (UINT32)(Value >> 32);
-
Flag = FilterBeforeMsrWrite (Index, &Value);
if (Flag) {
+ LowData = (UINT32)(Value);
+ HighData = (UINT32)(Value >> 32);
__asm__ __volatile__ (
"wrmsr"
: