From: "Satoshi Tanda" <tanda.sat@gmail.com>
To: devel@edk2.groups.io
Cc: lersek@redhat.com, Satoshi Tanda <tanda.sat@gmail.com>
Subject: [PATCH] MdePkg: Fix AsmReadSs() with GCC toolchain
Date: Sun, 23 May 2021 21:50:18 -0700 [thread overview]
Message-ID: <d014090344f4822b57e806cc8d6a27bd5233429d.1621829775.git.tanda.sat@gmail.com> (raw)
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
next reply other threads:[~2021-05-24 4:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-24 4:50 Satoshi Tanda [this message]
2021-05-25 12:16 ` [edk2-devel] [PATCH] MdePkg: Fix AsmReadSs() with GCC toolchain 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d014090344f4822b57e806cc8d6a27bd5233429d.1621829775.git.tanda.sat@gmail.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox