From: Dave Brolley <brolley@redhat.com>
To: Ronald Hecht <ronald.hecht@uni-rostock.de>
Cc: cgen@sourceware.org
Subject: Re: Simulator: base_insn and insn in decode.c
Date: Mon, 14 Aug 2006 21:19:00 -0000 [thread overview]
Message-ID: <44E0E8BE.5010100@redhat.com> (raw)
In-Reply-To: <44D7549A.7000201@uni-rostock.de>
Ronald Hecht wrote:
> I switched to the SID framework. I found it easier to create a new
> target. The disassemby works better as it calls this disassembler code
> in src/opcodes. But I'm still in trouble with decode.cxx. It looks the
> same as in sim. I'n my opinion the entire_insn should alwasy be left
> aligned and not right_aligned as it is now. Base_insn should have the
> same alignment. I think this way it is easier to support variable
> sized instructions.
>
I've been looking at what other ports do and it seems that most are able
to pass the same value base_insn and entire_insn because the opcode bits
are scattered throughout the insns. The ones which aren't so lucky do
one of two things:
1) Write some ugly code which examines the base_insn bits in order to
decide how to position entire_insn.
2) Set base-insn-bitsize in the define-isa of the .cpu file to be the
size of the largest insn. For SID, base_insn and entire_insn can then be
passed identically as the insn bits aligned at the 'base-insn-bitsize'
bit. For example, in your case, the max insn length appears to be 24, so
you could simply read 3 bytes individually (to avoid endianness
problems) and place them sequentially in the low order bytes of
base_insn and entire_insn.
Barring some redesign of the interface as has been discussed, I don't
see any other options for you.
Dave
next prev parent reply other threads:[~2006-08-14 21:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-31 11:58 Ronald Hecht
2006-08-03 21:55 ` Dave Brolley
2006-08-03 22:08 ` Dave Brolley
2006-08-07 14:39 ` Ronald Hecht
2006-08-07 14:53 ` Ronald Hecht
2006-08-14 21:19 ` Dave Brolley [this message]
2006-08-15 8:39 ` Ronald Hecht
2006-08-04 8:51 ` Ronald Hecht
2006-08-14 20:34 ` 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=44E0E8BE.5010100@redhat.com \
--to=brolley@redhat.com \
--cc=cgen@sourceware.org \
--cc=ronald.hecht@uni-rostock.de \
/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).