public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: "Michael Chapman" <Michael.Chapman@synopsys.com>
To: "Frank Ch. Eigler" <fche@redhat.com>,
	"Michael Chapman" <Michael.Chapman@synopsys.COM>
Cc: <cgen@sources.redhat.com>
Subject: RE: Weirdness in disassembly
Date: Fri, 27 Sep 2002 08:02:00 -0000	[thread overview]
Message-ID: <NEBBIAJILEHBJOLKLAGOGEFNCIAA.michaelc@synopsys.com> (raw)
In-Reply-To: <20020927105052.B17426@redhat.com>

Hi,

That was a quick answer!

No - there are no fixed bit patterns in the second 16 bits.
They are just used for offsets or absolute addresses.

Everything is little endian.

I just changed what you said - it does not seemt to change
anything - (yes I regenerated the files!) 

It is true a haven't really
understood what the lengths really all mean. I have at the
moment:-

(define-isa
  ; Name of the ISA.
  (name dw32)
  (comment "Basic DW32 instruction set")
  
  ; (Size of unknown instructions)
  (default-insn-word-bitsize 16)

  ; Shortest instruction is 16 bits
  (default-insn-bitsize 16)
  (base-insn-bitsize 32)
)

Any more ideas?

Mike


-----Original Message-----
From: Frank Ch. Eigler [mailto:fche@redhat.com]
Sent: Friday, 27 September, 2002 16:51
To: Michael Chapman
Cc: cgen@sources.redhat.com
Subject: Re: Weirdness in disassembly


Hi -

On Fri, Sep 27, 2002 at 04:46:42PM +0200, Michael Chapman wrote:
> I have just started out to experiment with cgen.

Welcome!

> I have instructions which are 16 and 32 bits long.
> The assembler generates the right instructions with
> the right lengths. [...]

The choice of parameters in the define-isa clause is crucial
for variable-length instruction sets.  If any of your 32-bit
instructions contain any fixed bit patterns in the second 16
bits, you need to set "base-insn-bitsize 32", since opcodes/simulators
will need to fetch 32 bits to uniquely identify a cgen-level
instruction.  Setting that to 16 could explain what you're seeing.


- FChE

  reply	other threads:[~2002-09-27 15:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-27  7:46 Michael Chapman
2002-09-27  7:50 ` Frank Ch. Eigler
2002-09-27  8:02   ` Michael Chapman [this message]
     [not found] <NEBBIAJILEHBJOLKLAGOOEFNCIAA.michaelc@synopsys.com>
     [not found] ` <NEBBIAJILEHBJOLKLAGOEEFOCIAA.michaelc@synopsys.com>
2002-09-27  8:41   ` Frank Ch. Eigler

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=NEBBIAJILEHBJOLKLAGOGEFNCIAA.michaelc@synopsys.com \
    --to=michael.chapman@synopsys.com \
    --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).