]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
MIPS: Fix little endian microMIPS MSA encodings
authorJames Hogan <james.hogan@imgtec.com>
Fri, 20 May 2016 22:28:39 +0000 (23:28 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Sat, 28 May 2016 10:35:10 +0000 (12:35 +0200)
commit6e1b29c3094688b6803fa1f9d5da676a7d0fbff9
treed9ada6e2b07871ea654c8f103c48efc752c83b3d
parent1c48a177351ba8cbf6871f035496fce0e11d8fa3
MIPS: Fix little endian microMIPS MSA encodings

When the toolchain doesn't support MSA we encode MSA instructions
explicitly in assembly. Unfortunately we use .word for both MIPS and
microMIPS encodings which is wrong, since 32-bit microMIPS instructions
are made up from a pair of halfwords.

- The most significant halfword always comes first, so for little endian
  builds the halves will be emitted in the wrong order.

- 32-bit alignment isn't guaranteed, so the assembler may insert a
  16-bit nop instruction to pad the instruction stream to a 32-bit
  boundary.

Use the new instruction encoding macros to encode microMIPS MSA
instructions correctly.

Fixes: d96cc3d1ec5d ("MIPS: Add microMIPS MSA support.")
Signed-off-by: James 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/13312/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/asmmacro.h
arch/mips/include/asm/msa.h