[edk2-devel] [PATCH] MdePkg: Fix AsmReadSs() with GCC toolchain
Satoshi Tanda
tanda.sat at gmail.com
Mon May 24 04:50:18 UTC 2021
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3325
AsmReadSs() in Ia32/GccInlinePriv.c and X64/GccInlinePriv.c return the
DS segment selector value instead of SS.
Signed-off-by: Satoshi Tanda <tanda.sat at gmail.com>
---
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)
);
--
2.25.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#75541): https://edk2.groups.io/g/devel/message/75541
Mute This Topic: https://groups.io/mt/83062017/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list