public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Michael Meissner <meissner@linux.ibm.com>
To: Peter Bergner <bergner@linux.ibm.com>
Cc: Michael Meissner <meissner@linux.ibm.com>,
	"Kewen.Lin" <linkw@linux.ibm.com>,
	P Jeevitha <jeevitha@linux.ibm.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	Segher Boessenkool <segher@kernel.crashing.org>
Subject: Re: [PATCH] rs6000: Fix issue in specifying PTImode as an attribute [PR106895]
Date: Sat, 26 Aug 2023 04:37:17 -0400	[thread overview]
Message-ID: <ZOm5vdE6pDNDAgO9@cowardly-lion.the-meissners.org> (raw)
In-Reply-To: <9a300552-21a6-cc4c-294d-bec0c6b3739c@linux.ibm.com>

On Thu, Aug 24, 2023 at 09:19:51PM -0500, Peter Bergner wrote:
> On 8/24/23 12:35 PM, Michael Meissner wrote:
> > On Thu, Jul 20, 2023 at 10:05:28AM +0530, jeevitha wrote:
> >> gcc/
> >> 	PR target/110411
> >> 	* config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add fields
> >> 	to hold PTImode type.
> >> 	* config/rs6000/rs6000-builtin.cc (rs6000_init_builtins): Add node
> >> 	for PTImode type.
> > 
> > It is good as far as it goes, but I suspect we will eventually need to extend
> > it.  In particular, the reason people need PTImode is they need the even/odd
> > register layout.  What you've done enables users to declare this value.
> 
> Sure, it could be extended, but that is not what this patch is about.
> It's purely to allow the kernel team access to the guaranteed even/odd
> register layout for some inline asm code.  Any extension would be a
> follow-on patch to this.

I think we need to get the intended users to try the compiler out, and see if
something else happens down the road that we didn't think of.

I tend to think of these things like the children's story "If you give a mouse
a cookie", which in turn leads to another thing and then another.

As I said, I would expect it would be temptimg to start use these types with
either 8 byte atomic built-ins, or do masks, etc.

In a way, it sort of reminds me of OOmode, where we have this opaque type to
load two vectors, but when you start trying to access the two separate
registers, you get all sorts of moves, because the compiler underneath the
covers doesn't really know it is two registers.

In general, I tend that people don't tend to have a full 128-bit integer, but
instead you have a structure with two fields, one is the lock and one is the
data.  So you want to load things together (or do compare/swap, etc.) and then
you want to split the parts into 2 pieces, and then later, combine them back
into the PTImode container.

I really wish we had a constraint that matched the 2nd register in a multi-word
register (not an output operation, a constraint so that the register allocator
could know that you want to overlap a register).

-- 
Michael Meissner, IBM
PO Box 98, Ayer, Massachusetts, USA, 01432
email: meissner@linux.ibm.com

  reply	other threads:[~2023-08-26  8:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-20  4:35 jeevitha
2023-08-04 10:12 ` [PING ^1][PATCH] " jeevitha
2023-08-09  8:48 ` [PATCH] " Kewen.Lin
2023-08-24 17:35 ` Michael Meissner
2023-08-25  2:19   ` Peter Bergner
2023-08-26  8:37     ` Michael Meissner [this message]
2023-11-13 15:08     ` [PING ^1][PATCH] " jeevitha
2023-12-11 19:11       ` [PING ^3][PATCH] " jeevitha
     [not found] <9ea38d87-180f-46b5-a723-45061680980f@linux.vnet.ibm.com>
2024-02-23  9:34 ` [PATCH] " jeevitha
2024-03-18 14:36   ` Segher Boessenkool
2024-03-18 17:35     ` Peter Bergner

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=ZOm5vdE6pDNDAgO9@cowardly-lion.the-meissners.org \
    --to=meissner@linux.ibm.com \
    --cc=bergner@linux.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeevitha@linux.ibm.com \
    --cc=linkw@linux.ibm.com \
    --cc=segher@kernel.crashing.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).