From: "Jose E. Marchesi" <jemarch@gnu.org>
To: Sergey Belyashov via Cgen <cgen@sourceware.org>
Cc: "Frank Ch. Eigler" <fche@redhat.com>,
Sergey Belyashov <sergey.belyashov@gmail.com>
Subject: Re: BUG: non-fixed-length ISAs are unsupported for now
Date: Mon, 27 Apr 2020 20:03:33 +0200 [thread overview]
Message-ID: <87pnbsztze.fsf@gnu.org> (raw)
In-Reply-To: <CAOe0RDx2ppy3fqVTyWpEaVpXK-PvKeJNMEc4tKtPhqtKcmdUCA@mail.gmail.com> (Sergey Belyashov via Cgen's message of "Mon, 27 Apr 2020 20:00:07 +0300")
Z80 has istructions from 1 byte (nop for example) up to 4 bytes long (eZ80
up to 6 bytes) including operands 0..2 bytes (eZ80 0..3 bytes). So
base-insn-bitsize is set to 8. And it is not enought for 1-3 bytes (eZ80
1-4) insn code size (w/o immediate operands).
Then your base-insn-bitsize should be 8.
The key here is: how are opcodes expressed in your ISA? Do they appear
in the first base insn only, or they are scattered in the optional bytes
in long instructions?
CGEN currently has two limitations in its implementation:
1) It does not support having opcodes (i.e. entries of the form (f-FOO
VAL) in (+ ) field descriptions) past the first 64 bits of an
instruction.
2) It does not support to have opcode fields placed in their own word.
These limitations have bitten me in the BPF port and, at the moment, I
have a couple of workarounds in place, but it would be nice to remove
them.
For an example of an instruction set with variable length instructions
see cpu/ia32.cpu in the CGEN distribution for an example of
variable-length instruction set. However, the "FIXME" annotations in
instructions that (f-reg/opcode 0) are most probably there because that
opcode field is not applied properly, since it is defined to be in the
second word of the instruction (limitation (2) above.)
next prev parent reply other threads:[~2020-04-27 18:03 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-23 13:37 Sergey Belyashov
2020-04-27 16:29 ` Frank Ch. Eigler
2020-04-27 17:00 ` Sergey Belyashov
2020-04-27 17:52 ` Sergey Belyashov
2020-04-27 18:03 ` Jose E. Marchesi [this message]
2020-04-27 19:34 ` Sergey Belyashov
2020-04-27 20:01 ` Jose E. Marchesi
2020-04-27 20:23 ` Sergey Belyashov
2020-04-29 19:11 ` Sergey Belyashov
2020-07-30 9:11 ` Sergey Belyashov
2020-08-11 15:38 ` Frank Ch. Eigler
2020-08-11 15:57 ` Sergey Belyashov
2020-08-11 16:08 ` Frank Ch. Eigler
2020-08-12 13:59 ` Sergey Belyashov
2020-08-12 18:36 ` Frank Ch. Eigler
2020-08-12 18:53 ` Jose E. Marchesi
2020-08-12 19:19 ` Sergey Belyashov
2020-08-12 19:21 ` Frank Ch. Eigler
2020-08-12 19:27 ` Jose E. Marchesi
2020-08-12 19:44 ` Sergey Belyashov
2020-08-12 19:57 ` Frank Ch. Eigler
2020-08-13 13:34 ` Sergey Belyashov
2020-08-13 14:32 ` Frank Ch. Eigler
2020-08-13 14:47 ` Sergey Belyashov
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=87pnbsztze.fsf@gnu.org \
--to=jemarch@gnu.org \
--cc=cgen@sourceware.org \
--cc=fche@redhat.com \
--cc=sergey.belyashov@gmail.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).