diff --git a/MdePkg/Library/BaseLib/Ia32/GccInline.c b/MdePkg/Library/BaseLib/Ia32/GccInline.c index e6a9e171f4..80db16c28b 100644 --- a/MdePkg/Library/BaseLib/Ia32/GccInline.c +++ b/MdePkg/Library/BaseLib/Ia32/GccInline.c @@ -1082,7 +1082,7 @@ InternalX86ReadIdtr ( ) { __asm__ __volatile__ ( - "sldt %0" + "sidt %0" : "=m" (*Idtr) ); } diff --git a/MdePkg/Library/BaseLib/X64/GccInline.c b/MdePkg/Library/BaseLib/X64/GccInline.c index 8be2bef121..6a4b5d5c45 100644 --- a/MdePkg/Library/BaseLib/X64/GccInline.c +++ b/MdePkg/Library/BaseLib/X64/GccInline.c @@ -1092,7 +1092,7 @@ InternalX86ReadIdtr ( ) { __asm__ __volatile__ ( - "sldt %0" + "sidt %0" : "=m" (*Idtr) ); }