]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Correct emulated mtfsf instruction
authorStephen Chivers <schivers@csc.com>
Fri, 21 Feb 2014 01:29:48 +0000 (12:29 +1100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 7 Apr 2014 00:33:11 +0000 (10:33 +1000)
commit7b6b58da4c1e0c3e3908db2d9a33a00ebc77aaf7
treef6fd1b1aa1f52fd43b326ef3078375b15177f1a8
parent5ed952b046ab62b51aa787d4a49fbc662eb2ae20
powerpc: Correct emulated mtfsf instruction

The emulated (CONFIG_MATH_EMULATION_FULL)
PowerPC Floating Point instruction mtfsf
does not correctly copy bits from its source
register to the Floating Point Status and Register (FPSCR).

The error is in the preparation of the mask used to
select the bits to be copied from the source to the FPSCR.

Execution of the mtfsf instruction does not produce the same
results on a MPC8548 platform (emulated floating point)
as on MPC7410 or 440EP platforms (hardware floating point).

This error has been detected using a Freescale MPC8548
based platform and the patch below tested using that platform.

The patch is based on the patch(es) provided by
Gabriel Paubert and analysis by Gabriel, James Yang and David Laight.

Signed-off-by: Stephen Chivers <schivers@csc.com>
Signed-off-by: Gabriel Paubert <paubert@iram.es>
Tested-by: Stephen Chivers <schivers@csc.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/math-emu/mtfsf.c