[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-arm] [PATCH] linux-user/arm/nwfpe: Check coprocessor number fo

From: Peter Maydell
Subject: Re: [Qemu-arm] [PATCH] linux-user/arm/nwfpe: Check coprocessor number for FPA emulation
Date: Tue, 9 Jan 2018 14:18:55 +0000

On 29 November 2017 at 09:30, Richard Henderson
<address@hidden> wrote:
> 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 <address@hidden>
>> Signed-off-by: Peter Maydell <address@hidden>
>> ---
>> 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 <address@hidden>

Thanks; applied to target-arm.next (since it's as much an arm patch
as a linux-user one).

-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]