summaryrefslogtreecommitdiffstats
path: root/arch/mips/lib
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2016-05-16 10:52:10 +0100
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2016-05-21 01:36:39 +0200
commit9f8ac82452d8bb5eccc38a0c3c0a8f82e1774452 (patch)
tree2cff6d80395b13038d1c813955d17d041c1c462d /arch/mips/lib
parent400df3099896bdd43dd72dbb5d3930cf573d14f0 (diff)
downloadblackbird-obmc-uboot-9f8ac82452d8bb5eccc38a0c3c0a8f82e1774452.tar.gz
blackbird-obmc-uboot-9f8ac82452d8bb5eccc38a0c3c0a8f82e1774452.zip
MIPS: Use unchecked immediate addition/subtraction
In MIPS assembly there have historically been 2 variants of immediate addition - the standard "addi" which traps if an overflow occurs, and the unchecked "addiu" which does not trap on overflow. In release 6 of the MIPS architecture the trapping variants of immediate addition & subtraction have been removed. In preparation for supporting MIPSr6, stop using the trapping instructions from assembly & switch to their unchecked variants. Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Diffstat (limited to 'arch/mips/lib')
-rw-r--r--arch/mips/lib/cache_init.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/lib/cache_init.S b/arch/mips/lib/cache_init.S
index 14cc2c49fd..08b7c3af52 100644
--- a/arch/mips/lib/cache_init.S
+++ b/arch/mips/lib/cache_init.S
@@ -64,7 +64,7 @@
/* detect associativity */
srl \sz, $1, \off + MIPS_CONF1_DA_SHF - MIPS_CONF1_DA_SHF
andi \sz, \sz, (MIPS_CONF1_DA >> MIPS_CONF1_DA_SHF)
- addi \sz, \sz, 1
+ addiu \sz, \sz, 1
/* sz *= line_sz */
mul \sz, \sz, \line_sz
OpenPOWER on IntegriCloud