]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg/BaseLib: Fix AsmReadSs() with GCC toolchain
authorSatoshi Tanda <tanda.sat@gmail.com>
Mon, 24 May 2021 04:50:18 +0000 (12:50 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 4 Jun 2021 03:24:04 +0000 (03:24 +0000)
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 <tanda.sat@gmail.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
MdePkg/Library/BaseLib/Ia32/GccInlinePriv.c
MdePkg/Library/BaseLib/X64/GccInlinePriv.c

index 40e8c08beb31c1e944107e82e3866d6a16999e38..b8b5b85e7321524f65c013548125f2f2ab1e5032 100644 (file)
@@ -902,7 +902,7 @@ AsmReadSs (
   UINT16  Data;\r
 \r
   __asm__ __volatile__ (\r
-    "mov  %%ds, %0"\r
+    "mov  %%ss, %0"\r
     :"=a" (Data)\r
     );\r
 \r
index 244bd62ee67fbd79c0e393186593f514f76c7d17..c3feb9f9223544970f99c7db4ae1bd37c3f16346 100644 (file)
@@ -911,7 +911,7 @@ AsmReadSs (
   UINT16  Data;\r
 \r
   __asm__ __volatile__ (\r
-    "mov  %%ds, %0"\r
+    "mov  %%ss, %0"\r
     :"=a" (Data)\r
     );\r
 \r