Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

New systems generate new problems.


devel / comp.arch / Re: Another way of encoding immediates

SubjectAuthor
* Another way of encoding immediatesThomas Koenig
`* Re: Another way of encoding immediatesBGB
 `* Re: Another way of encoding immediatesrobf...@gmail.com
  `* Re: Another way of encoding immediatesBernd Linsel
   `* Re: Another way of encoding immediatesThomas Koenig
    `- Re: Another way of encoding immediatesBGB

1
Another way of encoding immediates

<sf02t0$5i9$1@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19727&group=comp.arch#19727

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd6-3b2f-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Another way of encoding immediates
Date: Wed, 11 Aug 2021 08:48:32 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <sf02t0$5i9$1@newsreader4.netcologne.de>
Injection-Date: Wed, 11 Aug 2021 08:48:32 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd6-3b2f-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd6:3b2f:0:7285:c2ff:fe6c:992d";
logging-data="5705"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Wed, 11 Aug 2021 08:48 UTC

There is an interesging way of encoding immediates in the processor
contained in Helmut Neemann's Digital circuit simulator.

All instructions have 16 bit length, the architecture has 16
registers and a Ra = Ra op Rb scheme, and immediates allow Ra =
Ra op Imm.

The way this is encoded is interesting: All normal opcodes have
the high bit set to zero. An opcode with a leading high bit sets
the low 15 bits of the immediate operand, and the high bit
is encoded in the immediate (load, store, add, ..) instruction.

Example: ADDI R4, 0x1234 is encoded as two words, as 0x9234 0x0b40
where the first word is the constant 0x1234 or 0x8000, 0x0b is
the opcode for "add immediate", 4 is the register number and the
trailing 0 means no high bit; in other instructions, the
second register number would be there.

By comparison, ADDI R4, 0x9234 is encoded as 0x9234 0x0b41,
with the last bit indicating that the high bit on the immediate
operand is set.

In his simple RISC microarchitecture, the instructions with a
leading high bit are actually instructions which load a special
register with the payload, and the "add immediate" uses that as
an operand with the extra bit.

It was jarring at first to see the immediate data preceding the
actual instruction in the binary :-)

Variants are possible, for example extending the number of bits
in the prefix to save opcode space (four bits would be possible
here, five with a 32-register design), specifying which register
would be used as immediate, having a "load immediate data into
temporary register" instruction set a flag so a normal opcode can
be re-used, etc, but I like the general idea, especially since
it does not require a wide fetch (and I am still thinking
abot a 6502 replacement :-)

Comments? Has this been done before? I certainly haven't read
about this previously, and the documentation of the processor in
Digital as a test case is not great, I had to reverse-engineer
this from the translated assembler code.

Re: Another way of encoding immediates

<sf0pdd$ett$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19730&group=comp.arch#19730

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.arch
Subject: Re: Another way of encoding immediates
Date: Wed, 11 Aug 2021 10:12:37 -0500
Organization: A noiseless patient Spider
Lines: 71
Message-ID: <sf0pdd$ett$1@dont-email.me>
References: <sf02t0$5i9$1@newsreader4.netcologne.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 11 Aug 2021 15:12:45 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="55fee7763673b9c41be99ac5a69f1d98";
logging-data="15293"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+y/7S12Bn34HIdwT1nlHsD"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.12.0
Cancel-Lock: sha1:EAsnGuEM7aFe62wc+Dal177eiLk=
In-Reply-To: <sf02t0$5i9$1@newsreader4.netcologne.de>
Content-Language: en-US
 by: BGB - Wed, 11 Aug 2021 15:12 UTC

On 8/11/2021 3:48 AM, Thomas Koenig wrote:
> There is an interesging way of encoding immediates in the processor
> contained in Helmut Neemann's Digital circuit simulator.
>
> All instructions have 16 bit length, the architecture has 16
> registers and a Ra = Ra op Rb scheme, and immediates allow Ra =
> Ra op Imm.
>
> The way this is encoded is interesting: All normal opcodes have
> the high bit set to zero. An opcode with a leading high bit sets
> the low 15 bits of the immediate operand, and the high bit
> is encoded in the immediate (load, store, add, ..) instruction.
>
> Example: ADDI R4, 0x1234 is encoded as two words, as 0x9234 0x0b40
> where the first word is the constant 0x1234 or 0x8000, 0x0b is
> the opcode for "add immediate", 4 is the register number and the
> trailing 0 means no high bit; in other instructions, the
> second register number would be there.
>
> By comparison, ADDI R4, 0x9234 is encoded as 0x9234 0x0b41,
> with the last bit indicating that the high bit on the immediate
> operand is set.
>
> In his simple RISC microarchitecture, the instructions with a
> leading high bit are actually instructions which load a special
> register with the payload, and the "add immediate" uses that as
> an operand with the extra bit.
>
> It was jarring at first to see the immediate data preceding the
> actual instruction in the binary :-)
>
> Variants are possible, for example extending the number of bits
> in the prefix to save opcode space (four bits would be possible
> here, five with a 32-register design), specifying which register
> would be used as immediate, having a "load immediate data into
> temporary register" instruction set a flag so a normal opcode can
> be re-used, etc, but I like the general idea, especially since
> it does not require a wide fetch (and I am still thinking
> abot a 6502 replacement :-)
>
> Comments? Has this been done before? I certainly haven't read
> about this previously, and the documentation of the processor in
> Digital as a test case is not great, I had to reverse-engineer
> this from the translated assembler code.
>

FWIW:
In a smaller / short lived ISA of mine (BSR1, a 32-bit direct
predecessor of BJX2), there were some encodings which split it up like:
First word contains the high 12 bits;
Second work contains the low 4 bits.

This could allow, say:
ADD 0x1234, R7
To be encoded as:
A123 4974

Which would be decoded/executed using 2 cycles.
Though, this was only for certain ops, as opposed to an in-general part
of the instruction encoding.

These encodings were not retained in BJX2, which instead went to 32-bit
ops, eg:
F827_1234

Could have, in theory, designed an ISA where Azzz/Bzzz were interpreted
more like how Jumbo prefixes work in scalar cores, say:
A123 A456 CA78 // ADD 0x12345678, R10

But, alas...

Re: Another way of encoding immediates

<2dc4ac69-d4bf-4793-85f2-eac471f87379n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19783&group=comp.arch#19783

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:138a:: with SMTP id k10mr2078844qki.472.1628859219651;
Fri, 13 Aug 2021 05:53:39 -0700 (PDT)
X-Received: by 2002:a9d:d35:: with SMTP id 50mr1450389oti.22.1628859219368;
Fri, 13 Aug 2021 05:53:39 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Fri, 13 Aug 2021 05:53:39 -0700 (PDT)
In-Reply-To: <sf0pdd$ett$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:fea8:1ddc:ad00:6178:6008:49be:620f;
posting-account=QId4bgoAAABV4s50talpu-qMcPp519Eb
NNTP-Posting-Host: 2607:fea8:1ddc:ad00:6178:6008:49be:620f
References: <sf02t0$5i9$1@newsreader4.netcologne.de> <sf0pdd$ett$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2dc4ac69-d4bf-4793-85f2-eac471f87379n@googlegroups.com>
Subject: Re: Another way of encoding immediates
From: robfi...@gmail.com (robf...@gmail.com)
Injection-Date: Fri, 13 Aug 2021 12:53:39 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: robf...@gmail.com - Fri, 13 Aug 2021 12:53 UTC

On Wednesday, August 11, 2021 at 11:12:48 AM UTC-4, BGB wrote:
> On 8/11/2021 3:48 AM, Thomas Koenig wrote:
> > There is an interesging way of encoding immediates in the processor
> > contained in Helmut Neemann's Digital circuit simulator.
> >
> > All instructions have 16 bit length, the architecture has 16
> > registers and a Ra = Ra op Rb scheme, and immediates allow Ra =
> > Ra op Imm.
> >
> > The way this is encoded is interesting: All normal opcodes have
> > the high bit set to zero. An opcode with a leading high bit sets
> > the low 15 bits of the immediate operand, and the high bit
> > is encoded in the immediate (load, store, add, ..) instruction.
> >
> > Example: ADDI R4, 0x1234 is encoded as two words, as 0x9234 0x0b40
> > where the first word is the constant 0x1234 or 0x8000, 0x0b is
> > the opcode for "add immediate", 4 is the register number and the
> > trailing 0 means no high bit; in other instructions, the
> > second register number would be there.
> >
> > By comparison, ADDI R4, 0x9234 is encoded as 0x9234 0x0b41,
> > with the last bit indicating that the high bit on the immediate
> > operand is set.
> >
> > In his simple RISC microarchitecture, the instructions with a
> > leading high bit are actually instructions which load a special
> > register with the payload, and the "add immediate" uses that as
> > an operand with the extra bit.
> >
> > It was jarring at first to see the immediate data preceding the
> > actual instruction in the binary :-)
> >
> > Variants are possible, for example extending the number of bits
> > in the prefix to save opcode space (four bits would be possible
> > here, five with a 32-register design), specifying which register
> > would be used as immediate, having a "load immediate data into
> > temporary register" instruction set a flag so a normal opcode can
> > be re-used, etc, but I like the general idea, especially since
> > it does not require a wide fetch (and I am still thinking
> > abot a 6502 replacement :-)
> >
> > Comments? Has this been done before? I certainly haven't read
> > about this previously, and the documentation of the processor in
> > Digital as a test case is not great, I had to reverse-engineer
> > this from the translated assembler code.
> >
> FWIW:
> In a smaller / short lived ISA of mine (BSR1, a 32-bit direct
> predecessor of BJX2), there were some encodings which split it up like:
> First word contains the high 12 bits;
> Second work contains the low 4 bits.
>
> This could allow, say:
> ADD 0x1234, R7
> To be encoded as:
> A123 4974
>
> Which would be decoded/executed using 2 cycles.
> Though, this was only for certain ops, as opposed to an in-general part
> of the instruction encoding.
>
> These encodings were not retained in BJX2, which instead went to 32-bit
> ops, eg:
> F827_1234
>
>
> Could have, in theory, designed an ISA where Azzz/Bzzz were interpreted
> more like how Jumbo prefixes work in scalar cores, say:
> A123 A456 CA78 // ADD 0x12345678, R10
>
> But, alas...

I believe this has been done before.
James Bowman’s J1 stack machine used a single bit to indicate immediate literals.
I believe Jan Gray’s xr16 used prefix instructions which are somewhat similar.
Rather than a single bit indicating an immediate prefix, a four-bit code was used.
Using just a single bit consumes 50% of the opcode space for immediates. On a
machine with wider instructions it is possible to use more than one bit to indicate
an immediate and still have an entire immediate coded in only two instructions.
I have used immediate prefixes for ANY1 and other designs. The EXI opcodes
(standing for extended immediate) encode higher order immediate constant bits
for the following instruction.

Re: Another way of encoding immediates

<sf5sog$3nc$1@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19784&group=comp.arch#19784

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2a0a-a544-865-0-3540-2260-6924-ff21.ipv6dyn.netcologne.de!not-for-mail
From: bl1-remo...@gmx.com (Bernd Linsel)
Newsgroups: comp.arch
Subject: Re: Another way of encoding immediates
Date: Fri, 13 Aug 2021 15:40:31 +0200
Organization: news.netcologne.de
Distribution: world
Message-ID: <sf5sog$3nc$1@newsreader4.netcologne.de>
References: <sf02t0$5i9$1@newsreader4.netcologne.de>
<sf0pdd$ett$1@dont-email.me>
<2dc4ac69-d4bf-4793-85f2-eac471f87379n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
Injection-Date: Fri, 13 Aug 2021 13:40:32 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2a0a-a544-865-0-3540-2260-6924-ff21.ipv6dyn.netcologne.de:2a0a:a544:865:0:3540:2260:6924:ff21";
logging-data="3820"; mail-complaints-to="abuse@netcologne.de"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
In-Reply-To: <2dc4ac69-d4bf-4793-85f2-eac471f87379n@googlegroups.com>
 by: Bernd Linsel - Fri, 13 Aug 2021 13:40 UTC

On 13.08.2021 14:53, robf...@gmail.com wrote:
> On Wednesday, August 11, 2021 at 11:12:48 AM UTC-4, BGB wrote:
>
> I believe this has been done before.
> James Bowman’s J1 stack machine used a single bit to indicate immediate literals.
> I believe Jan Gray’s xr16 used prefix instructions which are somewhat similar.
> Rather than a single bit indicating an immediate prefix, a four-bit code was used.
> Using just a single bit consumes 50% of the opcode space for immediates. On a
> machine with wider instructions it is possible to use more than one bit to indicate
> an immediate and still have an entire immediate coded in only two instructions.
> I have used immediate prefixes for ANY1 and other designs. The EXI opcodes
> (standing for extended immediate) encode higher order immediate constant bits
> for the following instruction.
>

That's not very different from the MIPS32 Architecture way of loading
wide immediates:

lui $a0, 0x89aa
addiu $a0, 0xcdef # -> 0x89abcdef

OR
lui $a0, 0x89ab
ori $a0, 0xcdef # -> 0x89abcdef

- MIPS assemblers provides a pseudo-opcode "li reg, imm" that chooses an
optimal instruction sequence (e.g. only loading high 16 bits,
-32768..32767, 32768..65535 etc)

- The linker only supports the addiu form, because the displacement in
load/store instructions is a sign-extended 16-bit-immediate

Admittedly, all in-order MIPS processors didn't combine those two
instructions into a single "load long immediate" operation (but that
should today easily be possible).

Regards
--
Bernd

Re: Another way of encoding immediates

<sf63s9$9ms$1@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19786&group=comp.arch#19786

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd6-3b2f-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: Another way of encoding immediates
Date: Fri, 13 Aug 2021 15:42:01 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <sf63s9$9ms$1@newsreader4.netcologne.de>
References: <sf02t0$5i9$1@newsreader4.netcologne.de>
<sf0pdd$ett$1@dont-email.me>
<2dc4ac69-d4bf-4793-85f2-eac471f87379n@googlegroups.com>
<sf5sog$3nc$1@newsreader4.netcologne.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 13 Aug 2021 15:42:01 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd6-3b2f-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd6:3b2f:0:7285:c2ff:fe6c:992d";
logging-data="9948"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Fri, 13 Aug 2021 15:42 UTC

Bernd Linsel <bl1-removethis@gmx.com> schrieb:
> On 13.08.2021 14:53, robf...@gmail.com wrote:
>> On Wednesday, August 11, 2021 at 11:12:48 AM UTC-4, BGB wrote:
>>
>> I believe this has been done before.
>> James Bowman’s J1 stack machine used a single bit to indicate immediate literals.
>> I believe Jan Gray’s xr16 used prefix instructions which are somewhat similar.
>> Rather than a single bit indicating an immediate prefix, a four-bit code was used.
>> Using just a single bit consumes 50% of the opcode space for immediates. On a
>> machine with wider instructions it is possible to use more than one bit to indicate
>> an immediate and still have an entire immediate coded in only two instructions.
>> I have used immediate prefixes for ANY1 and other designs. The EXI opcodes
>> (standing for extended immediate) encode higher order immediate constant bits
>> for the following instruction.
>>
>
> That's not very different from the MIPS32 Architecture way of loading
> wide immediates:
>
> lui $a0, 0x89aa
> addiu $a0, 0xcdef # -> 0x89abcdef
>
> OR
> lui $a0, 0x89ab
> ori $a0, 0xcdef # -> 0x89abcdef

With the scheme I was discussing, it is also possible to use
the long constant directly in any instruction.

If one wanted to work this out for a 32-bit architecture with 32
registers (5 bits register designator), then it would make sense
to have a four-bit prefix and have the fifth bit selecting between
the first and second operand.

So,

subi $a0, $a1, 0x91234567

could be encoded by the assemmbler as

0xF91234567
subi $a0, $1, 0x09

and

subi $a0, 0x91234567, $a1

as

0xF11234567
subi $a0, 0x09, $a2

so it would save an instruction on an in-order machine.

This would also allow 32-bit branches.

Re: Another way of encoding immediates

<sf68hi$fkq$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19797&group=comp.arch#19797

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.arch
Subject: Re: Another way of encoding immediates
Date: Fri, 13 Aug 2021 12:01:36 -0500
Organization: A noiseless patient Spider
Lines: 120
Message-ID: <sf68hi$fkq$1@dont-email.me>
References: <sf02t0$5i9$1@newsreader4.netcologne.de>
<sf0pdd$ett$1@dont-email.me>
<2dc4ac69-d4bf-4793-85f2-eac471f87379n@googlegroups.com>
<sf5sog$3nc$1@newsreader4.netcologne.de>
<sf63s9$9ms$1@newsreader4.netcologne.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 13 Aug 2021 17:01:38 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="31b55375a95f58d3f44c305fc14e5da9";
logging-data="16026"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ngDSouApSKXzDCHkwyzJr"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.12.0
Cancel-Lock: sha1:oT7ScxSkY7KKAmII/3seoogeS+g=
In-Reply-To: <sf63s9$9ms$1@newsreader4.netcologne.de>
Content-Language: en-US
 by: BGB - Fri, 13 Aug 2021 17:01 UTC

On 8/13/2021 10:42 AM, Thomas Koenig wrote:
> Bernd Linsel <bl1-removethis@gmx.com> schrieb:
>> On 13.08.2021 14:53, robf...@gmail.com wrote:
>>> On Wednesday, August 11, 2021 at 11:12:48 AM UTC-4, BGB wrote:
>>>
>>> I believe this has been done before.
>>> James Bowman’s J1 stack machine used a single bit to indicate immediate literals.
>>> I believe Jan Gray’s xr16 used prefix instructions which are somewhat similar.
>>> Rather than a single bit indicating an immediate prefix, a four-bit code was used.
>>> Using just a single bit consumes 50% of the opcode space for immediates. On a
>>> machine with wider instructions it is possible to use more than one bit to indicate
>>> an immediate and still have an entire immediate coded in only two instructions.
>>> I have used immediate prefixes for ANY1 and other designs. The EXI opcodes
>>> (standing for extended immediate) encode higher order immediate constant bits
>>> for the following instruction.
>>>
>>
>> That's not very different from the MIPS32 Architecture way of loading
>> wide immediates:
>>
>> lui $a0, 0x89aa
>> addiu $a0, 0xcdef # -> 0x89abcdef
>>
>> OR
>> lui $a0, 0x89ab
>> ori $a0, 0xcdef # -> 0x89abcdef
>
> With the scheme I was discussing, it is also possible to use
> the long constant directly in any instruction.
>

This is one nice feature, though spending an entire bit to do so, in the
16-bit encoding space, is a bit steep. You effectively halve the size of
the encoding space.

It would be less steep to effectively load 12 bits at a time, then pull
4 bits from the register field of the following instruction.
One could then have immediate values of, say:
16, 28, 40, 52, 64 bits.

> If one wanted to work this out for a 32-bit architecture with 32
> registers (5 bits register designator), then it would make sense
> to have a four-bit prefix and have the fifth bit selecting between
> the first and second operand.
>

Possibly, could make sense for a 32-bit instruction format.

> So,
>
> subi $a0, $a1, 0x91234567
>
> could be encoded by the assemmbler as
>
> 0xF91234567
> subi $a0, $1, 0x09
>
> and
>
> subi $a0, 0x91234567, $a1
>
> as
>
> 0xF11234567
> subi $a0, 0x09, $a2
>

Hmm, say:
TZnm_ZeoZ //3R
TZnm_Zeii //3RI, Imm9
TZnm_ZeZZ //2R

Where, T:
0/1: Basic Instruction
2/3: Wide (?)
4/5: Pred-True
6/7: Pred-False
8/9: Pred-True, Wide (?)
A/B: Pred-False, Wide (?)
C/D: Imm28 Prefix
E/F: ?

So, say:
Ciii_iiii 0Znm_ZeiZ //3RI, Imm33s

OTOH, one could do this, and make the ISA nominally use 64 GPRs for
everything:
TZnm_eeoZ //3R

Where the 'ee' field adds 2 bits to each register (qqnnmmoo).

> so it would save an instruction on an in-order machine.
>
> This would also allow 32-bit branches.
>

My ISA has Imm33s in 64-bits, though generally by combining a prefix
with 24 payload bits, with an Imm9 instruction. Granted, the space for
Imm9 instructions is a bit smaller than for 3R instructions.

FWIW, I currently have:
20-bit branches, in a 32-bit encoding;
33-bit branches, in a 64-bit encoding.
48-bit absolute branches, in a 64-bit encoding.

I could have had 44-bit relative branches in the encoding, but... this
would have been a bit too expensive.

I don't yet have any binaries which exceed the limits of the 20-bit branch.

For most other cases where one needs a long-distance branch (such as in
a lambda or domain-transfer thunk), the Abs48 encoding actually makes
more sense.

....

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor