* Re: [Patch ,gcc/MIPS] add an build-time/runtime option to disable madd.fmt [not found] ` <6BFA91F2-1B3B-422C-AD1C-D6F4A00D625A@imgtec.com> @ 2017-01-11 17:40 ` Maciej W. Rozycki 2017-01-11 17:40 ` Maciej W. Rozycki 0 siblings, 1 reply; 2+ messages in thread From: Maciej W. Rozycki @ 2017-01-11 17:40 UTC (permalink / raw) To: Yunqiang Su Cc: Paul Hua, Richard Sandiford, Matthew Fortune, Sandra Loosemore, gcc-patches, Moore, Catherine (Catherine_Moore@mentor.com), huangpei, linux-mips 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 ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Patch ,gcc/MIPS] add an build-time/runtime option to disable madd.fmt 2017-01-11 17:40 ` [Patch ,gcc/MIPS] add an build-time/runtime option to disable madd.fmt Maciej W. Rozycki @ 2017-01-11 17:40 ` Maciej W. Rozycki 0 siblings, 0 replies; 2+ messages in thread From: Maciej W. Rozycki @ 2017-01-11 17:40 UTC (permalink / raw) To: Yunqiang Su Cc: Paul Hua, Richard Sandiford, Matthew Fortune, Sandra Loosemore, gcc-patches, Moore, Catherine (Catherine_Moore@mentor.com), huangpei, linux-mips 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 ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-11 17:40 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [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 ` [Patch ,gcc/MIPS] add an build-time/runtime option to disable madd.fmt Maciej W. Rozycki 2017-01-11 17:40 ` Maciej W. Rozycki
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).