public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: dje@google.com (Doug Evans)
To: cgen@sourceware.org
Subject: CGEN_WIDE_INT_INSN_P?
Date: Sat, 26 Sep 2009 00:50:00 -0000	[thread overview]
Message-ID: <20090926005044.1E975843AC@ruffy.mtv.corp.google.com> (raw)

Hi.

On the opcodes-like size of things,
I remember ages ago talk of not having a choice between representing
instructions as an int or as a byte stream,
and just having a byte stream.

I kinda like using an int for targets where it feels like the
obvious choice (e.g. sparc, etc.).
Wrappers could fold CGEN_INT_INSN_P targets into byte streams.

Well, there are targets that would like to use an int but
32 bits isn't enough and 64 is enough.

Should we add CGEN_WIDE_INSN_INT (or some such)
and allow targets to use that?
[I don't have a strong opinion.  The topic will come up,
so I'd like us to start thinking about it.]

I wouldn't necessarily specify it the following way, but to illustrate:
[from include/opcodes/cgen.h]

typedef unsigned int CGEN_INSN_INT;
typedef mumble_wide_int_mumble CGEN_WIDE_INSN_INT;
#if CGEN_WIDE_INT_INSN_P
typedef CGEN_WIDE_INSN_INT CGEN_INSN_BYTES;
typedef CGEN_WIDE_INSN_INT *CGEN_INSN_BYTES_PTR;
#elif CGEN_INT_INSN_P
typedef CGEN_INSN_INT CGEN_INSN_BYTES;
typedef CGEN_INSN_INT *CGEN_INSN_BYTES_PTR;
#else
typedef unsigned char *CGEN_INSN_BYTES;
typedef unsigned char *CGEN_INSN_BYTES_PTR;
#endif

There'd be ramifications throughout binutils.
Eventually I'd like to rework cgen.h and opcodes support anyway.
Maybe this could be part of that.
[One thing I'd like to do is at least split cgen.h into two
(possibly more) pieces: the parts that are target independent,
and the parts that are target dependent.]

[btw, I don't like the names CGEN_INSN_BYTES{,_PTR} much,
I'd love to change them if a better ones came along.]

             reply	other threads:[~2009-09-26  0:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-26  0:50 Doug Evans [this message]
2009-09-26  1:37 ` CGEN_WIDE_INT_INSN_P? Frank Ch. Eigler
2009-09-26  2:50   ` CGEN_WIDE_INT_INSN_P? 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=20090926005044.1E975843AC@ruffy.mtv.corp.google.com \
    --to=dje@google.com \
    --cc=cgen@sourceware.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).