public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Doug Evans <dje@transmeta.com>
To: Dave Brolley <brolley@redhat.com>
Cc: cgen@sources.redhat.com
Subject: Re: [patch][rfa] Add ltu,leu,gtu,geu support for unsigned modes
Date: Fri, 09 May 2003 16:17:00 -0000	[thread overview]
Message-ID: <16059.54436.49779.706953@casey.transmeta.com> (raw)
In-Reply-To: <3EBA9F61.3080403@redhat.com>

Dave Brolley writes:
 > That's why I was led to believe that this 
 > support was appropriate.

I'm not faulting you for thinking that.
We need to reach a decision about Umodes and more rigidly enforce it.
Mea culpa.

I propose we set a direction of removing them entirely.

One catch, to me anyway, is that I much prefer thinking of
registers (esp. pc) as unsigned quantities.
Thus an additional step might be to define SI as unsigned
when it appears in C.  At the semantic level it is neither signed
nor unsigned, but C doesn't really have a way of understanding that,
and that might cause confusion.  Whether it'd be a more palatable
confusion than having both SI and USI I dunno.

 > It may be excessive, but one could also argue that it's 
 > more complete to support Umodes.

Depends on how you look at things.
To a cpu, a 32 bit register is a 32 bit register.
Ditto for when the 32 bit quantity lives in memory.
It's only in how it is subsequently used or interpreted that
signedness might come into play.
When signedness comes into play on the chip, it's explicitly
specified in the operation, _not_ in the data.
Ergo from this perspective Umodes don't belong in .cpu files.
And I think this is the perspective we must use (when writing
.cpu files anyway).

 > (if (lt (zext UDI op1) (zext UDI op2 ))(set op3 op1 ))
 > 
 > works and it's hard to explain to the customer why ltu doesn't accept 
 > umodes while lt does.

Well, it's easy to explain.  No claim is made that one's eyes won't roll.
Is LTUDI LT concatenated with UDI or LTU concatenated with DI?

 > >@item UQI,UHI,USI,UDI
 > >Unsigned versions of QI,HI,SI,DI.
 > >
 > >These modes do not appear in semantic RTL.  Instead, the RTL function
 > >specifies the signedness of its operands where necessary.
 > > [...]
 >
 > Perhaps this can help me convince the customer.

I think if you explain the above reasoning that will also help.

  reply	other threads:[~2003-05-09 16:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-06 19:35 Dave Brolley
2003-05-06 21:57 ` Dave Brolley
2003-05-06 22:42 ` Ben Elliston
2003-05-08 17:17 ` Doug Evans
2003-05-08 18:18   ` Dave Brolley
2003-05-09 16:17     ` Doug Evans [this message]
2003-06-13 20:02     ` Dave Brolley

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=16059.54436.49779.706953@casey.transmeta.com \
    --to=dje@transmeta.com \
    --cc=brolley@redhat.com \
    --cc=cgen@sources.redhat.com \
    /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).