diff options
author | Dongyan Qian <qiandongyan@loongson.cn> | 2024-06-25 11:09:01 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-06-26 00:52:39 +0000 |
commit | 2fbaaa96d11ad61a9133df1728e3fe965d1457a5 (patch) | |
tree | 777b8026108826bb81078f8b8c486dbeb0940d97 | |
parent | 5db0091418c8ed6a62178469e8ffb3dacaab13ee (diff) | |
download | edk2-2fbaaa96d11ad61a9133df1728e3fe965d1457a5.tar.gz |
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.S | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/MdePkg/Library/BaseLib/LoongArch64/Cpucfg.S b/MdePkg/Library/BaseLib/LoongArch64/Cpucfg.S index 8b3f842f9e..0240213705 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
|