public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: "Aurélien Buhrig" <aurelien.buhrig.gcc@gmail.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: cgen <cgen@sourceware.org>
Subject: Re: sid semantic with derived-operands
Date: Tue, 14 Jun 2016 07:53:00 -0000	[thread overview]
Message-ID: <013634f4-5c36-933b-d993-4136a5dbfd45@gmail.com> (raw)
In-Reply-To: <20160607174504.GD28459@redhat.com>

Hi,

Thank you for your answer and sorry for my late reply.

> I have an issue when generating the sid semantic of derived-operands.
>> When printing C code for sid semantic, cgen tries to generate a
>> hardware index (in /gen-hw-index) from a derived ifield, which is not
>> supported by /gen-hw-index.
>> [...]
> Could you share a relevant usable extract of your .cpu file?
> Maybe there is a better way to express what you have in mind.
> The cpu file is quite complex. But I think I found why it is not supported.

One operand (encoded in a 3-bit ifield) encode a reg file. There are 7
registers & 7 possibles values for this operand. For some insns/opcodes,
the 8th encoding is reserved to encode additional operands (exact
operand depends on another opcode).
Without derived operands, it leads to decode ambiguity. When defining a
derived operands with all operands, there are asm/syntax issues, and It
seems also decode issue (i looks like the "impossible" 8th value of the
reg file is not is correctly decoded and is considered as a valid index
for reg file).
So I defined a virtual hardware and an associated operand to describe
the right operand name for the 8th encoding, with the 7 regs. But this
leads to this semantic generation issue ...

I finally found a way to make asm, disassembly, sid decode and sid
semantic to work by creating one operand & virtual hardware per each
ifield encoding. It defines many insns, but there is no more ambiguity.

Thank you for your reply,
Cheers,
Aurélein

      reply	other threads:[~2016-06-14  7:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-02  9:34 Aurelien Buhrig
2016-06-07 17:45 ` Frank Ch. Eigler
2016-06-14  7:53   ` Aurélien Buhrig [this message]

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=013634f4-5c36-933b-d993-4136a5dbfd45@gmail.com \
    --to=aurelien.buhrig.gcc@gmail.com \
    --cc=cgen@sourceware.org \
    --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).