* [PATCH 1/2] RISC-V: NaN should return 0 for finite[f]
@ 2020-10-28 15:41 Kito Cheng
2020-10-28 15:41 ` [PATCH 2/2] RISC-V: Fix wrong including file in s_isinf.c Kito Cheng
2020-10-29 8:41 ` [PATCH 1/2] RISC-V: NaN should return 0 for finite[f] Corinna Vinschen
0 siblings, 2 replies; 4+ messages in thread
From: Kito Cheng @ 2020-10-28 15:41 UTC (permalink / raw)
To: newlib, kito.cheng; +Cc: Kito Cheng
---
newlib/libm/machine/riscv/s_finite.c | 2 +-
newlib/libm/machine/riscv/sf_finite.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/newlib/libm/machine/riscv/s_finite.c b/newlib/libm/machine/riscv/s_finite.c
index f5336e5dc..1f1f2244d 100644
--- a/newlib/libm/machine/riscv/s_finite.c
+++ b/newlib/libm/machine/riscv/s_finite.c
@@ -44,7 +44,7 @@
int finite(double x)
{
long fclass = _fclass_d (x);
- return (fclass & FCLASS_INF) == 0;
+ return (fclass & (FCLASS_INF | FCLASS_NAN)) == 0;
}
#else
#include "../../common/s_finite.c"
diff --git a/newlib/libm/machine/riscv/sf_finite.c b/newlib/libm/machine/riscv/sf_finite.c
index f1cf5c6ce..a17b0fa36 100644
--- a/newlib/libm/machine/riscv/sf_finite.c
+++ b/newlib/libm/machine/riscv/sf_finite.c
@@ -41,7 +41,7 @@
int finitef(float x)
{
long fclass = _fclass_f (x);
- return (fclass & FCLASS_INF) == 0;
+ return (fclass & (FCLASS_INF | FCLASS_NAN)) == 0;
}
#else
#include "../../common/sf_finite.c"
--
2.28.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] RISC-V: Fix wrong including file in s_isinf.c
2020-10-28 15:41 [PATCH 1/2] RISC-V: NaN should return 0 for finite[f] Kito Cheng
@ 2020-10-28 15:41 ` Kito Cheng
2020-10-29 8:41 ` [PATCH 1/2] RISC-V: NaN should return 0 for finite[f] Corinna Vinschen
1 sibling, 0 replies; 4+ messages in thread
From: Kito Cheng @ 2020-10-28 15:41 UTC (permalink / raw)
To: newlib, kito.cheng; +Cc: Kito Cheng
---
newlib/libm/machine/riscv/s_isinf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/newlib/libm/machine/riscv/s_isinf.c b/newlib/libm/machine/riscv/s_isinf.c
index 3c82ee268..3d6d685a3 100644
--- a/newlib/libm/machine/riscv/s_isinf.c
+++ b/newlib/libm/machine/riscv/s_isinf.c
@@ -48,5 +48,5 @@ isinf (double x)
return (fclass & FCLASS_INF);
}
#else
-#include "../../common/sf_isinf.c"
+#include "../../common/s_isinf.c"
#endif
--
2.28.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] RISC-V: NaN should return 0 for finite[f]
2020-10-28 15:41 [PATCH 1/2] RISC-V: NaN should return 0 for finite[f] Kito Cheng
2020-10-28 15:41 ` [PATCH 2/2] RISC-V: Fix wrong including file in s_isinf.c Kito Cheng
@ 2020-10-29 8:41 ` Corinna Vinschen
2020-10-29 9:46 ` Kito Cheng
1 sibling, 1 reply; 4+ messages in thread
From: Corinna Vinschen @ 2020-10-29 8:41 UTC (permalink / raw)
To: Kito Cheng; +Cc: newlib, kito.cheng
On Oct 28 23:41, Kito Cheng wrote:
> ---
> newlib/libm/machine/riscv/s_finite.c | 2 +-
> newlib/libm/machine/riscv/sf_finite.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/newlib/libm/machine/riscv/s_finite.c b/newlib/libm/machine/riscv/s_finite.c
> index f5336e5dc..1f1f2244d 100644
> --- a/newlib/libm/machine/riscv/s_finite.c
> +++ b/newlib/libm/machine/riscv/s_finite.c
> @@ -44,7 +44,7 @@
> int finite(double x)
> {
> long fclass = _fclass_d (x);
> - return (fclass & FCLASS_INF) == 0;
> + return (fclass & (FCLASS_INF | FCLASS_NAN)) == 0;
> }
> #else
> #include "../../common/s_finite.c"
> diff --git a/newlib/libm/machine/riscv/sf_finite.c b/newlib/libm/machine/riscv/sf_finite.c
> index f1cf5c6ce..a17b0fa36 100644
> --- a/newlib/libm/machine/riscv/sf_finite.c
> +++ b/newlib/libm/machine/riscv/sf_finite.c
> @@ -41,7 +41,7 @@
> int finitef(float x)
> {
> long fclass = _fclass_f (x);
> - return (fclass & FCLASS_INF) == 0;
> + return (fclass & (FCLASS_INF | FCLASS_NAN)) == 0;
> }
> #else
> #include "../../common/sf_finite.c"
> --
> 2.28.0
Both patches pushed.
Sending a cover letter per `git format-patch --cover-letter ...' would
be nice when sending patch series.
Thanks,
Corinna
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] RISC-V: NaN should return 0 for finite[f]
2020-10-29 8:41 ` [PATCH 1/2] RISC-V: NaN should return 0 for finite[f] Corinna Vinschen
@ 2020-10-29 9:46 ` Kito Cheng
0 siblings, 0 replies; 4+ messages in thread
From: Kito Cheng @ 2020-10-29 9:46 UTC (permalink / raw)
To: Newlib, Kito Cheng, Kito Cheng; +Cc: Corinna Vinschen
Hi Corinna:
> Sending a cover letter per `git format-patch --cover-letter ...' would
> be nice when sending patch series.
Thanks for your reminder :)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-10-29 9:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-28 15:41 [PATCH 1/2] RISC-V: NaN should return 0 for finite[f] Kito Cheng
2020-10-28 15:41 ` [PATCH 2/2] RISC-V: Fix wrong including file in s_isinf.c Kito Cheng
2020-10-29 8:41 ` [PATCH 1/2] RISC-V: NaN should return 0 for finite[f] Corinna Vinschen
2020-10-29 9:46 ` Kito Cheng
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).