powerpc: Correct emulated mtfsf instruction
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 <99629c949166883cbd2ed3d465b890c94f21c6d3@csc.com>
Signed-off-by: Gabriel Paubert <fd64bd997da06feeb822cd7e6f1bea4f5c839b91@iram.es>
Tested-by: Stephen Chivers <99629c949166883cbd2ed3d465b890c94f21c6d3@csc.com>
Signed-off-by: Benjamin Herrenschmidt <a7089bb6e7e92505d88aaff006cbdd60cc9120b6@kernel.crashing.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs