Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

6 May, 2024: The networking issue during the past two days has been identified and may be fixed. Will keep monitoring.


devel / comp.arch / 34 bit instructions

SubjectAuthor
* 34 bit instructionsrobf...@gmail.com
+* Re: 34 bit instructionsQuadibloc
|`* Re: 34 bit instructionsQuadibloc
| +* Re: 34 bit instructionsrobf...@gmail.com
| |`* Re: 34 bit instructionsQuadibloc
| | `- Re: 34 bit instructionsMitchAlsup
| `* Re: 34 bit instructionsMitchAlsup
|  `* Re: 34 bit instructionsQuadibloc
|   +* Re: 34 bit instructionsMitchAlsup
|   |`* Re: 34 bit instructionsQuadibloc
|   | +- Re: 34 bit instructionsQuadibloc
|   | `* Re: 34 bit instructionsMitchAlsup
|   |  `* Re: 34 bit instructionsQuadibloc
|   |   +* Re: 34 bit instructionsMitchAlsup
|   |   |`* Re: 34 bit instructionsQuadibloc
|   |   | `* Re: 34 bit instructionsMitchAlsup
|   |   |  `* Re: 34 bit instructionsQuadibloc
|   |   |   `* Re: 34 bit instructionsMitchAlsup
|   |   |    +- Re: 34 bit instructionsQuadibloc
|   |   |    `* Re: 34 bit instructionsStefan Monnier
|   |   |     `* Re: 34 bit instructionsluke.l...@gmail.com
|   |   |      +- Re: 34 bit instructionsMitchAlsup
|   |   |      +* Re: 34 bit instructionsMitchAlsup
|   |   |      |`* Re: 34 bit instructionsQuadibloc
|   |   |      | +* Re: 34 bit instructionsMitchAlsup
|   |   |      | |`- Re: 34 bit instructionsThomas Koenig
|   |   |      | `* Re: 34 bit instructionsQuadibloc
|   |   |      |  `- Re: 34 bit instructionsEricP
|   |   |      `- Re: 34 bit instructionsThomas Koenig
|   |   `- Re: 34 bit instructionsThomas Koenig
|   `- Re: 34 bit instructionsQuadibloc
+* Re: 34 bit instructionsTheo
|`- Re: 34 bit instructionsrobf...@gmail.com
`* Re: 34 bit instructionsMitchAlsup
 `* Re: 34 bit instructionsQuadibloc
  `* Re: 34 bit instructionsTheo
   +- Re: 34 bit instructionsMitchAlsup
   `* Re: 34 bit instructionsIvan Godard
    +* Re: 34 bit instructionsQuadibloc
    |+* Re: 34 bit instructionsBGB
    ||`* Re: 34 bit instructionsrobf...@gmail.com
    || `* Re: 34 bit instructionsStephen Fuld
    ||  +- Re: 34 bit instructionsMitchAlsup
    ||  `* Re: 34 bit instructionsrobf...@gmail.com
    ||   +- Re: 34 bit instructionsMitchAlsup
    ||   `* Re: 34 bit instructionsStephen Fuld
    ||    `* Re: 34 bit instructionsEricP
    ||     `* Re: 34 bit instructionsMitchAlsup
    ||      +- Re: 34 bit instructionsrobf...@gmail.com
    ||      `* Re: 34 bit instructionsQuadibloc
    ||       `* Re: 34 bit instructionsJiri Moravec
    ||        `* Re: 34 bit instructionsrobf...@gmail.com
    ||         +* Re: 34 bit instructionsMitchAlsup
    ||         |`- Re: 34 bit instructionsrobf...@gmail.com
    ||         `* Re: 34 bit instructionsKent Dickey
    ||          `* Re: 34 bit instructionsrobf...@gmail.com
    ||           +* Re: 34 bit instructionsQuadibloc
    ||           |`* Re: 34 bit instructionsQuadibloc
    ||           | `* Re: 34 bit instructionsrobf...@gmail.com
    ||           |  +- Re: 34 bit instructionsQuadibloc
    ||           |  `- Re: 34 bit instructionsJimBrakefield
    ||           +- Re: 34 bit instructionsMarcus
    ||           `* Re: 34 bit instructionsMitchAlsup
    ||            `* Re: 34 bit instructionsQuadibloc
    ||             `* Re: 34 bit instructionsMitchAlsup
    ||              `* Re: 34 bit instructionsrobf...@gmail.com
    ||               `* Re: 34 bit instructionsMitchAlsup
    ||                `* Re: 34 bit instructionsPaul A. Clayton
    ||                 `- Re: 34 bit instructionsMitchAlsup
    |`* Re: 34 bit instructionsQuadibloc
    | `- Re: 34 bit instructionsBGB
    `* Re: 34 bit instructionsTheo
     `* Re: 34 bit instructionsQuadibloc
      `* Re: 34 bit instructionsTheo
       +- Re: 34 bit instructionsQuadibloc
       `* Re: 34 bit instructionsTerje Mathisen
        `- Re: 34 bit instructionsrobf...@gmail.com

Pages:1234
34 bit instructions

<54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:6214:162a:: with SMTP id e10mr4526700qvw.49.1623914510449;
Thu, 17 Jun 2021 00:21:50 -0700 (PDT)
X-Received: by 2002:a05:6830:1bf7:: with SMTP id k23mr3419075otb.206.1623914510207;
Thu, 17 Jun 2021 00:21:50 -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: Thu, 17 Jun 2021 00:21:49 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2607:fea8:1de1:d400:99d4:2cca:bd37:1c8e;
posting-account=QId4bgoAAABV4s50talpu-qMcPp519Eb
NNTP-Posting-Host: 2607:fea8:1de1:d400:99d4:2cca:bd37:1c8e
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
Subject: 34 bit instructions
From: robfi...@gmail.com (robf...@gmail.com)
Injection-Date: Thu, 17 Jun 2021 07:21:50 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: robf...@gmail.com - Thu, 17 Jun 2021 07:21 UTC

Experimenting with 34-bit instructions for ANY1 and looking for caveats.
15 34-bit instructions fit into a 512-bit cache line nicely with only two unused bits. It is not too bad to get the hardware implemented for 34-bits. I had changes done in about an hour. It is a 15-to-1 34-bit wide mux from the cache line to extract an instruction. Very similar to a 32-bit instruction. For addressing, we pretend that the IP is addressing 32-bit words. It only makes a difference for the last instruction on a cache line which is not present, so the IP increment skips over that word while incrementing. The hardware part seems easy, but the software is a bit more challenging. Assembling programs takes a bit of work.

Re: 34 bit instructions

<3bead7c5-3e63-4bba-a03e-f6ddbedcb8ffn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ae9:e8d2:: with SMTP id a201mr2783280qkg.98.1623921018590;
Thu, 17 Jun 2021 02:10:18 -0700 (PDT)
X-Received: by 2002:a05:6830:3089:: with SMTP id f9mr3643334ots.276.1623921018361;
Thu, 17 Jun 2021 02:10:18 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Thu, 17 Jun 2021 02:10:18 -0700 (PDT)
In-Reply-To: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:56a:f8e3:d700:1dca:572a:6fdb:bade;
posting-account=1nOeKQkAAABD2jxp4Pzmx9Hx5g9miO8y
NNTP-Posting-Host: 2001:56a:f8e3:d700:1dca:572a:6fdb:bade
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3bead7c5-3e63-4bba-a03e-f6ddbedcb8ffn@googlegroups.com>
Subject: Re: 34 bit instructions
From: jsav...@ecn.ab.ca (Quadibloc)
Injection-Date: Thu, 17 Jun 2021 09:10:18 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 10
 by: Quadibloc - Thu, 17 Jun 2021 09:10 UTC

On Thursday, June 17, 2021 at 1:21:51 AM UTC-6, robf...@gmail.com wrote:
> 15 34-bit instructions fit into a 512-bit cache line nicely with only two unused bits.

That makes sense, because 512 is equal to two plus 17 times 30. Or 34 times 15.

In Concertina II, I've been working with 34-bit instructions myself, but since they're
one of several alternatives within an elaborate header structure, based on blocks
of 256 bits in length, it is less efficient. I do have one efficient choice where there are
four unused bits, plus seven 36-bit instructions. Or fourteen 18-bit instructions.

John Savard

Re: 34 bit instructions

<xXB*grTmy@news.chiark.greenend.org.uk>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!paganini.bofh.team!newsfeed.xs3.de!nntp-feed.chiark.greenend.org.uk!ewrotcd!.POSTED!not-for-mail
From: theom+n...@chiark.greenend.org.uk (Theo)
Newsgroups: comp.arch
Subject: Re: 34 bit instructions
Date: 17 Jun 2021 14:41:47 +0100 (BST)
Organization: University of Cambridge, England
Lines: 23
Message-ID: <xXB*grTmy@news.chiark.greenend.org.uk>
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
NNTP-Posting-Host: chiark.greenend.org.uk
X-Trace: chiark.greenend.org.uk 1623937309 6534 212.13.197.229 (17 Jun 2021 13:41:49 GMT)
X-Complaints-To: abuse@chiark.greenend.org.uk
NNTP-Posting-Date: Thu, 17 Jun 2021 13:41:49 +0000 (UTC)
User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (Linux/3.16.0-7-amd64 (x86_64))
Originator: theom@chiark.greenend.org.uk ([212.13.197.229])
 by: Theo - Thu, 17 Jun 2021 13:41 UTC

robf...@gmail.com <robfi680@gmail.com> wrote:
> 15 34-bit instructions fit into a 512-bit cache line nicely with only two
> unused bits. It is not too bad to get the hardware implemented for
> 34-bits. I had changes done in about an hour. It is a 15-to-1 34-bit
> wide mux from the cache line to extract an instruction. Very similar to a
> 32-bit instruction. For addressing, we pretend that the IP is addressing
> 32-bit words. It only makes a difference for the last instruction on a
> cache line which is not present, so the IP increment skips over that word
> while incrementing. The hardware part seems easy, but the software is a
> bit more challenging. Assembling programs takes a bit of work.

I suppose the question is: do you force 512 bit alignment and where does
that not make sense?

For example, how does the program counter work - do you perform a rounding
operation such that base+4 is assumed to be the address really starting at
base+4.25? Are there instances where the ambiguity between a PC of +4 (ie
+4.25) and a data pointer of +4 (ie +4.0) gets you into trouble?

What happens if you have to relocate code? For example when linking do you
end up with lots of basic blocks that are force-aligned to 512 bits?

Theo

Re: 34 bit instructions

<f50ecd51-5d51-4dec-965b-f1714172041cn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a0c:d68f:: with SMTP id k15mr22843qvi.14.1623939470183;
Thu, 17 Jun 2021 07:17:50 -0700 (PDT)
X-Received: by 2002:a9d:7f8f:: with SMTP id t15mr4566547otp.329.1623939469963;
Thu, 17 Jun 2021 07:17:49 -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: Thu, 17 Jun 2021 07:17:49 -0700 (PDT)
In-Reply-To: <xXB*grTmy@news.chiark.greenend.org.uk>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:fea8:1de1:d400:2cd8:3c91:a0f4:5ee3;
posting-account=QId4bgoAAABV4s50talpu-qMcPp519Eb
NNTP-Posting-Host: 2607:fea8:1de1:d400:2cd8:3c91:a0f4:5ee3
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com> <xXB*grTmy@news.chiark.greenend.org.uk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f50ecd51-5d51-4dec-965b-f1714172041cn@googlegroups.com>
Subject: Re: 34 bit instructions
From: robfi...@gmail.com (robf...@gmail.com)
Injection-Date: Thu, 17 Jun 2021 14:17:50 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: robf...@gmail.com - Thu, 17 Jun 2021 14:17 UTC

On Thursday, June 17, 2021 at 9:41:51 AM UTC-4, Theo wrote:
> robf...@gmail.com <robf...@gmail.com> wrote:
> > 15 34-bit instructions fit into a 512-bit cache line nicely with only two
> > unused bits. It is not too bad to get the hardware implemented for
> > 34-bits. I had changes done in about an hour. It is a 15-to-1 34-bit
> > wide mux from the cache line to extract an instruction. Very similar to a
> > 32-bit instruction. For addressing, we pretend that the IP is addressing
> > 32-bit words. It only makes a difference for the last instruction on a
> > cache line which is not present, so the IP increment skips over that word
> > while incrementing. The hardware part seems easy, but the software is a
> > bit more challenging. Assembling programs takes a bit of work.
> I suppose the question is: do you force 512 bit alignment and where does
> that not make sense?
>
> For example, how does the program counter work - do you perform a rounding
> operation such that base+4 is assumed to be the address really starting at
> base+4.25? Are there instances where the ambiguity between a PC of +4 (ie
> +4.25) and a data pointer of +4 (ie +4.0) gets you into trouble?
>
> What happens if you have to relocate code? For example when linking do you
> end up with lots of basic blocks that are force-aligned to 512 bits?
>
> Theo

Just thinking about this some more, it may be easier to have bit-pair addressable memory rather than forcing 512-bit alignment. It makes the cache more interesting, but it gets rid of several other issues. This would really affect the branch instructions because there is only a 10-bit displacement field. Still 8 whole bits is probably enough 90% of the time. Branches can also have a modifier that adds 12 more displacement bits. So, it could be spit out all the time and left to the linker to compress. Ambiguity between the IP and data pointers could be resolved with bit-pair addressable memory. For data, the fractional portion of the address would always be zero. Unless trying to reference an instruction. With a 64-bit machine it is probably okay to use two address bits to represent a bit-pair address.

Re: 34 bit instructions

<8c210baf-aa34-4380-8026-9a874d8ca6c6n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:1117:: with SMTP id o23mr4390373qkk.225.1623942727588; Thu, 17 Jun 2021 08:12:07 -0700 (PDT)
X-Received: by 2002:aca:650b:: with SMTP id m11mr3617473oim.99.1623942727376; Thu, 17 Jun 2021 08:12:07 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!tr2.eu1.usenetexpress.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Thu, 17 Jun 2021 08:12:07 -0700 (PDT)
In-Reply-To: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:3d96:df7c:31b3:6d42; posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:3d96:df7c:31b3:6d42
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8c210baf-aa34-4380-8026-9a874d8ca6c6n@googlegroups.com>
Subject: Re: 34 bit instructions
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Thu, 17 Jun 2021 15:12:07 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 15
 by: MitchAlsup - Thu, 17 Jun 2021 15:12 UTC

On Thursday, June 17, 2021 at 2:21:51 AM UTC-5, robf...@gmail.com wrote:
> Experimenting with 34-bit instructions for ANY1 and looking for caveats.
<
I have come to the conclusion that the ideal size for RISC-like ISAs with 32 registers is 36-bits.
<
> 15 34-bit instructions fit into a 512-bit cache line nicely with only two unused bits. It is not too bad to get the hardware implemented for 34-bits.. I had changes done in about an hour. It is a 15-to-1 34-bit wide mux from the cache line to extract an instruction. Very similar to a 32-bit instruction. For addressing, we pretend that the IP is addressing 32-bit words. It only makes a difference for the last instruction on a cache line which is not present, so the IP increment skips over that word while incrementing. The hardware part seems easy, but the software is a bit more challenging. Assembling programs takes a bit of work.

Re: 34 bit instructions

<a745390f-0785-407a-a4fd-81b9f3cbb3b1n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:6214:2aa1:: with SMTP id js1mr722272qvb.11.1623946722815;
Thu, 17 Jun 2021 09:18:42 -0700 (PDT)
X-Received: by 2002:a05:6830:711:: with SMTP id y17mr5507023ots.5.1623946722574;
Thu, 17 Jun 2021 09:18:42 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Thu, 17 Jun 2021 09:18:42 -0700 (PDT)
In-Reply-To: <8c210baf-aa34-4380-8026-9a874d8ca6c6n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:56a:f8e3:d700:9d3b:eb08:6be5:9836;
posting-account=1nOeKQkAAABD2jxp4Pzmx9Hx5g9miO8y
NNTP-Posting-Host: 2001:56a:f8e3:d700:9d3b:eb08:6be5:9836
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com> <8c210baf-aa34-4380-8026-9a874d8ca6c6n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a745390f-0785-407a-a4fd-81b9f3cbb3b1n@googlegroups.com>
Subject: Re: 34 bit instructions
From: jsav...@ecn.ab.ca (Quadibloc)
Injection-Date: Thu, 17 Jun 2021 16:18:42 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1575
 by: Quadibloc - Thu, 17 Jun 2021 16:18 UTC

On Thursday, June 17, 2021 at 9:12:08 AM UTC-6, MitchAlsup wrote:

> I have come to the conclusion that the ideal size for RISC-like ISAs with 32 registers is 36-bits.

I'm inclined to agree. However, Concertina II is (or at least includes) an attempt to live with 32 bits,
even if it is less than ideal. But it offers more as an alternative, as well.

John Savard

Re: 34 bit instructions

<uXB*96Tmy@news.chiark.greenend.org.uk>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!nntp.terraraq.uk!nntp-feed.chiark.greenend.org.uk!ewrotcd!.POSTED!not-for-mail
From: theom+n...@chiark.greenend.org.uk (Theo)
Newsgroups: comp.arch
Subject: Re: 34 bit instructions
Date: 17 Jun 2021 17:40:20 +0100 (BST)
Organization: University of Cambridge, England
Lines: 24
Message-ID: <uXB*96Tmy@news.chiark.greenend.org.uk>
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com> <8c210baf-aa34-4380-8026-9a874d8ca6c6n@googlegroups.com> <a745390f-0785-407a-a4fd-81b9f3cbb3b1n@googlegroups.com>
NNTP-Posting-Host: chiark.greenend.org.uk
X-Trace: chiark.greenend.org.uk 1623948022 7325 212.13.197.229 (17 Jun 2021 16:40:22 GMT)
X-Complaints-To: abuse@chiark.greenend.org.uk
NNTP-Posting-Date: Thu, 17 Jun 2021 16:40:22 +0000 (UTC)
User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (Linux/3.16.0-7-amd64 (x86_64))
Originator: theom@chiark.greenend.org.uk ([212.13.197.229])
 by: Theo - Thu, 17 Jun 2021 16:40 UTC

Quadibloc <jsavard@ecn.ab.ca> wrote:
> On Thursday, June 17, 2021 at 9:12:08 AM UTC-6, MitchAlsup wrote:
>
> > I have come to the conclusion that the ideal size for RISC-like ISAs with 32 registers is 36-bits.
>
> I'm inclined to agree. However, Concertina II is (or at least includes) an attempt to live with 32 bits,
> even if it is less than ideal. But it offers more as an alternative, as well.

A slightly offbeat suggestion might be to keep the in-memory representation
of instructions to be 32 bits, but have the extra bits in a shadow space
somehow. For example you could have instructions at n, n+4, n+8 and so on.
And then the other 4 bits of the instructions live at m, m+0.5, m+1, etc.

PC still refers to n so branching etc are all fine, but there's implicit
behaviour that changing n also changes m in some relation. For example you
could declare m=n+4GB so that loading a program means populating 32 bits of
instructions around PC and then populating the remaining bits at 4GB+PC/4.
You would likely do some page table work to map in pages into both spaces at
the same time when you load binaries.

Lots of ways this could get exciting, not least atomicity. But it might be
feasible to make this work with enough effort.

Theo

Re: 34 bit instructions

<e36ba08d-d741-4a6d-a257-3d5a2a6f99cbn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:6214:e4d:: with SMTP id o13mr743334qvc.19.1623948601360; Thu, 17 Jun 2021 09:50:01 -0700 (PDT)
X-Received: by 2002:a05:6830:33ea:: with SMTP id i10mr5279416otu.342.1623948601088; Thu, 17 Jun 2021 09:50:01 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!tr2.eu1.usenetexpress.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Thu, 17 Jun 2021 09:50:00 -0700 (PDT)
In-Reply-To: <uXB*96Tmy@news.chiark.greenend.org.uk>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:3d96:df7c:31b3:6d42; posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:3d96:df7c:31b3:6d42
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com> <8c210baf-aa34-4380-8026-9a874d8ca6c6n@googlegroups.com> <a745390f-0785-407a-a4fd-81b9f3cbb3b1n@googlegroups.com> <uXB*96Tmy@news.chiark.greenend.org.uk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e36ba08d-d741-4a6d-a257-3d5a2a6f99cbn@googlegroups.com>
Subject: Re: 34 bit instructions
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Thu, 17 Jun 2021 16:50:01 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 29
 by: MitchAlsup - Thu, 17 Jun 2021 16:50 UTC

On Thursday, June 17, 2021 at 11:40:24 AM UTC-5, Theo wrote:
> Quadibloc <jsa...@ecn.ab.ca> wrote:
> > On Thursday, June 17, 2021 at 9:12:08 AM UTC-6, MitchAlsup wrote:
> >
> > > I have come to the conclusion that the ideal size for RISC-like ISAs with 32 registers is 36-bits.
> >
> > I'm inclined to agree. However, Concertina II is (or at least includes) an attempt to live with 32 bits,
> > even if it is less than ideal. But it offers more as an alternative, as well.
> A slightly offbeat suggestion might be to keep the in-memory representation
> of instructions to be 32 bits, but have the extra bits in a shadow space
> somehow. For example you could have instructions at n, n+4, n+8 and so on.
> And then the other 4 bits of the instructions live at m, m+0.5, m+1, etc.
<
That is basically what I do in My 66000 with CARRY and PRED instruction-modifiers.
<
low end machines can execute these instructions, higher end machines take
the semantic contents of these and "decorate" instructions in their shadows
so that both sets of semantics are performed in a single calculation.
>
> PC still refers to n so branching etc are all fine, but there's implicit
> behaviour that changing n also changes m in some relation. For example you
> could declare m=n+4GB so that loading a program means populating 32 bits of
> instructions around PC and then populating the remaining bits at 4GB+PC/4.
> You would likely do some page table work to map in pages into both spaces at
> the same time when you load binaries.
>
> Lots of ways this could get exciting, not least atomicity. But it might be
> feasible to make this work with enough effort.
>
> Theo

Re: 34 bit instructions

<sag0t6$rhb$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: iva...@millcomputing.com (Ivan Godard)
Newsgroups: comp.arch
Subject: Re: 34 bit instructions
Date: Thu, 17 Jun 2021 10:31:18 -0700
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <sag0t6$rhb$1@dont-email.me>
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
<8c210baf-aa34-4380-8026-9a874d8ca6c6n@googlegroups.com>
<a745390f-0785-407a-a4fd-81b9f3cbb3b1n@googlegroups.com>
<uXB*96Tmy@news.chiark.greenend.org.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 17 Jun 2021 17:31:18 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="67de17296d1dcb619583fd574974f8f7";
logging-data="28203"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19zDV4juUAh3NFf0yngyCfc"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:ux8sgU4FfopSlZh8csfr9pyRVQU=
In-Reply-To: <uXB*96Tmy@news.chiark.greenend.org.uk>
Content-Language: en-US
 by: Ivan Godard - Thu, 17 Jun 2021 17:31 UTC

On 6/17/2021 9:40 AM, Theo wrote:
> Quadibloc <jsavard@ecn.ab.ca> wrote:
>> On Thursday, June 17, 2021 at 9:12:08 AM UTC-6, MitchAlsup wrote:
>>
>>> I have come to the conclusion that the ideal size for RISC-like ISAs with 32 registers is 36-bits.
>>
>> I'm inclined to agree. However, Concertina II is (or at least includes) an attempt to live with 32 bits,
>> even if it is less than ideal. But it offers more as an alternative, as well.
>
> A slightly offbeat suggestion might be to keep the in-memory representation
> of instructions to be 32 bits, but have the extra bits in a shadow space
> somehow. For example you could have instructions at n, n+4, n+8 and so on.
> And then the other 4 bits of the instructions live at m, m+0.5, m+1, etc.
>
> PC still refers to n so branching etc are all fine, but there's implicit
> behaviour that changing n also changes m in some relation. For example you
> could declare m=n+4GB so that loading a program means populating 32 bits of
> instructions around PC and then populating the remaining bits at 4GB+PC/4.
> You would likely do some page table work to map in pages into both spaces at
> the same time when you load binaries.
>
> Lots of ways this could get exciting, not least atomicity. But it might be
> feasible to make this work with enough effort.
>
> Theo
>

CHERI and other caps systems have tried this to add caps tags to memory.
There are practical problems: extra IOIs, bigger working sets, and
keeping stores and loads atomic. The problems are less severe if you
restrict the extra bits to code, because you can assume atomicity, but
the rest remain. The only real solution seems to be to talk Samsung into
making nine bit bytes.

Re: 34 bit instructions

<d594069c-d34d-4f67-8a63-480b2531e79bn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a37:e4d:: with SMTP id 74mr5647205qko.6.1623961532033; Thu, 17 Jun 2021 13:25:32 -0700 (PDT)
X-Received: by 2002:a4a:d781:: with SMTP id c1mr5998216oou.23.1623961531843; Thu, 17 Jun 2021 13:25:31 -0700 (PDT)
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Thu, 17 Jun 2021 13:25:31 -0700 (PDT)
In-Reply-To: <sag0t6$rhb$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:56a:f8e3:d700:9d3b:eb08:6be5:9836; posting-account=1nOeKQkAAABD2jxp4Pzmx9Hx5g9miO8y
NNTP-Posting-Host: 2001:56a:f8e3:d700:9d3b:eb08:6be5:9836
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com> <8c210baf-aa34-4380-8026-9a874d8ca6c6n@googlegroups.com> <a745390f-0785-407a-a4fd-81b9f3cbb3b1n@googlegroups.com> <uXB*96Tmy@news.chiark.greenend.org.uk> <sag0t6$rhb$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d594069c-d34d-4f67-8a63-480b2531e79bn@googlegroups.com>
Subject: Re: 34 bit instructions
From: jsav...@ecn.ab.ca (Quadibloc)
Injection-Date: Thu, 17 Jun 2021 20:25:32 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 12
 by: Quadibloc - Thu, 17 Jun 2021 20:25 UTC

On Thursday, June 17, 2021 at 11:31:20 AM UTC-6, Ivan Godard wrote:
> The only real solution seems to be to talk Samsung into
> making nine bit bytes.

Good news. The upcoming DDR5 standard will change memory from being
64 bits wide with an optional 8 bits for ECC to being two channels, each 32
bits wide, with an optional 8 bits for ECC.

So you could store 72-bit words in memory and still have 8 bits available for
ECC, so chips with a 36-bit word are now practical, although they would require
ECC DRAM.

John Savard

Re: 34 bit instructions

<sager8$rc8$1@dont-email.me>

  copy mid

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

  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: 34 bit instructions
Date: Thu, 17 Jun 2021 16:27:52 -0500
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <sager8$rc8$1@dont-email.me>
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
<8c210baf-aa34-4380-8026-9a874d8ca6c6n@googlegroups.com>
<a745390f-0785-407a-a4fd-81b9f3cbb3b1n@googlegroups.com>
<uXB*96Tmy@news.chiark.greenend.org.uk> <sag0t6$rhb$1@dont-email.me>
<d594069c-d34d-4f67-8a63-480b2531e79bn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 17 Jun 2021 21:29:12 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="6c5f39fa1efdec7d340eecaa0825f3e4";
logging-data="28040"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19/u3/UckzbjpQK/r6PATus"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:oLsj0nMnhVnnSDrskRRNe6F9yuI=
In-Reply-To: <d594069c-d34d-4f67-8a63-480b2531e79bn@googlegroups.com>
Content-Language: en-US
 by: BGB - Thu, 17 Jun 2021 21:27 UTC

On 6/17/2021 3:25 PM, Quadibloc wrote:
> On Thursday, June 17, 2021 at 11:31:20 AM UTC-6, Ivan Godard wrote:
>> The only real solution seems to be to talk Samsung into
>> making nine bit bytes.
>
> Good news. The upcoming DDR5 standard will change memory from being
> 64 bits wide with an optional 8 bits for ECC to being two channels, each 32
> bits wide, with an optional 8 bits for ECC.
>
> So you could store 72-bit words in memory and still have 8 bits available for
> ECC, so chips with a 36-bit word are now practical, although they would require
> ECC DRAM.
>

Hmm, makes me wonder about a RAM module which rather than having a bunch
of DDRn modules ganged together, had a collection of individually
addressable LPDDR modules (using LPDDR mostly to reduce pin count). So,
say, rather than having 1 or 2 channels at 64 or 32 bits, it has 4
channels each being 16 bits wide (with ECC adding a 5th channel).

Then, the DDR controller splits cache-lines based on address between the
4 chips and potentially addresses multiple chips in parallel.

Re: 34 bit instructions

<6ce42dcd-c663-4f95-abba-d2f8d436d669n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:883:: with SMTP id b3mr7404001qka.433.1623989568016;
Thu, 17 Jun 2021 21:12:48 -0700 (PDT)
X-Received: by 2002:a05:6808:aa1:: with SMTP id r1mr4413228oij.157.1623989567728;
Thu, 17 Jun 2021 21:12:47 -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: Thu, 17 Jun 2021 21:12:47 -0700 (PDT)
In-Reply-To: <sager8$rc8$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:fea8:1de1:d400:2cd8:3c91:a0f4:5ee3;
posting-account=QId4bgoAAABV4s50talpu-qMcPp519Eb
NNTP-Posting-Host: 2607:fea8:1de1:d400:2cd8:3c91:a0f4:5ee3
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
<8c210baf-aa34-4380-8026-9a874d8ca6c6n@googlegroups.com> <a745390f-0785-407a-a4fd-81b9f3cbb3b1n@googlegroups.com>
<uXB*96Tmy@news.chiark.greenend.org.uk> <sag0t6$rhb$1@dont-email.me>
<d594069c-d34d-4f67-8a63-480b2531e79bn@googlegroups.com> <sager8$rc8$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6ce42dcd-c663-4f95-abba-d2f8d436d669n@googlegroups.com>
Subject: Re: 34 bit instructions
From: robfi...@gmail.com (robf...@gmail.com)
Injection-Date: Fri, 18 Jun 2021 04:12:48 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: robf...@gmail.com - Fri, 18 Jun 2021 04:12 UTC

Decided to go with 36-bit instructions. There is very little difference in code density due to the increased number of instructions that can be encoded in 36 bits over 34 bits. Memory is now nybble addressable. Displacements for branches, jumps and calls are in terms of nybbles. All the addressing recognizes nybble addressability although load and store instructions are limited to byte aligned addresses (the low bit of the address is always zero).. Data pointers and code pointers now have the same meaning. Code is relocatable on nybble boundaries. The machine is limited to 2^63 bytes of memory, probably a non-issue.
For debug display purposes addresses are shown as byte addresses with a fractional bit representing which nybble in the byte is addressed.
ANY1 v3 has gone from 40-bits to 34-bits and back to 36-bit instructions in the last three or four days. So, limited stability in the ISA yet.
Toying with the idea of allowed three source register ports for some instructions. There are a few useful instructions that need three ports, which currently must use modifiers.

Re: 34 bit instructions

<59bb836e-f14a-4ee0-b7ee-4ff53f278fa2n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:6214:d0c:: with SMTP id 12mr5263281qvh.52.1624019035052; Fri, 18 Jun 2021 05:23:55 -0700 (PDT)
X-Received: by 2002:a05:6830:33ea:: with SMTP id i10mr8895160otu.342.1624019034850; Fri, 18 Jun 2021 05:23:54 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!tr2.eu1.usenetexpress.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Fri, 18 Jun 2021 05:23:54 -0700 (PDT)
In-Reply-To: <d594069c-d34d-4f67-8a63-480b2531e79bn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:56a:f8e3:d700:f0ea:118c:12b6:c9af; posting-account=1nOeKQkAAABD2jxp4Pzmx9Hx5g9miO8y
NNTP-Posting-Host: 2001:56a:f8e3:d700:f0ea:118c:12b6:c9af
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com> <8c210baf-aa34-4380-8026-9a874d8ca6c6n@googlegroups.com> <a745390f-0785-407a-a4fd-81b9f3cbb3b1n@googlegroups.com> <uXB*96Tmy@news.chiark.greenend.org.uk> <sag0t6$rhb$1@dont-email.me> <d594069c-d34d-4f67-8a63-480b2531e79bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <59bb836e-f14a-4ee0-b7ee-4ff53f278fa2n@googlegroups.com>
Subject: Re: 34 bit instructions
From: jsav...@ecn.ab.ca (Quadibloc)
Injection-Date: Fri, 18 Jun 2021 12:23:55 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 45
 by: Quadibloc - Fri, 18 Jun 2021 12:23 UTC

On Thursday, June 17, 2021 at 2:25:33 PM UTC-6, Quadibloc wrote:
> On Thursday, June 17, 2021 at 11:31:20 AM UTC-6, Ivan Godard wrote:

> > The only real solution seems to be to talk Samsung into
> > making nine bit bytes.

> Good news. The upcoming DDR5 standard will change memory from being
> 64 bits wide with an optional 8 bits for ECC to being two channels, each 32
> bits wide, with an optional 8 bits for ECC.

> So you could store 72-bit words in memory and still have 8 bits available for
> ECC, so chips with a 36-bit word are now practical, although they would require
> ECC DRAM.

Of course, what I've been doing instead is this:

I've used 32-bit instructions as the default.

Instructions are in aligned 256-bit blocks; a bit of the 32-bit
instruction opcode space is taken for block headers.

Longer instructions can be composed of bits from the header
plus the 32 bits of the instruction proper.

There's a program counter that keeps track of the current
block, and is advanced by being incremented. Moving through
instructions within a block depends on what instructions are
in the block, and where they are located. So that's handled
between decoding the instructions and putting them on the
pipeline.

Of course, though, there is a "program counter" that is seen
by the programmer, which is based on where the current
instruction came from, but that's something that's basically
reconstituted when needed, it doesn't actually exist as a
counter register. Since all the instructions in a block are
decoded in parallel, after all, a traditional program counter
doesn't really have a function - it just needs to have a virtual
existence for things like program-relative addressing and
subroutine calls.

So things like using end-around carry to convert block
number times 7 into a binary number quickly aren't relevant
here either.

John Savard

Re: 34 bit instructions

<saigi0$a3u$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: sfu...@alumni.cmu.edu.invalid (Stephen Fuld)
Newsgroups: comp.arch
Subject: Re: 34 bit instructions
Date: Fri, 18 Jun 2021 09:10:39 -0700
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <saigi0$a3u$1@dont-email.me>
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
<8c210baf-aa34-4380-8026-9a874d8ca6c6n@googlegroups.com>
<a745390f-0785-407a-a4fd-81b9f3cbb3b1n@googlegroups.com>
<uXB*96Tmy@news.chiark.greenend.org.uk> <sag0t6$rhb$1@dont-email.me>
<d594069c-d34d-4f67-8a63-480b2531e79bn@googlegroups.com>
<sager8$rc8$1@dont-email.me>
<6ce42dcd-c663-4f95-abba-d2f8d436d669n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 18 Jun 2021 16:10:40 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="d4e7274c2130556b5cd248aff0895df1";
logging-data="10366"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+CcS99OoBS3FkJa3PgrJIPmZLJL7SkQZc="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:KtmJsyzXKA+Ff+mPiPp6g5If6tQ=
In-Reply-To: <6ce42dcd-c663-4f95-abba-d2f8d436d669n@googlegroups.com>
Content-Language: en-US
 by: Stephen Fuld - Fri, 18 Jun 2021 16:10 UTC

On 6/17/2021 9:12 PM, robf...@gmail.com wrote:
> Decided to go with 36-bit instructions. There is very little difference in code density due to the increased number of instructions that can be encoded in 36 bits over 34 bits. Memory is now nybble addressable. Displacements for branches, jumps and calls are in terms of nybbles.

If all instructions are fixed length of 36 bits, have you considered
making such displacements in terms of "instructions" rather than
nybbles? That would increase the range of values in such instructions
by a factor of nine (for 36 bit instructions). It adds a little cost to
the address calculation, but only an extra short add. It also makes
things "nice" for the assembler programmer - a jump over say three
instructions (e.g. to skip to the else part of an if-then-else) is coded
as current IP plus 4 instead of having to calculate nybbles.

Loads and stores would still have to be nybble addresses.

--
- Stephen Fuld
(e-mail address disguised to prevent spam)

Re: 34 bit instructions

<cd0ab48f-90b2-4237-8661-7c8a537310e8n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:622a:81:: with SMTP id o1mr11122540qtw.16.1624033048374;
Fri, 18 Jun 2021 09:17:28 -0700 (PDT)
X-Received: by 2002:aca:5755:: with SMTP id l82mr16135778oib.44.1624033048194;
Fri, 18 Jun 2021 09:17:28 -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, 18 Jun 2021 09:17:27 -0700 (PDT)
In-Reply-To: <saigi0$a3u$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:a9d3:561c:9b34:f434;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:a9d3:561c:9b34:f434
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
<8c210baf-aa34-4380-8026-9a874d8ca6c6n@googlegroups.com> <a745390f-0785-407a-a4fd-81b9f3cbb3b1n@googlegroups.com>
<uXB*96Tmy@news.chiark.greenend.org.uk> <sag0t6$rhb$1@dont-email.me>
<d594069c-d34d-4f67-8a63-480b2531e79bn@googlegroups.com> <sager8$rc8$1@dont-email.me>
<6ce42dcd-c663-4f95-abba-d2f8d436d669n@googlegroups.com> <saigi0$a3u$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <cd0ab48f-90b2-4237-8661-7c8a537310e8n@googlegroups.com>
Subject: Re: 34 bit instructions
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Fri, 18 Jun 2021 16:17:28 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: MitchAlsup - Fri, 18 Jun 2021 16:17 UTC

On Friday, June 18, 2021 at 11:10:42 AM UTC-5, Stephen Fuld wrote:
> On 6/17/2021 9:12 PM, robf...@gmail.com wrote:
> > Decided to go with 36-bit instructions. There is very little difference in code density due to the increased number of instructions that can be encoded in 36 bits over 34 bits. Memory is now nybble addressable. Displacements for branches, jumps and calls are in terms of nybbles.
<
> If all instructions are fixed length of 36 bits, have you considered
> making such displacements in terms of "instructions" rather than
> nybbles?
<
Wise !
<
> That would increase the range of values in such instructions
> by a factor of nine (for 36 bit instructions). It adds a little cost to
> the address calculation, but only an extra short add. It also makes
> things "nice" for the assembler programmer - a jump over say three
> instructions (e.g. to skip to the else part of an if-then-else) is coded
> as current IP plus 4 instead of having to calculate nybbles.
>
> Loads and stores would still have to be nybble addresses.
<
Only if they need to read/write 36-bit items--which is doubtful.
Excepting for the JIT only the FETCH unit should know the size of
instructions.
>
>
> --
> - Stephen Fuld
> (e-mail address disguised to prevent spam)

Re: 34 bit instructions

<sair0m$20j$1@dont-email.me>

  copy mid

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

  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: 34 bit instructions
Date: Fri, 18 Jun 2021 14:07:50 -0500
Organization: A noiseless patient Spider
Lines: 107
Message-ID: <sair0m$20j$1@dont-email.me>
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
<8c210baf-aa34-4380-8026-9a874d8ca6c6n@googlegroups.com>
<a745390f-0785-407a-a4fd-81b9f3cbb3b1n@googlegroups.com>
<uXB*96Tmy@news.chiark.greenend.org.uk> <sag0t6$rhb$1@dont-email.me>
<d594069c-d34d-4f67-8a63-480b2531e79bn@googlegroups.com>
<59bb836e-f14a-4ee0-b7ee-4ff53f278fa2n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 18 Jun 2021 19:09:10 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="87462cafb506b47ba2cf53f49b461068";
logging-data="2067"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/43+sr9RcSipAxSEGiCfJo"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:oM9SFTvOomybcNdcWRIwvvdNh2w=
In-Reply-To: <59bb836e-f14a-4ee0-b7ee-4ff53f278fa2n@googlegroups.com>
Content-Language: en-US
 by: BGB - Fri, 18 Jun 2021 19:07 UTC

On 6/18/2021 7:23 AM, Quadibloc wrote:
> On Thursday, June 17, 2021 at 2:25:33 PM UTC-6, Quadibloc wrote:
>> On Thursday, June 17, 2021 at 11:31:20 AM UTC-6, Ivan Godard wrote:
>
>>> The only real solution seems to be to talk Samsung into
>>> making nine bit bytes.
>
>> Good news. The upcoming DDR5 standard will change memory from being
>> 64 bits wide with an optional 8 bits for ECC to being two channels, each 32
>> bits wide, with an optional 8 bits for ECC.
>
>> So you could store 72-bit words in memory and still have 8 bits available for
>> ECC, so chips with a 36-bit word are now practical, although they would require
>> ECC DRAM.
>
> Of course, what I've been doing instead is this:
>
> I've used 32-bit instructions as the default.
>

I have also ended up with a 32-bit default (in BJX2):
32-bits: Pretty much the whole core ISA;
16-bits: Subset, most ops limited to R0..R15.

Encoding using a mix of 16 and 32 bit ops is good for code-density, but
isn't really the highest performance option in my ISA (it is mostly
limited to scalar operation).

There are a few larger encodings:
48-bits, Jumbo-Op48: Still unused (*1)
64-bits, Jumbo-Op64: Recently added (*2).
64-bits, Jumbo+Op32 (Jumbo64): Larger immediate values.
96-bits, Jumbo(2x)+Op32 (Jumbo96): Large immediate values (*3).

*1: Due to technical reasons, would be partly incompatible with the use
of WEX encodings. Would need to make non-trivial modifications to both
the instruction decoder and C compiler to resolve this. Having 48-bit
ops which can only be used in certain contexts would be "kinda lame".
Some similar restrictions also apply to 16-bit ops.

*2: At present, these mostly apply to cases involving predicated ops
which also use R32..R63, encoding SR.S predicated ops, ...
Some other cases, like "MOV Imm33s, Rn" (for R32..R63) also involve Op64
encodings.

*3: These remain roughly the same as before, just with the XGPR
extension making a few functional changes to Jumbo96 which mostly
effected a few unused encodings. This tweak also extends Jumbo96 "Imm64,
Rn" encodings to also cover R32..R63.

Currently, there are no encodings to load either Imm16 or Binary16 into
R32..R63, one will need to make due instead with Imm33s or Binary32
constant-loads (64-bit encodings).

> Instructions are in aligned 256-bit blocks; a bit of the 32-bit
> instruction opcode space is taken for block headers.
>
> Longer instructions can be composed of bits from the header
> plus the 32 bits of the instruction proper.
>
> There's a program counter that keeps track of the current
> block, and is advanced by being incremented. Moving through
> instructions within a block depends on what instructions are
> in the block, and where they are located. So that's handled
> between decoding the instructions and putting them on the
> pipeline.
>
> Of course, though, there is a "program counter" that is seen
> by the programmer, which is based on where the current
> instruction came from, but that's something that's basically
> reconstituted when needed, it doesn't actually exist as a
> counter register. Since all the instructions in a block are
> decoded in parallel, after all, a traditional program counter
> doesn't really have a function - it just needs to have a virtual
> existence for things like program-relative addressing and
> subroutine calls.
>
> So things like using end-around carry to convert block
> number times 7 into a binary number quickly aren't relevant
> here either.
>

This part differs.

FWIW, In general, I have some doubts about the viability of a
non-power-of-2 encoding scheme given typical RAM deals with power-of-2
blocks; and 8-bit bytes + power-of-2 memory words has been pretty much
standard for the last 50 years or so...

An ISA built around 40 or 48 bit encodings would at least remain
compatible with 8 bit bytes or 16 bit words, or a 5x25 or 3x42 bit
encoding with 128-bit blocks.

Though, 7x36 in 256-bits could work, though with the wonkiness of mod-7
addressing.

I could potentially (if I wanted) design a fork of my core which
supported RISC-V or similar, though apart from better compiler maturity,
it would probably "kinda suck".

Something like x86 could be more useful, but making an x86 emulation
layer that "doesn't suck" seems non-trivial. Supporting x86 in hardware
is basically no-go.

Re: 34 bit instructions

<xXB*s52my@news.chiark.greenend.org.uk>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!nntp.terraraq.uk!nntp-feed.chiark.greenend.org.uk!ewrotcd!.POSTED!not-for-mail
From: theom+n...@chiark.greenend.org.uk (Theo)
Newsgroups: comp.arch
Subject: Re: 34 bit instructions
Date: 19 Jun 2021 10:30:51 +0100 (BST)
Organization: University of Cambridge, England
Lines: 42
Message-ID: <xXB*s52my@news.chiark.greenend.org.uk>
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com> <8c210baf-aa34-4380-8026-9a874d8ca6c6n@googlegroups.com> <a745390f-0785-407a-a4fd-81b9f3cbb3b1n@googlegroups.com> <uXB*96Tmy@news.chiark.greenend.org.uk> <sag0t6$rhb$1@dont-email.me>
NNTP-Posting-Host: chiark.greenend.org.uk
X-Trace: chiark.greenend.org.uk 1624095053 16097 212.13.197.229 (19 Jun 2021 09:30:53 GMT)
X-Complaints-To: abuse@chiark.greenend.org.uk
NNTP-Posting-Date: Sat, 19 Jun 2021 09:30:53 +0000 (UTC)
User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (Linux/3.16.0-7-amd64 (x86_64))
Originator: theom@chiark.greenend.org.uk ([212.13.197.229])
 by: Theo - Sat, 19 Jun 2021 09:30 UTC

Ivan Godard <ivan@millcomputing.com> wrote:
> CHERI and other caps systems have tried this to add caps tags to memory.
> There are practical problems: extra IOIs, bigger working sets, and
> keeping stores and loads atomic. The problems are less severe if you
> restrict the extra bits to code, because you can assume atomicity, but
> the rest remain. The only real solution seems to be to talk Samsung into
> making nine bit bytes.

The difference in what we do with CHERI is the tags aren't user accessible.
So we put a tag cache in from of DRAM that presents the memory as
essentially 129 bits wide (or some multiple thereof) but, while the 129th
bit is carried through caches etc, it isn't addressable directly by
regular instructions. So software still thinks memory is 128 bits wide and
there are no awkward addressing problems. You can get at the 1-bit tag
using different instructions which are deliberately restricted in what they
can do with tags.

You could do a similar trick with instruction fetch and have the extra bits
come out of the shadow space. But the trouble is that software wants to
manipulate instructions - loading binaries, dynamic linking, JIT. And then
things get interesting because you have to manipulate the main space and the
shadow space at the same time. Not to say it's not doable, but existing
toolchain is not written this way.

Putting extra metadata in ECC bits is another way, but a) people want to use
them for ECC (due to rowhammer and friends) and b) in CHERI having efficient
bulk access to tags is quite important (eg for revocation) and that's harder
if you have to fetch every DRAM word to get at them.

Going to inline 36 bit instructions is probably more practical from an
implementation point of view, since a byte is then only shared between two
instructions. It's still work in the toolchain but less so. I'm curious
how to handle PC though still it would have to go 0, 4, 9, 13, 18 or 0, 5,
9, 14, 18. Which is rather inconvenient for calculating addresses.

You would probably have to force alignment, effectively making instruction
words 72 bits and packing two instructions per word. That means you could
only branch into the first instruction of a word and might mean you'd have
to pad with NOPs in some circumstances. That would probably be doable
though, and the tradeoff might be worth it.

Theo

Re: 34 bit instructions

<a0f7fcfa-625f-4eef-940d-7f1ecd87c872n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:1003:: with SMTP id z3mr15496121qkj.490.1624122137776;
Sat, 19 Jun 2021 10:02:17 -0700 (PDT)
X-Received: by 2002:a05:6830:1daa:: with SMTP id z10mr6652443oti.5.1624122137551;
Sat, 19 Jun 2021 10:02:17 -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: Sat, 19 Jun 2021 10:02:17 -0700 (PDT)
In-Reply-To: <xXB*s52my@news.chiark.greenend.org.uk>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:56a:f8e3:d700:dd31:efbd:3ae1:ef2b;
posting-account=1nOeKQkAAABD2jxp4Pzmx9Hx5g9miO8y
NNTP-Posting-Host: 2001:56a:f8e3:d700:dd31:efbd:3ae1:ef2b
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
<8c210baf-aa34-4380-8026-9a874d8ca6c6n@googlegroups.com> <a745390f-0785-407a-a4fd-81b9f3cbb3b1n@googlegroups.com>
<uXB*96Tmy@news.chiark.greenend.org.uk> <sag0t6$rhb$1@dont-email.me> <xXB*s52my@news.chiark.greenend.org.uk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a0f7fcfa-625f-4eef-940d-7f1ecd87c872n@googlegroups.com>
Subject: Re: 34 bit instructions
From: jsav...@ecn.ab.ca (Quadibloc)
Injection-Date: Sat, 19 Jun 2021 17:02:17 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Quadibloc - Sat, 19 Jun 2021 17:02 UTC

On Saturday, June 19, 2021 at 3:30:55 AM UTC-6, Theo wrote:

> You would probably have to force alignment, effectively making instruction
> words 72 bits and packing two instructions per word. That means you could
> only branch into the first instruction of a word and might mean you'd have
> to pad with NOPs in some circumstances. That would probably be doable
> though, and the tradeoff might be worth it.

I can see that alignment to byte boundaries is important, but why that would
prevent branching to the second instruction is unclear.

How to tell, when branching to a byte, if it is the first or second instruction in
72 bits that starts there? Also align to multiples of nine bytes, not just to the
byte, even though that is not a physical memory issue.

John Savard

Re: 34 bit instructions

<b009cefc-17c3-4a21-95ae-b3fed83208c3n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:622a:147:: with SMTP id v7mr483359qtw.246.1624160970890;
Sat, 19 Jun 2021 20:49:30 -0700 (PDT)
X-Received: by 2002:a9d:7d05:: with SMTP id v5mr16277138otn.240.1624160970653;
Sat, 19 Jun 2021 20:49:30 -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: Sat, 19 Jun 2021 20:49:30 -0700 (PDT)
In-Reply-To: <saigi0$a3u$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:fea8:1de1:d400:111:d53b:a691:90b5;
posting-account=QId4bgoAAABV4s50talpu-qMcPp519Eb
NNTP-Posting-Host: 2607:fea8:1de1:d400:111:d53b:a691:90b5
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
<8c210baf-aa34-4380-8026-9a874d8ca6c6n@googlegroups.com> <a745390f-0785-407a-a4fd-81b9f3cbb3b1n@googlegroups.com>
<uXB*96Tmy@news.chiark.greenend.org.uk> <sag0t6$rhb$1@dont-email.me>
<d594069c-d34d-4f67-8a63-480b2531e79bn@googlegroups.com> <sager8$rc8$1@dont-email.me>
<6ce42dcd-c663-4f95-abba-d2f8d436d669n@googlegroups.com> <saigi0$a3u$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b009cefc-17c3-4a21-95ae-b3fed83208c3n@googlegroups.com>
Subject: Re: 34 bit instructions
From: robfi...@gmail.com (robf...@gmail.com)
Injection-Date: Sun, 20 Jun 2021 03:49:30 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: robf...@gmail.com - Sun, 20 Jun 2021 03:49 UTC

On Friday, June 18, 2021 at 12:10:42 PM UTC-4, Stephen Fuld wrote:
> On 6/17/2021 9:12 PM, robf...@gmail.com wrote:
> > Decided to go with 36-bit instructions. There is very little difference in code density due to the increased number of instructions that can be encoded in 36 bits over 34 bits. Memory is now nybble addressable. Displacements for branches, jumps and calls are in terms of nybbles.
> If all instructions are fixed length of 36 bits, have you considered
> making such displacements in terms of "instructions" rather than
> nybbles? That would increase the range of values in such instructions
> by a factor of nine (for 36 bit instructions). It adds a little cost to
> the address calculation, but only an extra short add. It also makes
> things "nice" for the assembler programmer - a jump over say three
> instructions (e.g. to skip to the else part of an if-then-else) is coded
> as current IP plus 4 instead of having to calculate nybbles.
>
> Loads and stores would still have to be nybble addresses.
>
>
> --
> - Stephen Fuld
> (e-mail address disguised to prevent spam)
Yes, I thought of using just whole instructions for addressing. But that creates issues with things like alignment. It also makes data pointers and instruction pointers different. With nybble addressing incrementing the IP is simple, just add 9. The linker would have to align instructions on proper 36-bit boundaries beginning at address zero. It would need to know the nybble address. It might be challenging to pick load addresses that are multiples of 36 bits. It is just easier to use nybble addressing. The start address is defined as byte address $FFFC0300. Is that aligned to an even 36 bits or not? In the boot code there are a bunch of ‘.align’ directives to align things to the start of a cache line for small routines (align 64 bytes). There is no guarantee that the line starts at an even 36-bit address. Branches support a 12-bit displacement. Since it is nybble addressing that is +-1kB. Still an adequate branch range for 95+% of branches.
The instruction aligner must shift the cache line by multiples of 36 bits, beginning at an arbitrary nybble position. It must do this whether or not instructions are aligned on multiples of 36-bits. So, there is no real savings in following 36-bit multiples.

Re: 34 bit instructions

<ef1cd65e-6faf-41c6-b8c2-621e5463ba08n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ae9:c30f:: with SMTP id n15mr18474622qkg.71.1624205884308; Sun, 20 Jun 2021 09:18:04 -0700 (PDT)
X-Received: by 2002:aca:f452:: with SMTP id s79mr14091794oih.84.1624205884058; Sun, 20 Jun 2021 09:18:04 -0700 (PDT)
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Sun, 20 Jun 2021 09:18:03 -0700 (PDT)
In-Reply-To: <b009cefc-17c3-4a21-95ae-b3fed83208c3n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:1af:8f14:fd81:ef03; posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:1af:8f14:fd81:ef03
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com> <8c210baf-aa34-4380-8026-9a874d8ca6c6n@googlegroups.com> <a745390f-0785-407a-a4fd-81b9f3cbb3b1n@googlegroups.com> <uXB*96Tmy@news.chiark.greenend.org.uk> <sag0t6$rhb$1@dont-email.me> <d594069c-d34d-4f67-8a63-480b2531e79bn@googlegroups.com> <sager8$rc8$1@dont-email.me> <6ce42dcd-c663-4f95-abba-d2f8d436d669n@googlegroups.com> <saigi0$a3u$1@dont-email.me> <b009cefc-17c3-4a21-95ae-b3fed83208c3n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ef1cd65e-6faf-41c6-b8c2-621e5463ba08n@googlegroups.com>
Subject: Re: 34 bit instructions
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Sun, 20 Jun 2021 16:18:04 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 51
 by: MitchAlsup - Sun, 20 Jun 2021 16:18 UTC

On Saturday, June 19, 2021 at 10:49:32 PM UTC-5, robf...@gmail.com wrote:
> On Friday, June 18, 2021 at 12:10:42 PM UTC-4, Stephen Fuld wrote:
> > On 6/17/2021 9:12 PM, robf...@gmail.com wrote:
> > > Decided to go with 36-bit instructions. There is very little difference in code density due to the increased number of instructions that can be encoded in 36 bits over 34 bits. Memory is now nybble addressable. Displacements for branches, jumps and calls are in terms of nybbles.
> > If all instructions are fixed length of 36 bits, have you considered
> > making such displacements in terms of "instructions" rather than
> > nybbles? That would increase the range of values in such instructions
> > by a factor of nine (for 36 bit instructions). It adds a little cost to
> > the address calculation, but only an extra short add. It also makes
> > things "nice" for the assembler programmer - a jump over say three
> > instructions (e.g. to skip to the else part of an if-then-else) is coded
> > as current IP plus 4 instead of having to calculate nybbles.
> >
> > Loads and stores would still have to be nybble addresses.
> >
> >
> > --
> > - Stephen Fuld
> > (e-mail address disguised to prevent spam)
> Yes, I thought of using just whole instructions for addressing. But that creates issues with things like alignment. It also makes data pointers and instruction pointers different. With nybble addressing incrementing the IP is simple, just add 9. The linker would have to align instructions on proper 36-bit boundaries beginning at address zero. It would need to know the nybble address. It might be challenging to pick load addresses that are multiples of 36 bits. It is just easier to use nybble addressing. The start address is defined as byte address $FFFC0300. Is that aligned to an even 36 bits or not? In the boot code there are a bunch of ‘.align’ directives to align things to the start of a cache line for small routines (align 64 bytes). There is no guarantee that the line starts at an even 36-bit address. Branches support a 12-bit displacement. Since it is nybble addressing that is +-1kB. Still an adequate branch range for 95+% of branches.
> The instruction aligner must shift the cache line by multiples of 36 bits, beginning at an arbitrary nybble position. It must do this whether or not instructions are aligned on multiples of 36-bits. So, there is no real savings in following 36-bit multiples.
<
Multiply by 9 (x<<3+x) and divide by 8 (x>>3) are easy enough.
Then you fetch wide, and use the bits that fall off the down shift as an index into the block.
<
Not even hard............
<
You just keep instruction pointers in data (registers+memory) as indexes into 36-bit containers.

Re: 34 bit instructions

<sansbd$g3l$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: sfu...@alumni.cmu.edu.invalid (Stephen Fuld)
Newsgroups: comp.arch
Subject: Re: 34 bit instructions
Date: Sun, 20 Jun 2021 10:02:35 -0700
Organization: A noiseless patient Spider
Lines: 97
Message-ID: <sansbd$g3l$1@dont-email.me>
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
<8c210baf-aa34-4380-8026-9a874d8ca6c6n@googlegroups.com>
<a745390f-0785-407a-a4fd-81b9f3cbb3b1n@googlegroups.com>
<uXB*96Tmy@news.chiark.greenend.org.uk> <sag0t6$rhb$1@dont-email.me>
<d594069c-d34d-4f67-8a63-480b2531e79bn@googlegroups.com>
<sager8$rc8$1@dont-email.me>
<6ce42dcd-c663-4f95-abba-d2f8d436d669n@googlegroups.com>
<saigi0$a3u$1@dont-email.me>
<b009cefc-17c3-4a21-95ae-b3fed83208c3n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 20 Jun 2021 17:02:37 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="e4c109a96b09a2135cb58c8280e91e52";
logging-data="16501"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+yPCrnfIA93bmsTAdh4CRtSiREyvXmxkI="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:EQAPi1+QDSOSmEOaC5Tx60usOPY=
In-Reply-To: <b009cefc-17c3-4a21-95ae-b3fed83208c3n@googlegroups.com>
Content-Language: en-US
 by: Stephen Fuld - Sun, 20 Jun 2021 17:02 UTC

On 6/19/2021 8:49 PM, robf...@gmail.com wrote:
> On Friday, June 18, 2021 at 12:10:42 PM UTC-4, Stephen Fuld wrote:
>> On 6/17/2021 9:12 PM, robf...@gmail.com wrote:
>>> Decided to go with 36-bit instructions. There is very little difference in code density due to the increased number of instructions that can be encoded in 36 bits over 34 bits. Memory is now nybble addressable. Displacements for branches, jumps and calls are in terms of nybbles.
>> If all instructions are fixed length of 36 bits, have you considered
>> making such displacements in terms of "instructions" rather than
>> nybbles? That would increase the range of values in such instructions
>> by a factor of nine (for 36 bit instructions). It adds a little cost to
>> the address calculation, but only an extra short add. It also makes
>> things "nice" for the assembler programmer - a jump over say three
>> instructions (e.g. to skip to the else part of an if-then-else) is coded
>> as current IP plus 4 instead of having to calculate nybbles.
>>
>> Loads and stores would still have to be nybble addresses.
>>
>>
>> --
>> - Stephen Fuld
>> (e-mail address disguised to prevent spam)

> Yes, I thought of using just whole instructions for addressing.

Of course, your architecture, so your decision. But I think you might
have misunderstood some things.

> But that creates issues with things like alignment.

No, it doesn't. All alignment is exactly the same as it is under your
plan. Only the contents of the displacement field in jumps, calls etc.
instructions are changed.

> It also makes data pointers and instruction pointers different.

Yes, it does that.

> With nybble addressing incrementing the IP is simple, just add 9.

With instruction addressing, incrementing the IP is just add 1.

> The linker would have to align instructions on proper 36-bit boundaries beginning at address zero.

No. Instructions in memory are exactly the same as under your proposal.
And you don't have to start at zero any more than you have to start
nybble addressing at zero.

> It would need to know the nybble address.

No, it is easily computed.

> It might be challenging to pick load addresses that are multiples of 36 bits.

I'm not sure what you mean here. Addresses in Load instructions are
unaffected.

It is just easier to use nybble addressing. The start address is defined
as byte address $FFFC0300. Is that aligned to an even 36 bits or not?

Who cares? The hardware transparently converts instruction address to
nybble address upon a control transfer instruction.

In the boot code there are a bunch of ‘.align’ directives to align
things to the start of a cache line for small routines (align 64 bytes).
There is no guarantee that the line starts at an even 36-bit address.

Again, no one is proposing changing the memory layout, only the
displacements in control transfer instructions.

Branches support a 12-bit displacement. Since it is nybble addressing
that is +-1kB. Still an adequate branch range for 95+% of branches.

But not enough for many/most call type instructions.

> The instruction aligner must shift the cache line by multiples of 36 bits, beginning at an arbitrary nybble position. It must do this whether or not instructions are aligned on multiples of 36-bits. So, there is no real savings in following 36-bit multiples.

Again, you seem to be assuming that was not proposed. Actual placement
in memory is not changed.

--
- Stephen Fuld
(e-mail address disguised to prevent spam)

Re: 34 bit instructions

<xRLzI.70297$gZ.43448@fx44.iad>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!feeder1.feed.usenet.farm!feed.usenet.farm!peer02.ams4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx44.iad.POSTED!not-for-mail
From: ThatWoul...@thevillage.com (EricP)
User-Agent: Thunderbird 2.0.0.24 (Windows/20100228)
MIME-Version: 1.0
Newsgroups: comp.arch
Subject: Re: 34 bit instructions
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com> <8c210baf-aa34-4380-8026-9a874d8ca6c6n@googlegroups.com> <a745390f-0785-407a-a4fd-81b9f3cbb3b1n@googlegroups.com> <uXB*96Tmy@news.chiark.greenend.org.uk> <sag0t6$rhb$1@dont-email.me> <d594069c-d34d-4f67-8a63-480b2531e79bn@googlegroups.com> <sager8$rc8$1@dont-email.me> <6ce42dcd-c663-4f95-abba-d2f8d436d669n@googlegroups.com> <saigi0$a3u$1@dont-email.me> <b009cefc-17c3-4a21-95ae-b3fed83208c3n@googlegroups.com> <sansbd$g3l$1@dont-email.me>
In-Reply-To: <sansbd$g3l$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 121
Message-ID: <xRLzI.70297$gZ.43448@fx44.iad>
X-Complaints-To: abuse@UsenetServer.com
NNTP-Posting-Date: Sun, 20 Jun 2021 18:33:01 UTC
Date: Sun, 20 Jun 2021 14:32:28 -0400
X-Received-Bytes: 6091
 by: EricP - Sun, 20 Jun 2021 18:32 UTC

Stephen Fuld wrote:
> On 6/19/2021 8:49 PM, robf...@gmail.com wrote:
>> On Friday, June 18, 2021 at 12:10:42 PM UTC-4, Stephen Fuld wrote:
>>> On 6/17/2021 9:12 PM, robf...@gmail.com wrote:
>>>> Decided to go with 36-bit instructions. There is very little
>>>> difference in code density due to the increased number of
>>>> instructions that can be encoded in 36 bits over 34 bits. Memory is
>>>> now nybble addressable. Displacements for branches, jumps and calls
>>>> are in terms of nybbles.
>>> If all instructions are fixed length of 36 bits, have you considered
>>> making such displacements in terms of "instructions" rather than
>>> nybbles? That would increase the range of values in such instructions
>>> by a factor of nine (for 36 bit instructions). It adds a little cost to
>>> the address calculation, but only an extra short add. It also makes
>>> things "nice" for the assembler programmer - a jump over say three
>>> instructions (e.g. to skip to the else part of an if-then-else) is coded
>>> as current IP plus 4 instead of having to calculate nybbles.
>>>
>>> Loads and stores would still have to be nybble addresses.
>>>
>>>
>>> --
>>> - Stephen Fuld
>>> (e-mail address disguised to prevent spam)
>
>> Yes, I thought of using just whole instructions for addressing.
>
> Of course, your architecture, so your decision. But I think you might
> have misunderstood some things.
>
>> But that creates issues with things like alignment.
>
> No, it doesn't. All alignment is exactly the same as it is under your
> plan. Only the contents of the displacement field in jumps, calls etc.
> instructions are changed.
>
>> It also makes data pointers and instruction pointers different.
>
> Yes, it does that.
>
>> With nybble addressing incrementing the IP is simple, just add 9.
>
> With instruction addressing, incrementing the IP is just add 1.

Right, everything is done with absolute or relative instruction numbers.
Just like if instructions were fixed size 32 bits.

Only the fetch unit has to know the program counter maps to byte addresses
by *4.5 (IP << 3 + IP) => 33 bit address with the upper bits [32:1]
being the byte address and lsb selecting lower or upper nibble.

>> The linker would have to align instructions on proper 36-bit
>> boundaries beginning at address zero.
>
> No. Instructions in memory are exactly the same as under your proposal.
> And you don't have to start at zero any more than you have to start
> nybble addressing at zero.
>
>
>> It would need to know the nybble address.
>
> No, it is easily computed.
>
>
>> It might be challenging to pick load addresses that are multiples of
>> 36 bits.
>
> I'm not sure what you mean here. Addresses in Load instructions are
> unaffected.
>
>
> It is just easier to use nybble addressing. The start address is defined
> as byte address $FFFC0300. Is that aligned to an even 36 bits or not?
>
> Who cares? The hardware transparently converts instruction address to
> nybble address upon a control transfer instruction.
>
> In the boot code there are a bunch of ‘.align’ directives to align
> things to the start of a cache line for small routines (align 64 bytes).
> There is no guarantee that the line starts at an even 36-bit address.
>
> Again, no one is proposing changing the memory layout, only the
> displacements in control transfer instructions.
>
>
> Branches support a 12-bit displacement. Since it is nybble addressing
> that is +-1kB. Still an adequate branch range for 95+% of branches.

The program counter is a 30-bit absolute instruction number
in the range 0.. 2^32/4.5 = 0..964,437,176.

Relative branches would be +/- 12-bit instruction number offset.
The number is just added to the current PC,
then the fetch unit takes care of mapping to bytes (PC << 3 + PC).

Absolute jump addresses would be a 30 bit instruction number.
As in "JMP reg" would only look at bits reg[29:0].

At PC = 964,437,177 the PC*4.5 wraps around in the byte address
space and probably does something random,
so probably best not to overflow the program counter.
But that's no different than usual.

> But not enough for many/most call type instructions.
>
>
>> The instruction aligner must shift the cache line by multiples of 36
>> bits, beginning at an arbitrary nybble position. It must do this
>> whether or not instructions are aligned on multiples of 36-bits. So,
>> there is no real savings in following 36-bit multiples.
>
>
> Again, you seem to be assuming that was not proposed. Actual placement
> in memory is not changed.

Linker needs to know about the mapping of instruction number to bytes
but that is no different from 32-bit instructions.

You can get an instruction that straddles a page boundary
but that is no different than byte aligned instructions.

Re: 34 bit instructions

<ae2da641-b6f6-474d-aed9-abb0957d6cd7n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:7158:: with SMTP id h24mr4161837qtp.346.1624229637156; Sun, 20 Jun 2021 15:53:57 -0700 (PDT)
X-Received: by 2002:a05:6808:8ed:: with SMTP id d13mr1196103oic.99.1624229636881; Sun, 20 Jun 2021 15:53:56 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!tr2.eu1.usenetexpress.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Sun, 20 Jun 2021 15:53:56 -0700 (PDT)
In-Reply-To: <xRLzI.70297$gZ.43448@fx44.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:299e:8c57:5fb2:49d; posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:299e:8c57:5fb2:49d
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com> <8c210baf-aa34-4380-8026-9a874d8ca6c6n@googlegroups.com> <a745390f-0785-407a-a4fd-81b9f3cbb3b1n@googlegroups.com> <uXB*96Tmy@news.chiark.greenend.org.uk> <sag0t6$rhb$1@dont-email.me> <d594069c-d34d-4f67-8a63-480b2531e79bn@googlegroups.com> <sager8$rc8$1@dont-email.me> <6ce42dcd-c663-4f95-abba-d2f8d436d669n@googlegroups.com> <saigi0$a3u$1@dont-email.me> <b009cefc-17c3-4a21-95ae-b3fed83208c3n@googlegroups.com> <sansbd$g3l$1@dont-email.me> <xRLzI.70297$gZ.43448@fx44.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ae2da641-b6f6-474d-aed9-abb0957d6cd7n@googlegroups.com>
Subject: Re: 34 bit instructions
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Sun, 20 Jun 2021 22:53:57 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 152
 by: MitchAlsup - Sun, 20 Jun 2021 22:53 UTC

On Sunday, June 20, 2021 at 1:33:06 PM UTC-5, EricP wrote:
> Stephen Fuld wrote:
> > On 6/19/2021 8:49 PM, robf...@gmail.com wrote:
> >> On Friday, June 18, 2021 at 12:10:42 PM UTC-4, Stephen Fuld wrote:
> >>> On 6/17/2021 9:12 PM, robf...@gmail.com wrote:
> >>>> Decided to go with 36-bit instructions. There is very little
> >>>> difference in code density due to the increased number of
> >>>> instructions that can be encoded in 36 bits over 34 bits. Memory is
> >>>> now nybble addressable. Displacements for branches, jumps and calls
> >>>> are in terms of nybbles.
> >>> If all instructions are fixed length of 36 bits, have you considered
> >>> making such displacements in terms of "instructions" rather than
> >>> nybbles? That would increase the range of values in such instructions
> >>> by a factor of nine (for 36 bit instructions). It adds a little cost to
> >>> the address calculation, but only an extra short add. It also makes
> >>> things "nice" for the assembler programmer - a jump over say three
> >>> instructions (e.g. to skip to the else part of an if-then-else) is coded
> >>> as current IP plus 4 instead of having to calculate nybbles.
> >>>
> >>> Loads and stores would still have to be nybble addresses.
> >>>
> >>>
> >>> --
> >>> - Stephen Fuld
> >>> (e-mail address disguised to prevent spam)
> >
> >> Yes, I thought of using just whole instructions for addressing.
> >
> > Of course, your architecture, so your decision. But I think you might
> > have misunderstood some things.
> >
> >> But that creates issues with things like alignment.
> >
> > No, it doesn't. All alignment is exactly the same as it is under your
> > plan. Only the contents of the displacement field in jumps, calls etc.
> > instructions are changed.
> >
> >> It also makes data pointers and instruction pointers different.
> >
> > Yes, it does that.
> >
> >> With nybble addressing incrementing the IP is simple, just add 9.
> >
> > With instruction addressing, incrementing the IP is just add 1.
> Right, everything is done with absolute or relative instruction numbers.
> Just like if instructions were fixed size 32 bits.
>
> Only the fetch unit has to know the program counter maps to byte addresses
> by *4.5 (IP << 3 + IP) => 33 bit address with the upper bits [32:1]
> being the byte address and lsb selecting lower or upper nibble.
> >> The linker would have to align instructions on proper 36-bit
> >> boundaries beginning at address zero.
> >
> > No. Instructions in memory are exactly the same as under your proposal.
> > And you don't have to start at zero any more than you have to start
> > nybble addressing at zero.
> >
> >
> >> It would need to know the nybble address.
> >
> > No, it is easily computed.
> >
> >
> >> It might be challenging to pick load addresses that are multiples of
> >> 36 bits.
> >
> > I'm not sure what you mean here. Addresses in Load instructions are
> > unaffected.
> >
> >
> > It is just easier to use nybble addressing. The start address is defined
> > as byte address $FFFC0300. Is that aligned to an even 36 bits or not?
> >
> > Who cares? The hardware transparently converts instruction address to
> > nybble address upon a control transfer instruction.
> >
> > In the boot code there are a bunch of ‘.align’ directives to align
> > things to the start of a cache line for small routines (align 64 bytes)..
> > There is no guarantee that the line starts at an even 36-bit address.
> >
> > Again, no one is proposing changing the memory layout, only the
> > displacements in control transfer instructions.
> >
> >
> > Branches support a 12-bit displacement. Since it is nybble addressing
> > that is +-1kB. Still an adequate branch range for 95+% of branches.
<
A 12-bit displacement enables ±2047*instructions = ±9,211 bytes..
<
> The program counter is a 30-bit absolute instruction number
> in the range 0.. 2^32/4.5 = 0..964,437,176.
<
Why not a 32-bit (or 64-bit) IP that indexes 4G instructions 19Gbytes.
Then keep the residual in another "place".
>
> Relative branches would be +/- 12-bit instruction number offset.
> The number is just added to the current PC,
> then the fetch unit takes care of mapping to bytes (PC << 3 + PC).
>
> Absolute jump addresses would be a 30 bit instruction number.
> As in "JMP reg" would only look at bits reg[29:0].
>
> At PC = 964,437,177 the PC*4.5 wraps around in the byte address
> space and probably does something random,
> so probably best not to overflow the program counter.
> But that's no different than usual.
> > But not enough for many/most call type instructions.
> >
> >
> >> The instruction aligner must shift the cache line by multiples of 36
> >> bits, beginning at an arbitrary nybble position. It must do this
> >> whether or not instructions are aligned on multiples of 36-bits. So,
> >> there is no real savings in following 36-bit multiples.
> >
> >
> > Again, you seem to be assuming that was not proposed. Actual placement
> > in memory is not changed.
> Linker needs to know about the mapping of instruction number to bytes
> but that is no different from 32-bit instructions.
>
> You can get an instruction that straddles a page boundary
> but that is no different than byte aligned instructions.
<
I would suggest you detect page crossings and not allow instructions to straddle
page boundaries. You get 910 instructions per page losing out on 1 byte but not
having a myriad of "other problems".

Re: 34 bit instructions

<84f43ec1-b667-46e4-bef0-ab44090f3449n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ad4:5444:: with SMTP id h4mr17866729qvt.14.1624246486510; Sun, 20 Jun 2021 20:34:46 -0700 (PDT)
X-Received: by 2002:a4a:8111:: with SMTP id b17mr18915936oog.5.1624246486278; Sun, 20 Jun 2021 20:34:46 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!tr1.eu1.usenetexpress.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Sun, 20 Jun 2021 20:34:46 -0700 (PDT)
In-Reply-To: <ae2da641-b6f6-474d-aed9-abb0957d6cd7n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:fea8:1de1:d400:ad7a:d390:5a16:36e3; posting-account=QId4bgoAAABV4s50talpu-qMcPp519Eb
NNTP-Posting-Host: 2607:fea8:1de1:d400:ad7a:d390:5a16:36e3
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com> <8c210baf-aa34-4380-8026-9a874d8ca6c6n@googlegroups.com> <a745390f-0785-407a-a4fd-81b9f3cbb3b1n@googlegroups.com> <uXB*96Tmy@news.chiark.greenend.org.uk> <sag0t6$rhb$1@dont-email.me> <d594069c-d34d-4f67-8a63-480b2531e79bn@googlegroups.com> <sager8$rc8$1@dont-email.me> <6ce42dcd-c663-4f95-abba-d2f8d436d669n@googlegroups.com> <saigi0$a3u$1@dont-email.me> <b009cefc-17c3-4a21-95ae-b3fed83208c3n@googlegroups.com> <sansbd$g3l$1@dont-email.me> <xRLzI.70297$gZ.43448@fx44.iad> <ae2da641-b6f6-474d-aed9-abb0957d6cd7n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <84f43ec1-b667-46e4-bef0-ab44090f3449n@googlegroups.com>
Subject: Re: 34 bit instructions
From: robfi...@gmail.com (robf...@gmail.com)
Injection-Date: Mon, 21 Jun 2021 03:34:46 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 54
 by: robf...@gmail.com - Mon, 21 Jun 2021 03:34 UTC

I was not trying to suggest that program loads must occur at address zero. I was also referring to program loads, not the load instruction. I meant only that things must be relative to the instruction address in terms of modular arithmetic if whole instructions are used as a reference point. Potential load addresses would be 0, 4.5, 9.0, 13.5, 18.0, …

I still think there could be alignment issues. (4.5 * IP) mod 16384 may not be zero assuming one wants to load program code at page boundaries. Moving code around is restrictive if it must be aligned to (4.5 * instruction address). I am not real fond of nybble addressing. In dumps etc. I have things expressed as byte addresses with a fraction of a byte. The IP is really a byte address with a fractional bit, so 4.5 bytes are being added to the IP. I do not see this as different from adding 4 bytes to the IP for a classic machine. It is just fixed-point arithmetic with one point. How much more hardware is it to add 4.5 instead of 1? It keeps data pointers and instruction pointers the same. To me, keeping the pointers the same may be valuable. What if one wants to place read-only data in a code page, then reference the data with IP relative addresses?

9x the branch range is appealing for capturing that extra 5% of branches. I may change this as suggested because within a subroutine addresses may be viewed in terms of sequential instructions - instruction counts, and conditional branches are almost exclusively used in subroutines. Unless one does something obtuse like insert an align statement to a boundary that is not a whole instruction away, there should be no issues with using instruction counts for branches.
Branches may also use a modifier that adds another 14 bits to the displacement range in addition to allowing the branch to act as a conditional subroutine call. The branch-and-link instruction has a 30-bit displacement packed into a single instruction.
I may leave jump and call instructions as fractional byte addressable so that code may be aligned at any half-byte address. So, code has the option of always starting at the start of a 16kB page. They have 30-bit displacement/address fields. “Wasting” a couple of bits for half-byte addressing probably is not an issue. The instructions are also extendable with instruction modifiers to have more addressing bits, for that 0.1% case where 30-bits is not enough.
I agree that it is relatively easy to convert the instruction address to a nybble address in memory.
The instruction pointer is currently 33 bits only because there’s only 512MB ram in the FPGA test system so, it does not make sense to use much over 1GB range for the test system. It saves a little bit of hardware if all the addresses are only 32 bits, but that is just for testing. But the IP register is spec’d as 64-bit. It is a 64-bit machine. (The size of an address is spec’d in one single config file location so it may be easily modified.). Only the order 24-bits of the IP increment. The rest of the bits are loadable.
I had similar thoughts about page crossing. The machine is setup to use 16kB pages as the smallest page size. 3640 instructions. 16kB is also the memory base register alignment. Currently the I$ is setup to load 548 bits per line, requiring a burst of five 128-bit accesses. This does not fit evenly in a memory page, and so cache loads do not cross page boundaries, I was thinking of restricting code addresses at the tail end of a page. I was not wanting to need to process a TLB miss in the middle of a cache load.

Re: 34 bit instructions

<3c3a3a17-82be-43b0-b2b4-2eb8685d9f01n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a0c:8563:: with SMTP id n90mr18516414qva.41.1624260130118;
Mon, 21 Jun 2021 00:22:10 -0700 (PDT)
X-Received: by 2002:a05:6830:1643:: with SMTP id h3mr20264616otr.76.1624260129905;
Mon, 21 Jun 2021 00:22:09 -0700 (PDT)
Path: i2pn2.org!i2pn.org!paganini.bofh.team!usenet.pasdenom.info!usenet-fr.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: Mon, 21 Jun 2021 00:22:09 -0700 (PDT)
In-Reply-To: <ae2da641-b6f6-474d-aed9-abb0957d6cd7n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:56a:f8e3:d700:a913:db32:2ef8:390f;
posting-account=1nOeKQkAAABD2jxp4Pzmx9Hx5g9miO8y
NNTP-Posting-Host: 2001:56a:f8e3:d700:a913:db32:2ef8:390f
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
<8c210baf-aa34-4380-8026-9a874d8ca6c6n@googlegroups.com> <a745390f-0785-407a-a4fd-81b9f3cbb3b1n@googlegroups.com>
<uXB*96Tmy@news.chiark.greenend.org.uk> <sag0t6$rhb$1@dont-email.me>
<d594069c-d34d-4f67-8a63-480b2531e79bn@googlegroups.com> <sager8$rc8$1@dont-email.me>
<6ce42dcd-c663-4f95-abba-d2f8d436d669n@googlegroups.com> <saigi0$a3u$1@dont-email.me>
<b009cefc-17c3-4a21-95ae-b3fed83208c3n@googlegroups.com> <sansbd$g3l$1@dont-email.me>
<xRLzI.70297$gZ.43448@fx44.iad> <ae2da641-b6f6-474d-aed9-abb0957d6cd7n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3c3a3a17-82be-43b0-b2b4-2eb8685d9f01n@googlegroups.com>
Subject: Re: 34 bit instructions
From: jsav...@ecn.ab.ca (Quadibloc)
Injection-Date: Mon, 21 Jun 2021 07:22:10 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Quadibloc - Mon, 21 Jun 2021 07:22 UTC

On Sunday, June 20, 2021 at 4:53:58 PM UTC-6, MitchAlsup wrote:

> I would suggest you detect page crossings and not allow instructions to straddle
> page boundaries. You get 910 instructions per page losing out on 1 byte but not
> having a myriad of "other problems".

I know that some machines were designed so as to take care to handle all the
problems that might arise. Thus, the IBM System/360 had instructions that were
16, 32, and 48 bits long - and page boundaries were essentially invisible to the
programmer.

Of course, it wasn't until the Model 85 that cache memory was introduced to
the line - and this was what forced IBM, in order to maintain compatibility, to
do whatever it took to ensure that if there was a page fault in the middle of
fetching an instruction... it was handled correctly.

John Savard

Pages:1234
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor