Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1614636
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3.16 24/26] MIPS: assume at as source/dest of MSA copy/insert instructions |
| Date | 2017-04-02 05:20 +0200 |
| Message-ID | <trEdA-3ia-19@gated-at.bofh.it> (permalink) |
| References | <trEdz-3ia-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
3.16.43-rc2 review patch. If anyone has any objections, please let me know.
------------------
From: Paul Burton <paul.burton@imgtec.com>
commit f23ce3883a30743a5b779dc6fb90ca8620688a23 upstream.
Assuming at ($1) as the source or destination register of copy or
insert instructions:
- Simplifies the macros providing those instructions for toolchains
without MSA support.
- Avoids an unnecessary move instruction when at is used as the source
or destination register anyway.
- Is sufficient for the uses to be introduced in the kernel by a
subsequent patch.
Note that due to a patch ordering snafu on my part this also fixes the
currently broken build with MSA support enabled. The build has been
broken since commit c9017757c532 "MIPS: init upper 64b of vector
registers when MSA is first used", which this patch should have
preceeded.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9161/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
arch/mips/include/asm/asmmacro.h | 28 ++++++++++++----------------
1 file changed, 12 insertions(+), 16 deletions(-)
--- a/arch/mips/include/asm/asmmacro.h
+++ b/arch/mips/include/asm/asmmacro.h
@@ -225,35 +225,35 @@
.set pop
.endm
- .macro copy_u_w rd, ws, n
+ .macro copy_u_w ws, n
.set push
.set mips32r2
.set msa
- copy_u.w \rd, $w\ws[\n]
+ copy_u.w $1, $w\ws[\n]
.set pop
.endm
- .macro copy_u_d rd, ws, n
+ .macro copy_u_d ws, n
.set push
.set mips64r2
.set msa
- copy_u.d \rd, $w\ws[\n]
+ copy_u.d $1, $w\ws[\n]
.set pop
.endm
- .macro insert_w wd, n, rs
+ .macro insert_w wd, n
.set push
.set mips32r2
.set msa
- insert.w $w\wd[\n], \rs
+ insert.w $w\wd[\n], $1
.set pop
.endm
- .macro insert_d wd, n, rs
+ .macro insert_d wd, n
.set push
.set mips64r2
.set msa
- insert.d $w\wd[\n], \rs
+ insert.d $w\wd[\n], $1
.set pop
.endm
#else
@@ -318,40 +318,36 @@
.set pop
.endm
- .macro copy_u_w rd, ws, n
+ .macro copy_u_w ws, n
.set push
.set noat
SET_HARDFLOAT
.insn
.word COPY_UW_MSA_INSN | (\n << 16) | (\ws << 11)
- move \rd, $1
.set pop
.endm
- .macro copy_u_d rd, ws, n
+ .macro copy_u_d ws, n
.set push
.set noat
SET_HARDFLOAT
.insn
.word COPY_UD_MSA_INSN | (\n << 16) | (\ws << 11)
- move \rd, $1
.set pop
.endm
- .macro insert_w wd, n, rs
+ .macro insert_w wd, n
.set push
.set noat
SET_HARDFLOAT
- move $1, \rs
.word INSERT_W_MSA_INSN | (\n << 16) | (\wd << 6)
.set pop
.endm
- .macro insert_d wd, n, rs
+ .macro insert_d wd, n
.set push
.set noat
SET_HARDFLOAT
- move $1, \rs
.word INSERT_D_MSA_INSN | (\n << 16) | (\wd << 6)
.set pop
.endm
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 3.16 00/19] 3.16.43-rc1 review Ben Hutchings <ben@decadent.org.uk> - 2017-04-01 15:30 +0200
[PATCH 3.16 07/19] MIPS: Fix build with binutils 2.24.51+ Ben Hutchings <ben@decadent.org.uk> - 2017-04-01 15:30 +0200
[PATCH 3.16 09/19] crypto: improve gcc optimization flags for serpent and wp512 Ben Hutchings <ben@decadent.org.uk> - 2017-04-01 15:30 +0200
Re: [PATCH 3.16 00/19] 3.16.43-rc1 review Guenter Roeck <linux@roeck-us.net> - 2017-04-01 19:50 +0200
Re: [PATCH 3.16 00/19] 3.16.43-rc1 review Ben Hutchings <ben@decadent.org.uk> - 2017-04-02 00:50 +0200
Re: [PATCH 3.16 00/19] 3.16.43-rc1 review Guenter Roeck <linux@roeck-us.net> - 2017-04-02 04:30 +0200
Re: [PATCH 3.16 00/19] 3.16.43-rc1 review Ben Hutchings <ben@decadent.org.uk> - 2017-04-02 04:50 +0200
[PATCH 3.16 00/26] 3.16.43-rc2 review Ben Hutchings <ben@decadent.org.uk> - 2017-04-02 05:20 +0200
[PATCH 3.16 23/26] MIPS: Push .set mips64r* into the functions needing it Ben Hutchings <ben@decadent.org.uk> - 2017-04-02 05:20 +0200
[PATCH 3.16 24/26] MIPS: assume at as source/dest of MSA copy/insert instructions Ben Hutchings <ben@decadent.org.uk> - 2017-04-02 05:20 +0200
[PATCH 3.16 26/26] MIPS: wrap cfcmsa & ctcmsa accesses for toolchains with MSA support Ben Hutchings <ben@decadent.org.uk> - 2017-04-02 05:20 +0200
csiph-web