kernel-ark/arch/mips/math-emu
Paul Burton ab4a92e667 MIPS: math-emu: Fix jalr emulation when rd == $0
When emulating a jalr instruction with rd == $0, the code in
isBranchInstr was incorrectly writing to GPR $0 which should actually
always remain zeroed. This would lead to any further instructions
emulated which use $0 operating on a bogus value until the task is next
context switched, at which point the value of $0 in the task context
would be restored to the correct zero by a store in SAVE_SOME. Fix this
by not writing to rd if it is $0.

Fixes: 102cedc32a ("MIPS: microMIPS: Floating point support.")
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Maciej W. Rozycki <macro@imgtec.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: stable <stable@vger.kernel.org> # v3.10
Patchwork: https://patchwork.linux-mips.org/patch/13160/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2016-05-13 14:02:24 +02:00
..
cp1emu.c MIPS: math-emu: Fix jalr emulation when rd == $0 2016-05-13 14:02:24 +02:00
dp_2008class.c MIPS: math-emu: Add support for the MIPS R6 CLASS FPU instruction 2015-09-03 12:08:14 +02:00
dp_add.c MIPS: math-emu: Reinstate sNaN quieting handlers 2015-04-08 01:09:31 +02:00
dp_cmp.c MIPS: math-emu: Remove redundant code from NaN comparison 2015-04-08 01:09:38 +02:00
dp_div.c MIPS: math-emu: Reinstate sNaN quieting handlers 2015-04-08 01:09:31 +02:00
dp_fint.c MIPS: math-emu: Cleanup coding style. 2014-05-23 15:11:15 +02:00
dp_flong.c MIPS: math-emu: Cleanup coding style. 2014-05-23 15:11:15 +02:00
dp_fmax.c MIPS: math-emu: Add support for the MIPS R6 MAX{, A} FPU instruction 2015-09-03 12:08:14 +02:00
dp_fmin.c MIPS: math-emu: Add support for the MIPS R6 MIN{, A} FPU instruction 2015-09-03 12:08:14 +02:00
dp_fsp.c MIPS: math-emu: Reinstate sNaN quieting handlers 2015-04-08 01:09:31 +02:00
dp_maddf.c MIPS: math-emu: Fix code indentation 2016-05-13 14:02:23 +02:00
dp_mul.c MIPS: math-emu: Fix code indentation 2016-05-13 14:02:23 +02:00
dp_simple.c MIPS: math-emu: Add IEEE Std 754-2008 ABS.fmt and NEG.fmt emulation 2016-01-20 00:39:20 +01:00
dp_sqrt.c MIPS: math-emu: Reinstate sNaN quieting handlers 2015-04-08 01:09:31 +02:00
dp_sub.c MIPS: math-emu: Reinstate sNaN quieting handlers 2015-04-08 01:09:31 +02:00
dp_tint.c MIPS: math-emu: Add IEEE Std 754-2008 NaN encoding emulation 2016-01-20 00:39:20 +01:00
dp_tlong.c MIPS: math-emu: Add IEEE Std 754-2008 NaN encoding emulation 2016-01-20 00:39:20 +01:00
dsemul.c MIPS: math-emu: dsemul: Remove an unused bit in ADDIUPC emulation 2016-05-13 14:01:55 +02:00
ieee754.c MIPS: math-emu: Add IEEE Std 754-2008 NaN encoding emulation 2016-01-20 00:39:20 +01:00
ieee754.h MIPS: math-emu: Add IEEE Std 754-2008 NaN encoding emulation 2016-01-20 00:39:20 +01:00
ieee754d.c MIPS: math-emu: Cleanup coding style. 2014-05-23 15:11:15 +02:00
ieee754dp.c MIPS: math-emu: Always propagate sNaN payload in quieting 2016-05-13 14:02:11 +02:00
ieee754dp.h MIPS: math-emu: Add z argument macros 2016-05-13 14:02:22 +02:00
ieee754int.h MIPS: math-emu: Add z argument macros 2016-05-13 14:02:22 +02:00
ieee754sp.c MIPS: math-emu: Fix m{add,sub}.s shifts 2016-05-13 14:02:23 +02:00
ieee754sp.h MIPS: math-emu: Fix m{add,sub}.s shifts 2016-05-13 14:02:23 +02:00
Makefile MIPS: math-emu: Unify ieee754dp_m{add,sub}f 2016-05-13 14:02:22 +02:00
me-debugfs.c MIPS: Declare mips_debugfs_dir in a header 2015-10-26 09:49:42 +01:00
sp_2008class.c MIPS: math-emu: Add support for the MIPS R6 CLASS FPU instruction 2015-09-03 12:08:14 +02:00
sp_add.c MIPS: math-emu: Fix m{add,sub}.s shifts 2016-05-13 14:02:23 +02:00
sp_cmp.c MIPS: math-emu: Remove redundant code from NaN comparison 2015-04-08 01:09:38 +02:00
sp_div.c MIPS: math-emu: Reinstate sNaN quieting handlers 2015-04-08 01:09:31 +02:00
sp_fdp.c MIPS: math-emu: Add IEEE Std 754-2008 NaN encoding emulation 2016-01-20 00:39:20 +01:00
sp_fint.c MIPS: math-emu: Cleanup coding style. 2014-05-23 15:11:15 +02:00
sp_flong.c MIPS: math-emu: Cleanup coding style. 2014-05-23 15:11:15 +02:00
sp_fmax.c MIPS: math-emu: Add support for the MIPS R6 MAX{, A} FPU instruction 2015-09-03 12:08:14 +02:00
sp_fmin.c MIPS: math-emu: Add support for the MIPS R6 MIN{, A} FPU instruction 2015-09-03 12:08:14 +02:00
sp_maddf.c MIPS: math-emu: Fix m{add,sub}.s shifts 2016-05-13 14:02:23 +02:00
sp_mul.c MIPS: math-emu: Reinstate sNaN quieting handlers 2015-04-08 01:09:31 +02:00
sp_simple.c MIPS: math-emu: Add IEEE Std 754-2008 ABS.fmt and NEG.fmt emulation 2016-01-20 00:39:20 +01:00
sp_sqrt.c MIPS: math-emu: Reinstate sNaN quieting handlers 2015-04-08 01:09:31 +02:00
sp_sub.c MIPS: math-emu: Fix m{add,sub}.s shifts 2016-05-13 14:02:23 +02:00
sp_tint.c MIPS: math-emu: Add IEEE Std 754-2008 NaN encoding emulation 2016-01-20 00:39:20 +01:00
sp_tlong.c MIPS: math-emu: Add IEEE Std 754-2008 NaN encoding emulation 2016-01-20 00:39:20 +01:00