On 11/28/2017 05:34 PM, Peter Maydell wrote:
> Our copy of the nwfpe code for emulating of the old FPA11 floating
> point unit doesn't check the coprocessor number in the instruction
> when it emulates it.  This means that we might treat some
> instructions which should really UNDEF as being FPA11 instructions by
> accident.
> 
> The kernel's copy of the nwfpe code doesn't make this error; I suspect
> the bug was noticed and fixed as part of the process of mainlining
> the nwfpe code more than a decade ago.
> 
> Add a check that the coprocessor number (which is always in bits
> [11:8] of the instruction) is either 1 or 2, which is where the
> FPA11 lives.
> 
> Reported-by: Richard Henderson <richard.hender...@linaro.org>
> Signed-off-by: Peter Maydell <peter.mayd...@linaro.org>
> ---
> Tested with a chroot of arm debian lenny, which is the last one that
> still used the calling convention that mandated use of the old FPA11 FPU
> and thus needs nwfpe emulation.
> ---
>  linux-user/arm/nwfpe/fpa11.c | 9 +++++++++
>  1 file changed, 9 insertions(+)

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>


r~

Reply via email to