summaryrefslogtreecommitdiff
path: root/MdePkg/Library
diff options
context:
space:
mode:
authorSatoshi Tanda <tanda.sat@gmail.com>2021-05-24 12:50:18 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-06-04 03:24:04 +0000
commitc410ad4da4b7785170d3d42a3ba190c2caac6feb (patch)
treef20b16b6df3aeee592c2adb4fc6397a71a9fa70a /MdePkg/Library
parent75e9154f818a58ffc3a28db9f8c97279e723f02d (diff)
downloadedk2-c410ad4da4b7785170d3d42a3ba190c2caac6feb.zip
edk2-c410ad4da4b7785170d3d42a3ba190c2caac6feb.tar.gz
edk2-c410ad4da4b7785170d3d42a3ba190c2caac6feb.tar.bz2
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 <tanda.sat@gmail.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'MdePkg/Library')
-rw-r--r--MdePkg/Library/BaseLib/Ia32/GccInlinePriv.c2
-rw-r--r--MdePkg/Library/BaseLib/X64/GccInlinePriv.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/MdePkg/Library/BaseLib/Ia32/GccInlinePriv.c b/MdePkg/Library/BaseLib/Ia32/GccInlinePriv.c
index 40e8c08..b8b5b85 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 244bd62..c3feb9f 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)
);