aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2014-07-11 11:44:33 -0400
committerRalf Baechle <ralf@linux-mips.org>2014-08-01 18:06:44 -0400
commit70dff4d90aab40326d1d06a331e2b07eae99d067 (patch)
tree66a5f64bd6981b5ce08c5eeb67271438a2583cbe /arch/mips/include
parent732c0c3c70869af53654db2b56dffdd8d4df5211 (diff)
MIPS: fix read_msa_* & write_msa_* functions on non-MSA toolchains
Commit d96cc3d1ec5d "MIPS: Add microMIPS MSA support." attempted to use the value of a macro within an inline asm statement but instead emitted a comment leading to the cfcmsa & ctcmsa instructions being omitted. Fix that by passing CFC_MSA_INSN & CTC_MSA_INSN as arguments to the asm statements. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/7305/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include')
-rw-r--r--arch/mips/include/asm/msa.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/mips/include/asm/msa.h b/arch/mips/include/asm/msa.h
index fe25a17bc783..af5638b12c75 100644
--- a/arch/mips/include/asm/msa.h
+++ b/arch/mips/include/asm/msa.h
@@ -115,10 +115,10 @@ static inline unsigned int read_msa_##name(void) \
115 " .set push\n" \ 115 " .set push\n" \
116 " .set noat\n" \ 116 " .set noat\n" \
117 " .insn\n" \ 117 " .insn\n" \
118 " .word #CFC_MSA_INSN | (" #cs " << 11)\n" \ 118 " .word %1 | (" #cs " << 11)\n" \
119 " move %0, $1\n" \ 119 " move %0, $1\n" \
120 " .set pop\n" \ 120 " .set pop\n" \
121 : "=r"(reg)); \ 121 : "=r"(reg) : "i"(CFC_MSA_INSN)); \
122 return reg; \ 122 return reg; \
123} \ 123} \
124 \ 124 \
@@ -129,9 +129,9 @@ static inline void write_msa_##name(unsigned int val) \
129 " .set noat\n" \ 129 " .set noat\n" \
130 " move $1, %0\n" \ 130 " move $1, %0\n" \
131 " .insn\n" \ 131 " .insn\n" \
132 " .word #CTC_MSA_INSN | (" #cs " << 6)\n" \ 132 " .word %1 | (" #cs " << 6)\n" \
133 " .set pop\n" \ 133 " .set pop\n" \
134 : : "r"(val)); \ 134 : : "r"(val), "i"(CTC_MSA_INSN)); \
135} 135}
136 136
137#endif /* !TOOLCHAIN_SUPPORTS_MSA */ 137#endif /* !TOOLCHAIN_SUPPORTS_MSA */