Commit 3478ba99 authored by James Hogan's avatar James Hogan

MIPS: XPA: Allow use of $0 (zero) to MTHC0

Tweak __writex_32bit_c0_register() to allow the compiler to use $0 (the
zero register) as an input to the mthc0 instruction.
Signed-off-by: default avatarJames Hogan <jhogan@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/17774/
parent 8e4789d2
......@@ -1537,10 +1537,10 @@ do { \
" .set push \n" \
" .set mips32r2 \n" \
_ASM_SET_XPA \
" mthc0 %0, $%1 \n" \
" mthc0 %z0, $%1 \n" \
" .set pop \n" \
: \
: "r" (value), "i" (register)); \
: "Jr" (value), "i" (register)); \
} while (0)
#define read_c0_index() __read_32bit_c0_register($0, 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