summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongyan Qian <qiandongyan@loongson.cn>2024-06-25 11:09:01 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-06-26 00:52:39 +0000
commit2fbaaa96d11ad61a9133df1728e3fe965d1457a5 (patch)
tree777b8026108826bb81078f8b8c486dbeb0940d97
parent5db0091418c8ed6a62178469e8ffb3dacaab13ee (diff)
downloadedk2-2fbaaa96d11ad61a9133df1728e3fe965d1457a5.zip
edk2-2fbaaa96d11ad61a9133df1728e3fe965d1457a5.tar.gz
edk2-2fbaaa96d11ad61a9133df1728e3fe965d1457a5.tar.bz2
MdePkg/BaseLib: Fix an instruction write width error in LoongArch64
Cpucfg fetch is a 32-bit register, and AsmCpucfg's function declaration is a 32-bit address storage operation in BaseLib.h, So, fix it by replacing stptr.d with stptr.w instrcution. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4797 Cc: Chao Li <lichao@loongson.cn> Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn> Co-authored-by: Chao Li <lichao@loongson.cn>
-rw-r--r--MdePkg/Library/BaseLib/LoongArch64/Cpucfg.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/MdePkg/Library/BaseLib/LoongArch64/Cpucfg.S b/MdePkg/Library/BaseLib/LoongArch64/Cpucfg.S
index 8b3f842..0240213 100644
--- a/MdePkg/Library/BaseLib/LoongArch64/Cpucfg.S
+++ b/MdePkg/Library/BaseLib/LoongArch64/Cpucfg.S
@@ -20,7 +20,7 @@ ASM_GLOBAL ASM_PFX(AsmCpucfg)
ASM_PFX(AsmCpucfg):
cpucfg $t0, $a0
- stptr.d $t0, $a1, 0
+ stptr.w $t0, $a1, 0
jirl $zero, $ra, 0
.end