]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: math-emu: Fix BC1EQZ and BC1NEZ condition handling
authorDouglas Leung <douglas.leung@imgtec.com>
Mon, 13 Mar 2017 15:36:37 +0000 (16:36 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 10 Apr 2017 09:56:09 +0000 (11:56 +0200)
commita140cdc66df4b4010bc538452d8dc7326bf78514
tree450bf68ee8607ddcfeb98a5a68601f931fd68ec3
parentef45f712d73e5c6479ffc73107ccb2c32af55795
MIPS: math-emu: Fix BC1EQZ and BC1NEZ condition handling

Correct the treatment of branching conditions for BC1EQZ and BC1NEZ
instructions in function isBranchInstr().

Previously, corresponding conditions were swapped, which in turn meant
that, for these two instructions, function isBranchInstr() returned
wrong value in its output parameter contpc.

This change is actually an extension of the fix done by the commit
d459d19855fe ("MIPS: math-emu: Fix BC1{EQ,NE}Z emulation"). That commit
dealt with a similar problem in function cop1Emulate(), while this
commit deals with condition handling in function isBranchInstr().
The code styles of changes in these two commits are kept as
consistent as possible.

Signed-off-by: Douglas Leung <douglas.leung@imgtec.com>
Signed-off-by: Miodrag Dinic <miodrag.dinic@imgtec.com>
Signed-off-by: Aleksandar Markovic <aleksandar.markovic@imgtec.com>
Reviewed-by: Paul Burton <paul.burton@imgtec.com>
Cc: james.hogan@imgtec.com
Cc: leonid.yegoshin@imgtec.com
Cc: petar.jovanovic@imgtec.com
Cc: goran.ferenc@imgtec.com
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/15489/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/math-emu/cp1emu.c