Skip to content

Commit 346dc92

Browse files
specialpointcentralchenhuacai
authored andcommitted
LoongArch: Fix the write_fcsr() macro
The "write_fcsr()" macro uses wrong the positions for val and dest in asm. Fix it! Reported-by: Miao HAO <[email protected]> Signed-off-by: Qi Hu <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
1 parent ddc1729 commit 346dc92

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/loongarch/include/asm/loongarch.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1496,7 +1496,7 @@ __BUILD_CSR_OP(tlbidx)
14961496
#define write_fcsr(dest, val) \
14971497
do { \
14981498
__asm__ __volatile__( \
1499-
" movgr2fcsr %0, "__stringify(dest)" \n" \
1499+
" movgr2fcsr "__stringify(dest)", %0 \n" \
15001500
: : "r" (val)); \
15011501
} while (0)
15021502

0 commit comments

Comments
 (0)