From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: Conformance issues to address after 0.9.12 release
Date: Mon, 12 Aug 2013 23:32:32 -0400 [thread overview]
Message-ID: <20130813033231.GB221@brightrain.aerifal.cx> (raw)
In-Reply-To: <20130812192704.GE5368@port70.net>
On Mon, Aug 12, 2013 at 09:27:04PM +0200, Szabolcs Nagy wrote:
> diff --git a/src/math/i386/asin.s b/src/math/i386/asin.s
> index 932c754..7e49409 100644
> --- a/src/math/i386/asin.s
> +++ b/src/math/i386/asin.s
> @@ -2,7 +2,20 @@
> .type asinf,@function
> asinf:
> flds 4(%esp)
> - jmp 1f
> + mov 4(%esp),%eax
> + add %eax,%eax
> + cmp $0x01000000,%eax
> + jae 1f
> + # subnormal x, return x with underflow
> + fnstsw %ax
> + and $16,%ax
> + jnz 2f
> + push %eax
> + fld %st(0)
> + fmul %st(1)
> + fstps (%esp)
> + pop %eax
> +2: ret
Why the push/pop? Is there a reason you can't just store over top of
the argument slot at 4(%esp) or even below the stack pointer at
-4(%esp)? The latter would be unsafe if you ever wanted to read back
the value since it could be clobbered asynchronously by a signal
handler, but you don't want/need to read it back anyway.
Rich
next prev parent reply other threads:[~2013-08-13 3:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-29 6:34 Rich Felker
2013-07-29 16:00 ` Szabolcs Nagy
2013-07-29 21:04 ` Rich Felker
2013-07-30 2:26 ` Szabolcs Nagy
2013-08-12 19:27 ` Szabolcs Nagy
2013-08-13 3:32 ` Rich Felker [this message]
2013-08-13 3:45 ` Szabolcs Nagy
2013-08-13 4:25 ` Rich Felker
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=20130813033231.GB221@brightrain.aerifal.cx \
--to=dalias@aerifal.cx \
--cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).