projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
226da55
)
MIPS: asm: asmmacro: Replace "add" instructions with "addu"
author
Markos Chandras
<
[email protected]
>
Wed, 5 Nov 2014 14:17:52 +0000
(14:17 +0000)
committer
Markos Chandras
<
[email protected]
>
Tue, 17 Feb 2015 15:37:18 +0000
(15:37 +0000)
The "add" instruction is actually a macro in binutils and depending on
the size of the immediate it can expand to an "addi" instruction.
However, the "addi" instruction traps on overflows which is not
something we want on address calculation.
Link:
http://www.linux-mips.org/archives/linux-mips/2015-01/msg00121.html
Cc: Paul Burton <
[email protected]
>
Cc: Maciej W. Rozycki <
[email protected]
>
Cc: <
[email protected]
> # v3.15+
Signed-off-by: Markos Chandras <
[email protected]
>
arch/mips/include/asm/asmmacro.h
patch
|
blob
|
history
diff --git
a/arch/mips/include/asm/asmmacro.h
b/arch/mips/include/asm/asmmacro.h
index b6540cfcc97bb96744c4d57c0a8c570e8db14141..0af29ce84e0b9520612586fb8aceadec2abe9be9 100644
(file)
--- 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
+ add
u
$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
+ add
u
$1, \base, \off
.word STD_MSA_INSN | (\wd << 6)
.set pop
.endm