summaryrefslogtreecommitdiff
path: root/arch/openrisc
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2017-06-02 18:35:01 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-24 05:11:17 (GMT)
commit6b706cbb16e9e794a2a37e57ae4951b8232270b4 (patch)
tree98f982c65606eb394535f57273397695db593b88 /arch/openrisc
parent22921a9e232a1187873c0127d408767b6bdc558e (diff)
downloadlinux-6b706cbb16e9e794a2a37e57ae4951b8232270b4.tar.xz
MIPS: Fix bnezc/jialc return address calculation
commit 1a73d9310e093fc3adffba4d0a67b9fab2ee3f63 upstream. The code handling the pop76 opcode (ie. bnezc & jialc instructions) in __compute_return_epc_for_insn() needs to set the value of $31 in the jialc case, which is encoded with rs = 0. However its check to differentiate bnezc (rs != 0) from jialc (rs = 0) was unfortunately backwards, meaning that if we emulate a bnezc instruction we clobber $31 & if we emulate a jialc instruction it actually behaves like a jic instruction. Fix this by inverting the check of rs to match the way the instructions are actually encoded. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Fixes: 28d6f93d201d ("MIPS: Emulate the new MIPS R6 BNEZC and JIALC instructions") Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16178/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/openrisc')
0 files changed, 0 insertions, 0 deletions