Skip to content

Commit

Permalink
MIPS: XPA: Allow use of $0 (zero) to MTHC0
Browse files Browse the repository at this point in the history
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: James Hogan <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/17774/
  • Loading branch information
amalon committed Jan 22, 2018
1 parent 8e4789d commit 3478ba9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/mips/include/asm/mipsregs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3478ba9

Please sign in to comment.