From: Doug Evans <dje@transmeta.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: cgen-mail@the-meissners.org, cgen@sources.redhat.com
Subject: Re: Use of DI mode on 32-bit hosts
Date: Mon, 02 Jun 2003 22:04:00 -0000 [thread overview]
Message-ID: <16091.51685.885875.214781@casey.transmeta.com> (raw)
In-Reply-To: <20030602213226.GB22856@redhat.com>
Frank Ch. Eigler writes:
> I guess I don't see the abstraction and simplicity this
> indirection is to provide. Do you have an example?
- I'd rather have one version of "add" for sparc 32/64
- I'd rather write 'IAI in the .scm sources when refering to 'pc
than doing something else
[for example]
> > INT/UINT are treated separately. They're for host values
> > where one doesn't care about target sizes.
>
> In what circumstances do you consider it reasonable for cgen
> model files to deal with host data types/sizes?
Don't say "deal with host data types/sizes". That'll trigger arguments
that go off on tangents. Each host has lots of data types/sizes.
What I meant was integers not tied to particular widths,
and for pragmatic sake one can assume the application will have available
at least a 32 bit integral type to use.
Sometimes the code will need a mode but imposing a specific
width muddies the waters. If one wanted to write some rtl
that looped over something, picking one of QI/HI/SI/DI
may be less appealing than "just give me a big enough int".
How many in C-land write "for (unsigned i = 0; mumble; mumble)
vs "for (uint32_t i = 0; mumble; mumble)"?
[
And actually I was incomplete. INT/UINT are also used for varying
width values, whereas SI/DI have explicit widths.
So actually, I should have two separate forms of INT/UINT,
but the distinction has yet to be needed.
From doc/rtl.texi:
@example
@code{(immediate mode)}
@code{(immediate (mode bits))}
@end example
The second form is for values for which a mode of that size doesn't exist.
@samp{mode} for the second form must be one of @code{INT} or @code{UINT}.
Since these two modes don't have an implicit size, they cannot be used
for the first form.
??? There's no real reason why a mode like SI can't be used
for odd-sized immediate values. The @samp{bits} field indicates the size
and the @samp{mode} field indicates the mode in which the value will be used,
as well as its signedness. This would allow removing INT/UINT for this
purpose. On the other hand, a non-width specific mode allows applications
to choose one (a simulator might prefer to store immediates in an `int'
rather than, say, char if the specified mode was @code{QI}).
[and I should rephrase that to say that imposing one width with SI
on a value (e.g. immediate) of a different width is confusing]
]
next prev parent reply other threads:[~2003-06-02 22:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-02 17:32 Michael Meissner
2003-06-02 17:45 ` Doug Evans
2003-06-02 19:22 ` Michael Meissner
2003-06-02 20:44 ` Doug Evans
2003-06-02 20:50 ` Frank Ch. Eigler
2003-06-02 21:26 ` Doug Evans
2003-06-02 21:32 ` Frank Ch. Eigler
2003-06-02 22:04 ` Doug Evans [this message]
2003-06-03 15:19 ` Frank Ch. Eigler
2003-06-02 21:33 ` Michael Meissner
2003-06-02 22:10 ` Doug Evans
2003-06-02 22:16 ` Doug Evans
2003-06-04 20:27 ` Doug Evans
2003-06-05 11:51 ` Michael Meissner
2003-06-05 13:34 ` Ben Elliston
2003-06-05 15:41 ` Doug Evans
2003-06-05 16:04 ` Doug Evans
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=16091.51685.885875.214781@casey.transmeta.com \
--to=dje@transmeta.com \
--cc=cgen-mail@the-meissners.org \
--cc=cgen@sources.redhat.com \
--cc=fche@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).