public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] MdePkg: Fix AsmReadSs() with GCC toolchain
@ 2021-05-24  4:50 Satoshi Tanda
  2021-05-25 12:16 ` [edk2-devel] " Laszlo Ersek
  0 siblings, 1 reply; 7+ messages in thread
From: Satoshi Tanda @ 2021-05-24  4:50 UTC (permalink / raw)
  To: devel; +Cc: lersek, Satoshi Tanda

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@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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-06-04  3:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-24  4:50 [PATCH] MdePkg: Fix AsmReadSs() with GCC toolchain Satoshi Tanda
2021-05-25 12:16 ` [edk2-devel] " Laszlo Ersek
2021-05-25 14:28   ` Satoshi Tanda
2021-05-25 16:24     ` Laszlo Ersek
2021-06-04  0:24       ` Satoshi Tanda
2021-06-04  3:03         ` 回复: " gaoliming
2021-06-04  3:28           ` [edk2-devel] " Satoshi Tanda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox