If something is impossible, any idea which claims to be for doing that
which is impossible is, by definition, crazy.
Ideas which don't meet this criterion can also be crazy, though, for a
number of other reasons.
I wished to design an ISA with the property that the processor can
quickly decode instructions without reference to preceding
instructions. This is possible, for example, in the case of an ISA
where every instruction is the same length, such as exactly 32 bits
long.
But I also wanted to include instructions with immediate values in
code, because I agreed with Mitch Alsup's claim that this adds
significantly to efficiency.
Concertina II harmonized these conflicting requirements by placing
instructions in 256-bit blocks. Once the block header, if any, is
processed, the processor knows all the places where decoding can begin
in the block. If there is no header, all the instructions are 32 bits
long exactly.
Concertina III, in its present form, begins any 32 bits not to be
decoded as the start of an instruction with a particular bit pattern.
This means that while immediates are allowed, they're not fully
contiguous, they have to be broken up to go around those bit patterns.
I can't have fully contiguous immediates of arbitrary length, and have
a short interval where the instruction stream is scanned for decoding,
if I refuse to allow a fraction of a picowatt to ever be wasted
mistakenly decoding data as an instruction.
But can I at least _approach_ contiguous immediated more closely?
So here's my crazy idea, which is intended to provide the "next best
thing" to fully contiguous immediates.
A 32-bit operate instruction may have an immediate value as an
argument. If so, that immediate will be broken up into 16-bit pieces,
each of which is placed in the rightmost and least significant portion
of one of the subsequent 32-bit words in the instruction stream.
The leftmost and most significant portion of those 32-bit words...
will contain instructions. With special bit patterns starting them,
indicating if they begin or merely continue an instruction, and that
they only fill the first 16 bits of the current 32-bit instruction
word.
This has some wrinkles.
The instructions in the upper 16 bits will be 32 bits long. So I'll
have an odd 16 bits left over if I allow 48-bit immediates to use this
scheme. But I have instructions with 16-bit immediates entirely in the
first 32 bits, so I could use that same scheme to begin a 48-bit
immediate. Except there isn't enough opcode space to use that pattern
a second time...
Also, if I want to use an immediate to load a base register, then I
would have to use a memory-reference instruction immediately
following. This is a problem, because the method of putting
instructions into the first 16 bits only has room for a subset of the
instructions - excluding memory-reference instructions.
One way around that would be to allow an instruction or two to be
inserted between an instruction with an immediate and its immediate
value.
John Savard
Concertina IV: Another Crazy Idea
- From
- quad…@invalid.com (John Savard)
- Organization
- A noiseless patient Spider
- Message-ID
- <6b0d…@news.eternal-september.org>
- Date
- Newsgroups
- comp.arch