linux-mips
[Top] [All Lists]

Re: [Patch ,gcc/MIPS] add an build-time/runtime option to disable madd.f

To: Yunqiang Su <Yunqiang.Su@imgtec.com>
Subject: Re: [Patch ,gcc/MIPS] add an build-time/runtime option to disable madd.fmt
From: "Maciej W. Rozycki" <macro@imgtec.com>
Date: Wed, 11 Jan 2017 17:40:16 +0000
Cc: Paul Hua <paul.hua.gm@gmail.com>, Richard Sandiford <rdsandiford@googlemail.com>, Matthew Fortune <Matthew.Fortune@imgtec.com>, Sandra Loosemore <sandra@codesourcery.com>, gcc-patches <gcc-patches@gcc.gnu.org>, "Moore, Catherine (Catherine_Moore@mentor.com)" <Catherine_Moore@mentor.com>, "huangpei@loongson.cn" <huangpei@loongson.cn>, <linux-mips@linux-mips.org>
In-reply-to: <6BFA91F2-1B3B-422C-AD1C-D6F4A00D625A@imgtec.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <7FDC38C0-90D4-4A32-8FD5-ED65DC469055@imgtec.com> <585AF58B.5030601@codesourcery.com> <6D39441BF12EF246A7ABCE6654B0235380B0684E@HHMAIL01.hh.imgtec.org> <878tr8geud.fsf@googlemail.com> <9CE78A41-A06C-49E3-A198-1389418ED8EC@imgtec.com> <1F820539-D3AD-4FF4-A710-D9F1C76C6219@imgtec.com> <87vaucey35.fsf@googlemail.com> <12EFBD0A-5AC7-409A-B08C-86A5032801E5@imgtec.com> <CAKjxQH=aePXvOeP807MCKxDpG5RDAaNgB6LjH=cNi=XysrFW2A@mail.gmail.com> <6BFA91F2-1B3B-422C-AD1C-D6F4A00D625A@imgtec.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Fri, 23 Dec 2016, Yunqiang Su wrote:

> > 3, kernel: the emulation  when a float exception taken.
> 
> The big problem is that Loongson use the same encode for (unfused) 
> madd.fmt to (fused) madd.fmt. We cannot trap this in kernel.

 Why is that a problem?  Just add a setting like `cpu_has_fused_madd' to 
<asm/cpu-features.h>, switch processing in the emulator accordingly and 
initialise the setting early on in bootstrap as processor features are 
determined.  We'd have to do it likewise for the R8000 MIPS IV CPU Richard 
referred to previously if we had full support for this processor (unlikely 
to happen).

 Cc-ing <linux-mips@linux-mips.org> in case you want to discuss it further 
with the kernel developers; arguably it's a kernel bug already that the 
FPU as perceived by user software has different semantics on FPU Loongson 
hardware depending on whether or not the `nofpu' kernel parameter has been 
set (I don't know if denormals are handled by Loongson FPU hardware or 
trap with an Unimplemented Operation exception, but if the former, then 
this inconsistency applies for such data in the regular FPU mode as well).

 HTH,

  Maciej

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Patch ,gcc/MIPS] add an build-time/runtime option to disable madd.fmt, Maciej W. Rozycki <=