Commit 346dc929 authored by Qi Hu's avatar Qi Hu Committed by Huacai Chen

LoongArch: Fix the write_fcsr() macro

The "write_fcsr()" macro uses wrong the positions for val and dest in
asm. Fix it!
Reported-by: default avatarMiao HAO <haomiao19@mails.ucas.ac.cn>
Signed-off-by: default avatarQi Hu <huqi@loongson.cn>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent ddc1729b
...@@ -1496,7 +1496,7 @@ __BUILD_CSR_OP(tlbidx) ...@@ -1496,7 +1496,7 @@ __BUILD_CSR_OP(tlbidx)
#define write_fcsr(dest, val) \ #define write_fcsr(dest, val) \
do { \ do { \
__asm__ __volatile__( \ __asm__ __volatile__( \
" movgr2fcsr %0, "__stringify(dest)" \n" \ " movgr2fcsr "__stringify(dest)", %0 \n" \
: : "r" (val)); \ : : "r" (val)); \
} while (0) } while (0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment