This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
anonymous ifields
- To: cgen at sources dot redhat dot com
- Subject: anonymous ifields
- From: Ben Elliston <bje at redhat dot com>
- Date: Thu, 15 Mar 2001 20:46:21 +1100 (EST)
Frequently, when writing CGEN descriptions, an ISA contains many small
instruction fields (usually three bits or less) that are bound to
particular values in the instruction format field. Here is an example
in which `f-1' and `f-0' have no purpose other than to hold values
which assist in decoding the instruction:
(+ OP_10 rm rn rd (f-func 10) (f-1 1) (f-0 1))
In my current port, I have at least a dozen instruction fields defined
at the top of the description of the form `f-N' which are single bit
ifields. They clutter the description and add no useful
information--unlike `f-func' in my example--which might represent an
ALU function code.
I would like to propose an extension to the description language so
that anonymous ifields can be placed in the format string. I had the
following in mind:
(+ OP_10 rm rn rd (f-func 10) (@1 1) (@0 1))
Or, since these two form a contiguous range of bits:
(+ OP_10 rm rn rd (f-func 10) (@1:0 3))
I'm not too attached to the syntax -- most anything could suffice.
Thoughts? Comments?
Ben