public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Joern Rennecke <joernr@arc.com>
To: cgen@sources.redhat.com
Subject: CGEN_DIS_HASH: how to get endianness and/or instruction size?
Date: Thu, 25 Jan 2007 14:20:00 -0000	[thread overview]
Message-ID: <20070125142036.GA18395@elsdt-razorfish.arc.com> (raw)

The ARCompact architecture has both 16 and 32 bit opcodes, and each can
take an optional 32 bit immediate.  Moreover, this is a bi-endian
architecture.
So, inside CGEN_DIS_HASH, how can I get the first 16 bits of the instruction,
represented in host byte order?
If I want to dereference the buffer pointer, I need to know the target
endianness.
If I want to use the passed instruction value, I need to know what size it
is.  Note that there are valid 32 bit opcodes which have all upper 16 bits
cleared.
It is also not quite clear if I can use this value if there is a 32 bit
immediate attached to the opcode.

             reply	other threads:[~2007-01-25 14:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-25 14:20 Joern Rennecke [this message]
2007-01-25 15:00 ` Frank Ch. Eigler
2007-01-25 20:30   ` Joern Rennecke
2007-01-25 22:15     ` Frank Ch. Eigler
2007-01-26  1:11 Joern Rennecke
2007-01-26  1:31 ` Frank Ch. Eigler
2007-01-26 11:17 Joern Rennecke

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=20070125142036.GA18395@elsdt-razorfish.arc.com \
    --to=joernr@arc.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).