From 2fbaaa96d11ad61a9133df1728e3fe965d1457a5 Mon Sep 17 00:00:00 2001 From: Dongyan Qian Date: Tue, 25 Jun 2024 11:09:01 +0800 Subject: 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 Signed-off-by: Dongyan Qian Co-authored-by: Chao Li --- MdePkg/Library/BaseLib/LoongArch64/Cpucfg.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit