Commit 2bd7bc25 authored by Markos Chandras's avatar Markos Chandras Committed by Ralf Baechle

MIPS: asmmacro: Ensure 64-bit FP registers are used with MSA

This silences warnings like the following one when building with the
latest binutils:

arch/mips/kernel/genex.S: Assembler messages:
arch/mips/kernel/genex.S:438: Warning: the `msa' extension requires 64-bit FPRs

[ralf@linux-mips.org: Markos says binutils 2.25 and some 2.24 snapshots
are affected.]
Signed-off-by: default avatarMarkos Chandras <markos.chandras@imgtec.com>
Reviewed-by: default avatarJames Hogan <james.hogan@imgtec.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9745/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 590605c6
...@@ -211,9 +211,13 @@ ...@@ -211,9 +211,13 @@
.endm .endm
#ifdef TOOLCHAIN_SUPPORTS_MSA #ifdef TOOLCHAIN_SUPPORTS_MSA
/* preprocessor replaces the fp in ".set fp=64" with $30 otherwise */
#undef fp
.macro _cfcmsa rd, cs .macro _cfcmsa rd, cs
.set push .set push
.set mips32r2 .set mips32r2
.set fp=64
.set msa .set msa
cfcmsa \rd, $\cs cfcmsa \rd, $\cs
.set pop .set pop
...@@ -222,6 +226,7 @@ ...@@ -222,6 +226,7 @@
.macro _ctcmsa cd, rs .macro _ctcmsa cd, rs
.set push .set push
.set mips32r2 .set mips32r2
.set fp=64
.set msa .set msa
ctcmsa $\cd, \rs ctcmsa $\cd, \rs
.set pop .set pop
...@@ -230,6 +235,7 @@ ...@@ -230,6 +235,7 @@
.macro ld_d wd, off, base .macro ld_d wd, off, base
.set push .set push
.set mips32r2 .set mips32r2
.set fp=64
.set msa .set msa
ld.d $w\wd, \off(\base) ld.d $w\wd, \off(\base)
.set pop .set pop
...@@ -238,6 +244,7 @@ ...@@ -238,6 +244,7 @@
.macro st_d wd, off, base .macro st_d wd, off, base
.set push .set push
.set mips32r2 .set mips32r2
.set fp=64
.set msa .set msa
st.d $w\wd, \off(\base) st.d $w\wd, \off(\base)
.set pop .set pop
...@@ -246,6 +253,7 @@ ...@@ -246,6 +253,7 @@
.macro copy_u_w ws, n .macro copy_u_w ws, n
.set push .set push
.set mips32r2 .set mips32r2
.set fp=64
.set msa .set msa
copy_u.w $1, $w\ws[\n] copy_u.w $1, $w\ws[\n]
.set pop .set pop
...@@ -254,6 +262,7 @@ ...@@ -254,6 +262,7 @@
.macro copy_u_d ws, n .macro copy_u_d ws, n
.set push .set push
.set mips64r2 .set mips64r2
.set fp=64
.set msa .set msa
copy_u.d $1, $w\ws[\n] copy_u.d $1, $w\ws[\n]
.set pop .set pop
...@@ -262,6 +271,7 @@ ...@@ -262,6 +271,7 @@
.macro insert_w wd, n .macro insert_w wd, n
.set push .set push
.set mips32r2 .set mips32r2
.set fp=64
.set msa .set msa
insert.w $w\wd[\n], $1 insert.w $w\wd[\n], $1
.set pop .set pop
...@@ -270,6 +280,7 @@ ...@@ -270,6 +280,7 @@
.macro insert_d wd, n .macro insert_d wd, n
.set push .set push
.set mips64r2 .set mips64r2
.set fp=64
.set msa .set msa
insert.d $w\wd[\n], $1 insert.d $w\wd[\n], $1
.set pop .set pop
......
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