From: Mike Frysinger <vapier@gentoo.org>
To: Daniel Gutson <daniel.gutson@tallertechnologies.com>
Cc: libc-alpha@sourceware.org
Subject: Re: question regarding div / std::div implementation
Date: Wed, 20 Apr 2016 20:27:00 -0000 [thread overview]
Message-ID: <20160420202711.GH5369@vapier.lan> (raw)
In-Reply-To: <CAF5HaEXKZ7j-gbZPiWPhDpx7=R0zm1xYvXNYCNUMG4WeZS532Q@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 583 bytes --]
On 20 Apr 2016 16:44, Daniel Gutson wrote:
> is there any reason that std::div / cstdlib div is not implemented
> in such a way that it is expanded to
> the assembly instruction -when available- that calculates both the
> remainder and the quotient,
> e.g. x86' div ?
>
> For example, why not an inline function with inline assembly? Or,
> should this require a gcc built-in?
sounds like an optimization for gcc rather than hacking something at the
cpp level. you could post to the gcc-help@ list and they would know best.
https://gcc.gnu.org/ml/gcc-help/
-mike
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-04-20 20:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-20 19:44 Daniel Gutson
2016-04-20 20:27 ` Mike Frysinger [this message]
[not found] ` <5717DF65.5060606@linaro.org>
[not found] ` <CAF5HaEWdpAGiXtCO36u3F0QGAXfVHL+qkY+RLsszpv7paPVdMg@mail.gmail.com>
2016-04-20 20:29 ` Adhemerval Zanella
2016-04-20 20:36 ` Daniel Gutson
2016-04-20 20:49 ` Adhemerval Zanella
2016-04-20 21:16 ` Daniel Gutson
2016-04-20 21:38 ` Paul Eggert
2016-04-20 21:55 ` Daniel Gutson
2016-04-20 22:10 ` Paul Eggert
2016-04-20 22:18 ` Daniel Gutson
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=20160420202711.GH5369@vapier.lan \
--to=vapier@gentoo.org \
--cc=daniel.gutson@tallertechnologies.com \
--cc=libc-alpha@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: 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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).