From: Simon Richter <Simon.Richter@hogyros.de>
To: gcc@gcc.gnu.org
Subject: POWER __builtin_add_overflow/__builtin_mul_overflow with u64
Date: Tue, 14 Feb 2023 04:48:42 +0100 [thread overview]
Message-ID: <567bf141-3d8b-201f-933b-087db28fc38b@hogyros.de> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 661 bytes --]
Hi,
I'm looking at the generated code for these builtins on POWER:
add 4,3,4
subfc 3,3,4
subfe 3,3,3
std 4,0(5)
rldicl 3,3,0,63
blr
and
mulld 10,3,4
mulhdu 3,3,4
addic 9,3,-1
std 10,0(5)
subfe 3,9,3
blr
The POWER architecture has variants of these instructions with builtin
overflow checks (addo/mulldo), but these aren't listed in the .md files,
and the builtins don't generate them either.
Is this intentional (I've found a few comments that mulldo is microcoded
on CellBE and should be avoided there)?
Simon
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2023-02-14 3:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-14 3:48 Simon Richter [this message]
2023-02-14 8:23 ` Jakub Jelinek
2023-02-14 9:26 ` Eric Botcazou
2023-02-15 9:43 ` Segher Boessenkool
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=567bf141-3d8b-201f-933b-087db28fc38b@hogyros.de \
--to=simon.richter@hogyros.de \
--cc=gcc@gcc.gnu.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).