diff options
author | Paul Burton <paul.burton@imgtec.com> | 2015-01-30 07:09:32 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2015-03-27 14:42:44 -0400 |
commit | a3a49810c55e3489dfb5d72a9b2e41ab1db9ffb9 (patch) | |
tree | 195ad584ad9ab9c0b0abfe6e3394d05cf7245c4b | |
parent | f23ce3883a30743a5b779dc6fb90ca8620688a23 (diff) |
MIPS: remove MSA macro recursion
Recursive macros made the code more concise & worked great for the
case where the toolchain doesn't support MSA. However, with toolchains
which do support MSA they lead to build failures such as:
arch/mips/kernel/r4k_switch.S: Assembler messages:
arch/mips/kernel/r4k_switch.S:148: Error: invalid operands `insert.w $w(0+1)[2],$1'
arch/mips/kernel/r4k_switch.S:148: Error: invalid operands `insert.w $w(0+1)[3],$1'
arch/mips/kernel/r4k_switch.S:148: Error: invalid operands `insert.w $w((0+1)+1)[2],$1'
arch/mips/kernel/r4k_switch.S:148: Error: invalid operands `insert.w $w((0+1)+1)[3],$1'
...
Drop the recursion from msa_init_all_upper invoking the msa_init_upper
macro explicitly for each vector register.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9162/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/include/asm/asmmacro.h | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/arch/mips/include/asm/asmmacro.h b/arch/mips/include/asm/asmmacro.h index 91df136ddce9..73dec5c2084a 100644 --- a/arch/mips/include/asm/asmmacro.h +++ b/arch/mips/include/asm/asmmacro.h | |||
@@ -444,9 +444,6 @@ | |||
444 | insert_w \wd, 2 | 444 | insert_w \wd, 2 |
445 | insert_w \wd, 3 | 445 | insert_w \wd, 3 |
446 | #endif | 446 | #endif |
447 | .if 31-\wd | ||
448 | msa_init_upper (\wd+1) | ||
449 | .endif | ||
450 | .endm | 447 | .endm |
451 | 448 | ||
452 | .macro msa_init_all_upper | 449 | .macro msa_init_all_upper |
@@ -455,6 +452,37 @@ | |||
455 | SET_HARDFLOAT | 452 | SET_HARDFLOAT |
456 | not $1, zero | 453 | not $1, zero |
457 | msa_init_upper 0 | 454 | msa_init_upper 0 |
455 | msa_init_upper 1 | ||
456 | msa_init_upper 2 | ||
457 | msa_init_upper 3 | ||
458 | msa_init_upper 4 | ||
459 | msa_init_upper 5 | ||
460 | msa_init_upper 6 | ||
461 | msa_init_upper 7 | ||
462 | msa_init_upper 8 | ||
463 | msa_init_upper 9 | ||
464 | msa_init_upper 10 | ||
465 | msa_init_upper 11 | ||
466 | msa_init_upper 12 | ||
467 | msa_init_upper 13 | ||
468 | msa_init_upper 14 | ||
469 | msa_init_upper 15 | ||
470 | msa_init_upper 16 | ||
471 | msa_init_upper 17 | ||
472 | msa_init_upper 18 | ||
473 | msa_init_upper 19 | ||
474 | msa_init_upper 20 | ||
475 | msa_init_upper 21 | ||
476 | msa_init_upper 22 | ||
477 | msa_init_upper 23 | ||
478 | msa_init_upper 24 | ||
479 | msa_init_upper 25 | ||
480 | msa_init_upper 26 | ||
481 | msa_init_upper 27 | ||
482 | msa_init_upper 28 | ||
483 | msa_init_upper 29 | ||
484 | msa_init_upper 30 | ||
485 | msa_init_upper 31 | ||
458 | .set pop | 486 | .set pop |
459 | .endm | 487 | .endm |
460 | 488 | ||