public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "Junxian Zhu" <zhujunxian@oss.cipunited.com>
To: "Xi Ruoyao" <xry111@xry111.site>
Cc: <libc-alpha@sourceware.org>, <adhemerval.zanella@linaro.org>
Subject: Re: [PATCH 2/2] MIPS: Hard-float rounding instructions support
Date: Tue, 2 Jan 2024 18:08:19 +0800	[thread overview]
Message-ID: <b2987d35-c764-4311-8848-d0e4cb69f897@oss.cipunited.com> (raw)
In-Reply-To: <e4643c162431f1b4ffcc1793ae3d1d63fbdd76a8.camel@xry111.site>

在 2023/12/27 6:50, Xi Ruoyao 写道:
> On Wed, 2023-12-27 at 05:50 +0800, Xi Ruoyao wrote:
>> On Tue, 2023-12-26 at 17:12 -0300, Adhemerval Zanella Netto wrote:
>>> Also, I see no point in implementing this optimizations with assembly where
>>> a C implementation would be way simpler and generate similar code. Similar
>>> to what I did for powerpc with sysdeps/powerpc/fpu/round_to_integer.h, I
>>> implemented a similar approach for MIPS [1].  The resulting code should be
>>> similar to the assembly implementation, taking in consideration the correct
>>> fix to save/restore floating-point exceptions. I did see no math regression
>>> on cfarm23 with a glibc built with -mabi=64 -mips64r2.
>> Is there a micro-benchmark result on the cfarm machine?  AFAIK the FCSR
>> setting instruction may be much more slower than normal instructions, so
>> I'm not sure if this is really a win.
> Add Jiaxun who knows MIPS much better than me.

After disscussion with Jiaxun, we guess that the consuming of switching 
mode in FCSR is the cause of FPU implements slower than generic 
implements. If we don't change or switching mode in FCSR, the FPU 
implements will be faster than generic implements. Tested on Imagination 
Ci40 (MIPS interAptiv (multi) V2.0  FPU V0.0)and loogson 3A2000.

So it's enough to use generic C implements for rounding on MIPS.......

  parent reply	other threads:[~2024-01-02 10:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-25 10:35 [PATCH 0/2] Add hard-float rounding instructions support for MIPS architecture Junxian Zhu
2023-12-25 10:35 ` [PATCH 1/2] limb-alias-double.h: Fix missing semicolon Junxian Zhu
2023-12-25 10:35 ` [PATCH 2/2] MIPS: Hard-float rounding instructions support Junxian Zhu
2023-12-25 10:51   ` Xi Ruoyao
2023-12-26  2:37     ` Junxian Zhu
2023-12-26  8:29       ` Xi Ruoyao
2023-12-26 20:12         ` Adhemerval Zanella Netto
2023-12-26 21:50           ` Xi Ruoyao
2023-12-26 22:50             ` Xi Ruoyao
2023-12-27 13:25               ` Adhemerval Zanella Netto
2024-01-02 10:08               ` Junxian Zhu [this message]
2024-01-02  9:43         ` Junxian Zhu
2024-01-02  9:57           ` Xi Ruoyao
     [not found]         ` <5f0f4c83-f6d8-4af3-8cce-e12cd5314da1@oss.cipunited.com>
2024-01-31  9:08           ` Xi Ruoyao
2024-01-25 13:58     ` Junxian Zhu
2024-01-25 14:37       ` Xi Ruoyao
2023-12-25 12:36   ` YunQiang Su
2023-12-26  2:48     ` Junxian Zhu
2024-01-02  9:51     ` Junxian Zhu
2023-12-29  1:00   ` Joseph Myers

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=b2987d35-c764-4311-8848-d0e4cb69f897@oss.cipunited.com \
    --to=zhujunxian@oss.cipunited.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    --cc=xry111@xry111.site \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).