public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Dave Brolley <brolley@redhat.com>
To: John Stubley <john.stubley@displaylink.com>
Cc: cgen@sources.redhat.com
Subject: Re: How does CGEN decide what ifields to use for CGEN_IVALUE?
Date: Wed, 14 Jan 2009 18:49:00 -0000	[thread overview]
Message-ID: <496E30B4.7020400@redhat.com> (raw)
In-Reply-To: <C80D565297B59C4F84547B4C30F3BD7B03AC984F@pine.NewnhamResearch.local>

Can you give an example of a set of insns with this problem? I's hard to 
help without seeing the specifics. In general, I've found that 
disassembly problems are usuallu due to incompletely specified insns, 
i.e. not all bits are completely specified in the .cpu file.

Dave

John Stubley wrote:
> Hi,
>
> I am writing a binutils port for our own internal proprietary CPU using
> CGEN.  I am using binutils v2.19 stable and cgen monthly snapshot
> 20081101.
>
> I am seeing some odd behaviour in the disassembly shown by objdump when
> it is analysing the opcodes I am generating using GAS.  In some cases,
> if I change the value of an operand I can cause the disassembler to fail
> to recognise the opcode.
>
> Our instruction packing is quite tight and so some of the operand fields
> overlap with some of the opcode mnemonic fields.  I have tried to define
> the instruction families so that they don't overlap, but I can't quite
> do it.  Ideally, I would like to teach CGEN a simple hierarchy of
> mnemonics so that it can order the opcode table correctly.  However, it
> appears at first instance that there is no way to write the .cpu file to
> give CGEN enough hints.  I assume it has something to do with the
> CGEN_OPCODE_* macros for CGEN_IVALUE in cgen.h.  I have tried setting
> the decode-assist in the define-isa, but this appears to have no effect.
>
> I would appreciate any pointers that you could give me, particularly if
> there is an existing CPU that attempts something similar.
>
> With thanks,
>
> John Stubley
> Development Engineer
> DisplayLink (UK) Limited
>
>   

  reply	other threads:[~2009-01-14 18:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-14 17:09 John Stubley
2009-01-14 18:49 ` Dave Brolley [this message]
2009-01-16  8:36   ` John Stubley
2009-01-22 17:33     ` Dave Brolley
2009-01-23  9:20       ` John Stubley

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=496E30B4.7020400@redhat.com \
    --to=brolley@redhat.com \
    --cc=cgen@sources.redhat.com \
    --cc=john.stubley@displaylink.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).