From: "Maciej W. Rozycki" <macro@imgtec.com>
To: Yunqiang Su <Yunqiang.Su@imgtec.com>
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>
Subject: Re: [Patch ,gcc/MIPS] add an build-time/runtime option to disable madd.fmt
Date: Wed, 11 Jan 2017 17:40:16 +0000 [thread overview]
Message-ID: <alpine.DEB.2.00.1701111725080.6936@tp.orcam.me.uk> (raw)
In-Reply-To: <6BFA91F2-1B3B-422C-AD1C-D6F4A00D625A@imgtec.com>
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
WARNING: multiple messages have this Message-ID (diff)
From: "Maciej W. Rozycki" <macro@imgtec.com>
To: Yunqiang Su <Yunqiang.Su@imgtec.com>
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
Subject: Re: [Patch ,gcc/MIPS] add an build-time/runtime option to disable madd.fmt
Date: Wed, 11 Jan 2017 17:40:16 +0000 [thread overview]
Message-ID: <alpine.DEB.2.00.1701111725080.6936@tp.orcam.me.uk> (raw)
Message-ID: <20170111174016.sR7uqrx-o5K5xpHKLYh7WFRtp7LI4E2qiPL2lS3eza8@z> (raw)
In-Reply-To: <6BFA91F2-1B3B-422C-AD1C-D6F4A00D625A@imgtec.com>
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
next parent reply other threads:[~2017-01-11 17:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <7FDC38C0-90D4-4A32-8FD5-ED65DC469055@imgtec.com>
[not found] ` <585AF58B.5030601@codesourcery.com>
[not found] ` <6D39441BF12EF246A7ABCE6654B0235380B0684E@HHMAIL01.hh.imgtec.org>
[not found] ` <878tr8geud.fsf@googlemail.com>
[not found] ` <9CE78A41-A06C-49E3-A198-1389418ED8EC@imgtec.com>
[not found] ` <1F820539-D3AD-4FF4-A710-D9F1C76C6219@imgtec.com>
[not found] ` <87vaucey35.fsf@googlemail.com>
[not found] ` <12EFBD0A-5AC7-409A-B08C-86A5032801E5@imgtec.com>
[not found] ` <CAKjxQH=aePXvOeP807MCKxDpG5RDAaNgB6LjH=cNi=XysrFW2A@mail.gmail.com>
[not found] ` <6BFA91F2-1B3B-422C-AD1C-D6F4A00D625A@imgtec.com>
2017-01-11 17:40 ` Maciej W. Rozycki [this message]
2017-01-11 17:40 ` [Patch ,gcc/MIPS] add an build-time/runtime option to disable madd.fmt Maciej W. Rozycki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.00.1701111725080.6936@tp.orcam.me.uk \
--to=macro@imgtec.com \
--cc=Catherine_Moore@mentor.com \
--cc=Matthew.Fortune@imgtec.com \
--cc=Yunqiang.Su@imgtec.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=huangpei@loongson.cn \
--cc=linux-mips@linux-mips.org \
--cc=paul.hua.gm@gmail.com \
--cc=rdsandiford@googlemail.com \
--cc=sandra@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).