public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Doug Evans <dje@transmeta.com>
To: Greg McGary <greg@mcgary.org>
Cc: "Frank Ch. Eigler" <fche@redhat.com>, cgen@sourceware.cygnus.com
Subject: Re: defining 2-operand version of 3-operand insns?
Date: Wed, 06 Dec 2000 11:13:00 -0000	[thread overview]
Message-ID: <14894.36845.689253.246266@casey.transmeta.com> (raw)
In-Reply-To: <msy9xzvgrq.fsf@mcgary.org>

Greg McGary writes:
 > > OTOH, I've only seen (f-FIELD VALUE) construct used with
 > > literal VALUE arguments.
 > 
 > That appears to be the limitation.

I believe that's the case.  Supporting non-literal values
is a left-for-later extension.

 > I got this to work by employing a dirty trick.  Fortunately,
 > the dest and src1 operands are contiguous, so I defined a
 > new field that encompasses both, called f-dest2, and used
 > encode/decode magic to propagate:

Another way is to have assembler C code do the duplication.
Define a separate version of the operand used by the 2 operand
version and give it special parse/insert/extract/print handlers
(whatever's necessary - you might be able to get away with just a
special insert handler).

[in a later message]
 > All of the instructions for which I have 2 & 3 operand versions
 > defined as above are excluded from the sim decoder as ambiguous.
 > Since the 2-operand versions are exclusively an assembler-language
 > convenience, they should be ignored from the simulator.
 > Unfortunately, I don't see a `NO-SIM' attribute.  Should I add one, or
 > is there a better way out of this jam?

ALIAS is the NO-SIM attribute you're looking for.
Since this is an assembler side problem I'd prefer to keep it
out of the simulator too.  The ALIAS attribute will do that.

[in another message]
 > Doug, does that sound reasonable to you, or are you philosophically
 > opposed to the entire 2/3 operand insn hack?

I'm not at all opposed to this.  I support it!
[pedantic: as long as it's kept in the assembler side of things and
hacks aren't added to the simulator to support it]

  parent reply	other threads:[~2000-12-06 11:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-01 14:17 Greg McGary
2000-12-01 14:33 ` Frank Ch. Eigler
2000-12-01 15:55   ` Greg McGary
2000-12-06 10:29     ` Greg McGary
2000-12-06 10:40       ` Greg McGary
2000-12-06 10:45         ` Doug Evans
2000-12-06 10:42       ` Frank Ch. Eigler
2000-12-06 11:13     ` Doug Evans [this message]
2000-12-06 11:26       ` Frank Ch. Eigler
2000-12-06 11:51         ` Doug Evans
2000-12-06 11:40       ` Greg McGary

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=14894.36845.689253.246266@casey.transmeta.com \
    --to=dje@transmeta.com \
    --cc=cgen@sourceware.cygnus.com \
    --cc=fche@redhat.com \
    --cc=greg@mcgary.org \
    /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).