public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: math/modfl.c: Fix segment faults in modfl().
@ 2020-08-30 12:30 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2020-08-30 12:30 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=0e6690a92ccda8b2d6a759bc1649c6160137d170
commit 0e6690a92ccda8b2d6a759bc1649c6160137d170
Author: Liu Hao <lh_mouse@126.com>
Date: Sun Aug 30 13:56:31 2020 +0200
Cygwin: math/modfl.c: Fix segment faults in modfl().
Reference: https://sourceforge.net/p/mingw-w64/bugs/478/
Signed-off-by: Liu Hao <lh_mouse@126.com>
Diff:
---
winsup/cygwin/math/modfl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/math/modfl.c b/winsup/cygwin/math/modfl.c
index af75a8b8c..ef1ab16ce 100644
--- a/winsup/cygwin/math/modfl.c
+++ b/winsup/cygwin/math/modfl.c
@@ -21,7 +21,7 @@ modfl (long double value, long double* iptr)
"fldcw (%%rsp)\n"
"frndint\n"
"fldcw 4(%%rsp)\n"
- "addq $8, %%rsp\n" : "=t" (int_part) : "0" (value)); /* round */
+ "addq $8, %%rsp\n" : "=t" (int_part) : "0" (value) : "eax"); /* round */
#elif defined(_X86_) || defined(__i386__)
asm ("push %%eax\n\tsubl $8, %%esp\n"
"fnstcw 4(%%esp)\n"
@@ -31,7 +31,7 @@ modfl (long double value, long double* iptr)
"fldcw (%%esp)\n"
"frndint\n"
"fldcw 4(%%esp)\n"
- "addl $8, %%esp\n\tpop %%eax\n" : "=t" (int_part) : "0" (value)); /* round */
+ "addl $8, %%esp\n\tpop %%eax\n" : "=t" (int_part) : "0" (value) : "eax"); /* round */
#else
int_part = truncl(value);
#endif
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-08-30 12:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-30 12:30 [newlib-cygwin] Cygwin: math/modfl.c: Fix segment faults in modfl() Corinna Vinschen
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).