[PATCH RFC v2 12/70] MIPS: asm: asmmacro: Replace add instructions with "addui"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The use of "add" instruction for immediate operations can result to
build failures for MIPS R6. This is because, the 'add' is a macro in
binutils and depending on the size of the immediate it can expand to
an 'addi' instruction which has been removed from MIPS R6.
Thus, we will be using the 'addu' macro instead, which also
accepts immediate operands.

Link: http://www.linux-mips.org/archives/linux-mips/2015-01/msg00121.html
Cc: Maciej W. Rozycki <macro@xxxxxxxxxxxxxx>
Signed-off-by: Markos Chandras <markos.chandras@xxxxxxxxxx>
---
 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..42b90c9fd756 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
+	addu	$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
+	addu	$1, \base, \off
 	.word	STD_MSA_INSN | (\wd << 6)
 	.set	pop
 	.endm
-- 
2.2.1





[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux