public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@xry111.site>
To: Junxian Zhu <zhujunxian@oss.cipunited.com>,
	libc-alpha@sourceware.org,  jiaxun.yang@flygoat.com
Cc: rongrong@oss.cipunited.com
Subject: Re: [PATCH 2/2] MIPS: Hard-float rounding instructions support
Date: Thu, 25 Jan 2024 22:37:37 +0800	[thread overview]
Message-ID: <3ba593e29783f3f3ba50e0cf6e124a63f77aac48.camel@xry111.site> (raw)
In-Reply-To: <cd381ffb-c515-4068-99f9-b04b7a7057c2@oss.cipunited.com>

On Thu, 2024-01-25 at 21:58 +0800, Junxian Zhu wrote:

> Recently, I'm still trying to do some optimization for MIPS. I want to
> know if I use rounding instructions on MIPS, like |round.l.d|, in 
> functions with parameters input in FPR and results in GPR, like 
> > llrint|or |lrint|, will we still face the INEXACT exception and 
> potentially violate C23?

C23 explicitly says llrint and lrint *raises* FE_INEXACT exception when
they raise no other floating-point exception and the result differs from
the argument.

But you should still do the optimization in GCC, then define
USE_LRINT_BUILTIN etc. in Glibc if GCC is recent enough to support it. 
By doing this in the compiler, users can avoid an overhead to do a
function call (esp. on MIPS with all the "abicall" stuff the overhead is
very large).

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

  reply	other threads:[~2024-01-25 14:37 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
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 [this message]
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=3ba593e29783f3f3ba50e0cf6e124a63f77aac48.camel@xry111.site \
    --to=xry111@xry111.site \
    --cc=jiaxun.yang@flygoat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=rongrong@oss.cipunited.com \
    --cc=zhujunxian@oss.cipunited.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 read-only IMAP folder(s) and NNTP newsgroup(s).