public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: "Frank Ch. Eigler" <fche@redhat.com>
To: Jie Zhang <jzhang918@hotmail.com>
Cc: cgen@sources.redhat.com
Subject: Re: Require some enhancement in CGEN for decoder of disassember
Date: Fri, 22 Nov 2002 13:12:00 -0000	[thread overview]
Message-ID: <20021122161158.C1160@redhat.com> (raw)
In-Reply-To: <DAV29qgES6IGIkzryYJ00009cfe@hotmail.com>; from jzhang918@hotmail.com on Thu, Nov 21, 2002 at 11:59:13AM +0800

Hi -

On Thu, Nov 21, 2002 at 11:59:13AM +0800, Jie Zhang wrote:
> I encounter a problem when I'm using CGEN to port binutils.
> In my target, there is a rather strange 4-bit field.
> There are two insns, A and B. This field is operand in insn A,
> but opcode for insn B.
> [...]
> In insn A, the value of the operand can range from 0 through 14.
> If this field is 15, then the insn is B.
> [...]

One way to model this with CGEN is to act like the operand/opcode
field is opcode only, by replicating instruction A 15 times, each
with a different value (0..14) for the problematic field.  You
might also need some custom operand parsers to assert that each
variant of A will match only if the given logical operand matches
the actual one.

If the only piece of the toolchain producing incorrect behavior is
the disassembler, you may also be able to make it work by turning
off disassembly hashing (#define CGEN_DIS_HASH(buf,value) 0).


- FChE

  reply	other threads:[~2002-11-22 21:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-20 19:59 Jie Zhang
2002-11-22 13:12 ` Frank Ch. Eigler [this message]
2002-11-24 19:14   ` Jie Zhang
2002-11-24 21:08     ` Doug Evans
2002-11-26  0:48       ` Jie Zhang
2002-11-26 23:47 ` Jie Zhang

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=20021122161158.C1160@redhat.com \
    --to=fche@redhat.com \
    --cc=cgen@sources.redhat.com \
    --cc=jzhang918@hotmail.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).