public inbox for cygwin-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: math/modfl.c: Fix segment faults in modfl(). Date: Sun, 30 Aug 2020 12:30:20 +0000 (GMT) [thread overview] Message-ID: <20200830123020.24F75383F849@sourceware.org> (raw) 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
reply other threads:[~2020-08-30 12:30 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200830123020.24F75383F849@sourceware.org \ --to=corinna@sourceware.org \ --cc=cygwin-cvs@sourceware.org \ /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: linkBe 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).