From: Eric Botcazou <ebotcazou@adacore.com>
To: Richard Biener <rguenther@suse.de>
Cc: gcc-patches@gcc.gnu.org, Michael Matz <matz@suse.de>
Subject: Re: [PATCH][RFC] Introduce BIT_FIELD_INSERT
Date: Thu, 19 May 2016 15:21:00 -0000 [thread overview]
Message-ID: <10155617.0hHYLBiUYX@polaris> (raw)
In-Reply-To: <alpine.LSU.2.11.1605191521480.18037@t29.fhfr.qr>
> Index: trunk/gcc/tree.def
> ===================================================================
> *** trunk.orig/gcc/tree.def 2016-05-17 17:19:41.783958489 +0200
> --- trunk/gcc/tree.def 2016-05-19 10:23:35.779141973 +0200
> *************** DEFTREECODE (ADDR_EXPR, "addr_expr", tcc
> *** 852,857 ****
> --- 852,871 ----
> descriptor of type ptr_mode. */
> DEFTREECODE (FDESC_EXPR, "fdesc_expr", tcc_expression, 2)
>
> + /* Given a word, a value and a bit position within the word,
> + produce the value that results if replacing the parts of word
> + starting at the bit position with value.
> + Operand 0 is a tree for the word of integral or vector type;
> + Operand 1 is a tree for the value of integral or vector element type;
> + Operand 2 is a tree giving the constant position of the first
> referenced bit; + The number of bits replaced is given by the precision
> of the value + type if that is integral or by its size if it is
> non-integral. + ??? The reason to make the size of the replacement
> implicit is to not + have a quaternary operation.
> + The replaced bits shall be fully inside the word. If the word is of
> + vector type the replaced bits shall be aligned with its elements. */
> + DEFTREECODE (BIT_INSERT_EXPR, "bit_field_insert", tcc_expression, 3)
> +
"word" is ambiguous (what is a word of vector type?). What's allowed as
operand #0 exactly? If that's anything, I'd call it a value too, possibly
with a qualifier, for example:
/* Given a container value, a replacement value and a bit position within
the container, produce the value that results from replacing the part of
the container starting at the bit position with the replacement value.
Operand 0 is a tree for the container value of integral or vector type;
Operand 1 is a tree for the replacement value of another integral or
vector element type;
Operand 2 is a tree giving the constant bit position;
The number of bits replaced is given by the precision of the type of the
replacement value if it is integral or by its size if it is non-integral.
??? The reason to make the size of the replacement implicit is to avoid
introducing a quaternary operation.
The replaced bits shall be fully inside the container. If the container
is of vector type, then these bits shall be aligned with its elements. */
DEFTREECODE (BIT_INSERT_EXPR, "bit_field_insert", tcc_expression, 3)
--
Eric Botcazou
next prev parent reply other threads:[~2016-05-19 15:21 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-13 10:51 Richard Biener
2016-05-16 0:55 ` Bill Schmidt
2016-05-16 12:37 ` Bill Schmidt
2016-05-17 7:52 ` Richard Biener
2016-05-16 8:24 ` Eric Botcazou
2016-05-17 7:50 ` Richard Biener
2016-05-17 8:13 ` Eric Botcazou
2016-05-17 15:19 ` Michael Matz
2016-05-19 13:23 ` Richard Biener
2016-05-19 15:21 ` Eric Botcazou [this message]
2016-05-20 8:59 ` Richard Biener
2016-05-20 11:25 ` Jakub Jelinek
2016-05-20 11:41 ` Richard Biener
2016-05-20 11:52 ` Jakub Jelinek
2016-05-20 11:53 ` Richard Biener
2016-05-20 14:11 ` Andi Kleen
2016-05-20 15:12 ` Marc Glisse
2016-05-20 15:54 ` Andi Kleen
2016-05-20 16:08 ` Jakub Jelinek
2016-05-20 19:25 ` Richard Biener
2016-05-20 17:08 ` Marc Glisse
2018-11-15 1:27 ` Andrew Pinski
2018-11-15 8:29 ` Richard Biener
2018-11-15 8:31 ` Richard Biener
2019-12-17 2:41 ` Andrew Pinski
2019-12-17 3:25 ` Andrew Pinski
2020-01-07 7:37 ` Richard Biener
2020-01-07 9:40 ` Andrew Pinski
2020-01-07 10:04 ` Richard Biener
2020-01-07 11:14 ` Richard Sandiford
2020-01-07 11:38 ` Richard Biener
2020-01-07 11:52 ` Richard Sandiford
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=10155617.0hHYLBiUYX@polaris \
--to=ebotcazou@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=matz@suse.de \
--cc=rguenther@suse.de \
/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).