The use of "add" instruction for immediate operations is wrong and
relies to gas being smart enough to notice that and replace it with
either addi or addui. However, MIPS R6 removed the addi instruction
so, fix this problem properly by using the correct instruction
directly.
Signed-off-by: Markos Chandras <redacted>
---
arch/mips/include/asm/asmmacro.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/mips/include/asm/asmmacro.h b/arch/mips/include/asm/asmmacro.h
index fe08084f5adb..55c07c40c199 100644
--- a/arch/mips/include/asm/asmmacro.h
+++ b/arch/mips/include/asm/asmmacro.h
@@ -304,7 +304,7 @@
.set push
.set noat
SET_HARDFLOAT
- add $1, \base, \off
+ addiu $1, \base, \off
.word LDD_MSA_INSN | (\wd << 6)
.set pop
.endm
@@ -313,7 +313,7 @@
.set push
.set noat
SET_HARDFLOAT
- add $1, \base, \off
+ addiu $1, \base, \off
.word STD_MSA_INSN | (\wd << 6)
.set pop
.endm
--
2.2.0