From: Martin Dalecki <dalecki@evision-ventures.com>
To: Richard Henderson <rth@twiddle.net>
Cc: tytso@mit.edu, Jakub Jelinek <jakub@redhat.com>,
Horst von Brand <vonbrand@sleipnir.valparaiso.cl>,
linux-kernel@vger.kernel.org
Subject: Re: 2.4.0-test10-pre6: Use of abs()
Date: Thu, 02 Nov 2000 13:14:49 +0100 [thread overview]
Message-ID: <3A015AB9.D3B80830@evision-ventures.com> (raw)
In-Reply-To: <200010281629.e9SGTah07672@sleipnir.valparaiso.cl> <39FD7F2C.9A3F3976@evision-ventures.com> <20001030081938.K6207@devserv.devel.redhat.com> <39FD9E6A.AD10E699@evision-ventures.com> <20001101094619.A15283@trampoline.thunk.org> <20001101102216.A18206@twiddle.net>
Richard Henderson wrote:
>
> On Wed, Nov 01, 2000 at 09:46:19AM -0500, tytso@mit.edu wrote:
> > What versions of gcc produce the built-in functions?
>
> 2.95 and previous. In 2.96 somewhere we fixed a bug that
> automatically prototypes these builtin functions for you;
> ie with current code you get an undeclared function warning.
>
> > And does it do so for *all* platforms? (i.e., PPC, Alpha,
> > IA64, etc., etc., etc.)
>
> Yes. The thing about abs, though, is that it's "int abs(int)"
> which does naughty things with longs on 64-bit targets. You're
> much better off writing (x < 0 ? -x : x) directly.
Thank's for answering it... I was already looking up the GCC source for
an exact answer ;-). However what's the difference in respect of
optimization between unrolling the abs function by hand and
relying on the built in?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2000-11-02 11:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-10-28 16:29 2.4.0-test10-pre6: Use of abs() Horst von Brand
2000-10-30 14:01 ` Martin Dalecki
2000-10-30 13:19 ` Jakub Jelinek
2000-10-30 16:14 ` Martin Dalecki
2000-11-01 14:46 ` tytso
2000-11-01 18:22 ` Richard Henderson
2000-11-02 12:14 ` Martin Dalecki [this message]
2000-11-02 19:37 ` Richard Henderson
2000-11-02 3:02 ` Theodore Y. Ts'o
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=3A015AB9.D3B80830@evision-ventures.com \
--to=dalecki@evision-ventures.com \
--cc=jakub@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rth@twiddle.net \
--cc=tytso@mit.edu \
--cc=vonbrand@sleipnir.valparaiso.cl \
/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