23 May, 2014

1 commit

  • 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:

    :
    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 Baechle
     

21 May, 2014

2 commits


09 May, 2013

2 commits


08 Dec, 2011

1 commit

  • This patch refactors MIPS branch emulation code so as to allow skipping
    delay slot instruction in case of branch likely instructions when branch is
    not taken. This is useful for keeping the code common for use cases like
    kprobes where one would like to handle the branch instructions keeping the
    delay slot instuction also in picture for branch likely instructions. Also
    allow emulation when instruction to be decoded is not at pt_regs->cp0_epc
    as in case of kprobes where pt_regs->cp0_epc points to the breakpoint
    instruction.

    The patch also exports the function for modules.

    Signed-off-by: Maneesh Soni
    Signed-off-by: Victor Kamensky
    Cc: David Daney
    Cc: ananth@in.ibm.com
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/2913/
    Signed-off-by: Ralf Baechle

    Maneesh Soni
     

11 Oct, 2008

1 commit