]> git.karo-electronics.de Git - karo-tx-linux.git/commit
MIPS: Sort out mm_isBranchInstr.
authorRalf Baechle <ralf@linux-mips.org>
Tue, 29 Apr 2014 13:21:24 +0000 (15:21 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 12 May 2014 23:24:25 +0000 (01:24 +0200)
commit53edd926cd3eeb57a5bd1df59f482645ace5764b
tree0800534a9560ae6f7afb9bf111f99d099f8f26c0
parent41f39b2e9f10c08d43e0ba5ab83e5e5defdf340c
MIPS: Sort out mm_isBranchInstr.

mm_isBranchInstr() did reside in the math emu code even though it logically
is separate and also is used outside the math emu code.  In addition GCC 4.9.0
leaves the following unnnecessarily bloated function body for a non-microMIPS
configuration:

<mm_isBranchInstr>:
    105c:       afa50004        sw      a1,4(sp)
    1060:       afa60008        sw      a2,8(sp)
    1064:       afa7000c        sw      a3,12(sp)
    1068:       03e00008        jr      ra
    106c:       00001021        move    v0,zero

which stores arguments that are never going to be used on the stack frame.

Move mm_isBranchInstr() from cp1emu.c to branch.c, then split mm_isBranchInstr()
into a __mm_isBranchInstr() core and a mm_isBranchInstr() wrapper inline function
which only invokes __mm_isBranchInstr() on microMIPS configurations.

This shaves off 112 bytes off the kernel and improves code flow a bit.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/branch.h
arch/mips/kernel/branch.c
arch/mips/math-emu/cp1emu.c