From c410ad4da4b7785170d3d42a3ba190c2caac6feb Mon Sep 17 00:00:00 2001 From: Satoshi Tanda Date: Mon, 24 May 2021 12:50:18 +0800 Subject: MdePkg/BaseLib: Fix AsmReadSs() with GCC toolchain REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3405 AsmReadSs() in Ia32/GccInlinePriv.c and X64/GccInlinePriv.c return the DS segment selector value instead of SS. Signed-off-by: Satoshi Tanda Reviewed-by: Liming Gao Reviewed-by: Laszlo Ersek --- MdePkg/Library/BaseLib/Ia32/GccInlinePriv.c | 2 +- MdePkg/Library/BaseLib/X64/GccInlinePriv.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MdePkg/Library/BaseLib/Ia32/GccInlinePriv.c b/MdePkg/Library/BaseLib/Ia32/GccInlinePriv.c index 40e8c08beb..b8b5b85e73 100644 --- a/MdePkg/Library/BaseLib/Ia32/GccInlinePriv.c +++ b/MdePkg/Library/BaseLib/Ia32/GccInlinePriv.c @@ -902,7 +902,7 @@ AsmReadSs ( UINT16 Data; __asm__ __volatile__ ( - "mov %%ds, %0" + "mov %%ss, %0" :"=a" (Data) ); diff --git a/MdePkg/Library/BaseLib/X64/GccInlinePriv.c b/MdePkg/Library/BaseLib/X64/GccInlinePriv.c index 244bd62ee6..c3feb9f922 100644 --- a/MdePkg/Library/BaseLib/X64/GccInlinePriv.c +++ b/MdePkg/Library/BaseLib/X64/GccInlinePriv.c @@ -911,7 +911,7 @@ AsmReadSs ( UINT16 Data; __asm__ __volatile__ ( - "mov %%ds, %0" + "mov %%ss, %0" :"=a" (Data) ); -- cgit v1.2.3