Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Do not meddle in the affairs of troff, for it is subtle and quick to anger.


devel / comp.arch / Re: 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
Re: 34 bit instructions

<vXB*iCcny@news.chiark.greenend.org.uk>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!news.niel.me!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: 21 Jun 2021 15:03:13 +0100 (BST)
Organization: University of Cambridge, England
Lines: 35
Message-ID: <vXB*iCcny@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> <xXB*s52my@news.chiark.greenend.org.uk> <a0f7fcfa-625f-4eef-940d-7f1ecd87c872n@googlegroups.com>
NNTP-Posting-Host: chiark.greenend.org.uk
X-Trace: chiark.greenend.org.uk 1624284195 1258 212.13.197.229 (21 Jun 2021 14:03:15 GMT)
X-Complaints-To: abuse@chiark.greenend.org.uk
NNTP-Posting-Date: Mon, 21 Jun 2021 14:03:15 +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 - Mon, 21 Jun 2021 14:03 UTC

Quadibloc <jsavard@ecn.ab.ca> wrote:
> 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.

I'm not sure I quite follow. Given instructions are aligned on 4.5 byte
addresses, then instruction pairs are aligned on 9 byte boundaries. You
could maybe work out if an address was divisible by 9 to determine if it's
the start of a pair or not, and if not assume the instruction is the second
of a pair. Not impossible but it's rather unwieldy to do that. You can do
it in hardware for the instruction fetch but there are times when software
needs to know too - maybe you would need a special instruction to do 'mod 9'
efficiently.

Another way around it would be to have a variation of a branch instruction
that says 'branch to the second of the pair'. But that wouldn't play nicely
with indirect branches where you only have the new PC and no information
which half it's going to.

I think you could probably make it work, although I think there's still risk
of confusing instruction halves, and it would be nice to avoid any
ambiguity.

Theo

Re: 34 bit instructions

<9d29d3ea-e9a4-42e0-b820-eea3574d4f97n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ad4:576e:: with SMTP id r14mr22068418qvx.61.1624308643163;
Mon, 21 Jun 2021 13:50:43 -0700 (PDT)
X-Received: by 2002:a05:6808:14c8:: with SMTP id f8mr419454oiw.7.1624308642911;
Mon, 21 Jun 2021 13:50:42 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.szaf.org!fu-berlin.de!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 13:50:42 -0700 (PDT)
In-Reply-To: <3c3a3a17-82be-43b0-b2b4-2eb8685d9f01n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=78.156.133.237; posting-account=px4ROgoAAAAEvdK9UtSdMy-y81GmvctK
NNTP-Posting-Host: 78.156.133.237
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>
<3c3a3a17-82be-43b0-b2b4-2eb8685d9f01n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9d29d3ea-e9a4-42e0-b820-eea3574d4f97n@googlegroups.com>
Subject: Re: 34 bit instructions
From: jim.l...@gmail.com (Jiri Moravec)
Injection-Date: Mon, 21 Jun 2021 20:50:43 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: base64
 by: Jiri Moravec - Mon, 21 Jun 2021 20:50 UTC

Dne pondělí 21. června 2021 v 9:22:11 UTC+2 uživatel Quadibloc napsal:
> 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
Assuming the cache line size is at least 32B, there is another option. A 256-bit block can
hold 1 "virtual" I0 instruction (NOP of various flavors) and 7 full 36-bit I{1..7} instructions:
<code>
0 N0 3 4 N1 7 8 N2 11 12 N3 15 16 N4 19 20 N5 23 24 N6 27 28 N7 31
┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
│ I0 │ I1.H │ I2.H │ I3.H │ I4.H │ I5.H │ I6.H │ I7.H │ W0
├────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┤
│ I1.Low │ W1
├───────────────────────────────────────────────────────────────────────┤
│ I2.Low │ W2
├───────────────────────────────────────────────────────────────────────┤
│ I3.Low │ W3
├───────────────────────────────────────────────────────────────────────┤
│ I4.Low │ W4
├───────────────────────────────────────────────────────────────────────┤
│ I5.Low │ W5
├───────────────────────────────────────────────────────────────────────┤
│ I6.Low │ W6
├───────────────────────────────────────────────────────────────────────┤
│ I7.Low │ W7
└───────────────────────────────────────────────────────────────────────┘
</code>
I0 can be used as a crude form of 'flow control'. Thus, all CALL instructions must lead to
a 32B block starting with NOP(CALL ENTRY POINT).
I{1..7}.H can be used for instruction classification, e.g. all instructions requiring a 32/64/128b immediate value
can have their own class. The field normally encoding the register field (at the fixed position) can then contain
the information how long such value is. This makes parallel decoding of the whole block much easier.
For example, a 36b direct operand can be interpreted as 4b of metadata -
(uint/int/decimal/float/something completely different™..) and 32b of data.

Re: 34 bit instructions

<8439317b-cf4e-4b07-b461-d7e23da9d31fn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:5ad5:: with SMTP id d21mr755956qtd.166.1624314361398;
Mon, 21 Jun 2021 15:26:01 -0700 (PDT)
X-Received: by 2002:a9d:12a9:: with SMTP id g38mr332761otg.114.1624314361154;
Mon, 21 Jun 2021 15:26:01 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.mixmin.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 15:26:00 -0700 (PDT)
In-Reply-To: <9d29d3ea-e9a4-42e0-b820-eea3574d4f97n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:fea8:1de1:d400:a5a1:9bc7:c71a:dffc;
posting-account=QId4bgoAAABV4s50talpu-qMcPp519Eb
NNTP-Posting-Host: 2607:fea8:1de1:d400:a5a1:9bc7:c71a:dffc
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>
<3c3a3a17-82be-43b0-b2b4-2eb8685d9f01n@googlegroups.com> <9d29d3ea-e9a4-42e0-b820-eea3574d4f97n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8439317b-cf4e-4b07-b461-d7e23da9d31fn@googlegroups.com>
Subject: Re: 34 bit instructions
From: robfi...@gmail.com (robf...@gmail.com)
Injection-Date: Mon, 21 Jun 2021 22:26:01 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: robf...@gmail.com - Mon, 21 Jun 2021 22:26 UTC

Instructions are allowed to be aligned on 0.5 byte addresses, so that pages of memory can be loaded with instructions aligned to the page address. It is easy to use half-byte addressing as a base. I am leaning towards converting branch displacements back to half-byte displacements. The field is 12-bit which IIRC is enough to cover about 99% of branch according to H&P. Using a half-byte displacement means the hardware does not need to multiply the displacement by nine for a branch instruction. It also makes it easy for conditional branching across a page boundary. I am toying with the idea of supporting compressed instructions which would likely be 20 bits or less in size. Half-byte displacement may be needed in the long run.

Putting seven instructions in a block is a good number. Processing instructions in blocks with meta-data has its own challenges. ANY1 uses a 512-bit (64 byte) cache line with a 36-bit overflow area. The overflow area allows an instruction spanning cache lines to be entirely on the line. The fetch unit is then always able to read a whole instruction in a single cycle even when the instruction spans a cache line. It does cause some data replication in the cache though.
I have had a call target (TGT) instructions in a couple of ISA’s where the next instruction executed after a call had to be the TGT instruction or an exception would occur.

Re: 34 bit instructions

<051d591e-84a5-4db0-8e24-c95aede422e3n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a37:6d07:: with SMTP id i7mr1196236qkc.472.1624316982427; Mon, 21 Jun 2021 16:09:42 -0700 (PDT)
X-Received: by 2002:aca:2b0c:: with SMTP id i12mr666713oik.51.1624316982139; Mon, 21 Jun 2021 16:09:42 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!tr2.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: Mon, 21 Jun 2021 16:09:41 -0700 (PDT)
In-Reply-To: <8439317b-cf4e-4b07-b461-d7e23da9d31fn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:1df4:f8da:a2d6:40c0; posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:1df4:f8da:a2d6:40c0
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> <3c3a3a17-82be-43b0-b2b4-2eb8685d9f01n@googlegroups.com> <9d29d3ea-e9a4-42e0-b820-eea3574d4f97n@googlegroups.com> <8439317b-cf4e-4b07-b461-d7e23da9d31fn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <051d591e-84a5-4db0-8e24-c95aede422e3n@googlegroups.com>
Subject: Re: 34 bit instructions
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Mon, 21 Jun 2021 23:09:42 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 45
 by: MitchAlsup - Mon, 21 Jun 2021 23:09 UTC

On Monday, June 21, 2021 at 5:26:02 PM UTC-5, robf...@gmail.com wrote:
> Instructions are allowed to be aligned on 0.5 byte addresses, so that pages of memory can be loaded with instructions aligned to the page address. It is easy to use half-byte addressing as a base. I am leaning towards converting branch displacements back to half-byte displacements.
<
This makes no sense, you lose a lot by doing this. The branch displacement should be in instructions.
So your typical RISC machine the 16-bit branch displacement gets shifted up by 2 bits making it effectively a 18-bit (signed) displacement.
<
In your case, the displacement gets added to the current nibble address IP as ::
newIP = oldIP + displacement<<3+displacement.
<
< The field is 12-bit which IIRC is enough to cover about 99% of branch according to H&P.
<
My way the field is equivalent to 15.25 bits (but I still think you should figure out how to get
16-bits in the field and 19.25 equivalent bytes out of it.)
<
>Using a half-byte displacement means the hardware does not need to multiply the displacement by nine for a branch instruction.
<
3-input adders solve this problem.
<
>It also makes it easy for conditional branching across a page boundary.
<
end around carry from bit 11 back to bit 0 realigns your instructions to page aligned at page boundaries.
<
>I am toying with the idea of supporting compressed instructions which would likely be 20 bits or less in size. Half-byte displacement may be needed in the long run.
>
> Putting seven instructions in a block is a good number. Processing instructions in blocks with meta-data has its own challenges. ANY1 uses a 512-bit (64 byte) cache line with a 36-bit overflow area. The overflow area allows an instruction spanning cache lines to be entirely on the line. The fetch unit is then always able to read a whole instruction in a single cycle even when the instruction spans a cache line. It does cause some data replication in the cache though.
> I have had a call target (TGT) instructions in a couple of ISA’s where the next instruction executed after a call had to be the TGT instruction or an exception would occur.

Re: 34 bit instructions

<399f93e4-033a-48b5-b9c1-ea5c71170cc5n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:5ad5:: with SMTP id d21mr1287306qtd.166.1624324776088; Mon, 21 Jun 2021 18:19:36 -0700 (PDT)
X-Received: by 2002:a9d:333:: with SMTP id 48mr753278otv.329.1624324775870; Mon, 21 Jun 2021 18:19:35 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!tr3.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: Mon, 21 Jun 2021 18:19:35 -0700 (PDT)
In-Reply-To: <051d591e-84a5-4db0-8e24-c95aede422e3n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:fea8:1de1:d400:a5a1:9bc7:c71a:dffc; posting-account=QId4bgoAAABV4s50talpu-qMcPp519Eb
NNTP-Posting-Host: 2607:fea8:1de1:d400:a5a1:9bc7:c71a:dffc
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> <3c3a3a17-82be-43b0-b2b4-2eb8685d9f01n@googlegroups.com> <9d29d3ea-e9a4-42e0-b820-eea3574d4f97n@googlegroups.com> <8439317b-cf4e-4b07-b461-d7e23da9d31fn@googlegroups.com> <051d591e-84a5-4db0-8e24-c95aede422e3n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <399f93e4-033a-48b5-b9c1-ea5c71170cc5n@googlegroups.com>
Subject: Re: 34 bit instructions
From: robfi...@gmail.com (robf...@gmail.com)
Injection-Date: Tue, 22 Jun 2021 01:19:36 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 72
 by: robf...@gmail.com - Tue, 22 Jun 2021 01:19 UTC

On Monday, June 21, 2021 at 7:09:43 PM UTC-4, MitchAlsup wrote:
> On Monday, June 21, 2021 at 5:26:02 PM UTC-5, robf...@gmail.com wrote:
> > Instructions are allowed to be aligned on 0.5 byte addresses, so that pages of memory can be loaded with instructions aligned to the page address. It is easy to use half-byte addressing as a base. I am leaning towards converting branch displacements back to half-byte displacements.
> <
> This makes no sense, you lose a lot by doing this. The branch displacement should be in instructions.
> So your typical RISC machine the 16-bit branch displacement gets shifted up by 2 bits making it effectively a 18-bit (signed) displacement.
> <
> In your case, the displacement gets added to the current nibble address IP as ::
> newIP = oldIP + displacement<<3+displacement.
> <
> < The field is 12-bit which IIRC is enough to cover about 99% of branch according to H&P.
> <
> My way the field is equivalent to 15.25 bits (but I still think you should figure out how to get
> 16-bits in the field and 19.25 equivalent bytes out of it.)
> <
> >Using a half-byte displacement means the hardware does not need to multiply the displacement by nine for a branch instruction.
> <
> 3-input adders solve this problem.
> <
> >It also makes it easy for conditional branching across a page boundary.
> <
> end around carry from bit 11 back to bit 0 realigns your instructions to page aligned at page boundaries.
> <
> >I am toying with the idea of supporting compressed instructions which would likely be 20 bits or less in size. Half-byte displacement may be needed in the long run.
> >
> > Putting seven instructions in a block is a good number. Processing instructions in blocks with meta-data has its own challenges. ANY1 uses a 512-bit (64 byte) cache line with a 36-bit overflow area. The overflow area allows an instruction spanning cache lines to be entirely on the line. The fetch unit is then always able to read a whole instruction in a single cycle even when the instruction spans a cache line. It does cause some data replication in the cache though.
> > I have had a call target (TGT) instructions in a couple of ISA’s where the next instruction executed after a call had to be the TGT instruction or an exception would occur.

The branch instruction format looks like:
Disp7|Tb2|Rb5|Ta2| Ra5| Ty2 | Disp5|v|opcode7

I can get one more bit of space in the instruction by restricting the Ra register field so that it must be a register. Reduces Ta2 to Ta1. Initially I had all the register specs the symmetrically the same, using two bits to indicate vector vs scalar vs constant. I can get one more bit by using more opcodes to represent branches for different data types. Currently there is a two-bit field “Ty2” in the branch instruction for the data type to compare. (int, float, decimal float, or posit). I could move one bit to the seven-bit opcode part. That gives 14-bits for a branch displacement. Not ideal but maybe good-enough, gives the equivalent of about 17 bits of displacement in terms of bytes. I suppose one more bit could be gotten by having only integer compare and branch. Branches for other types of data would need to use a set or compare instruction.

New format would look like:
Disp8|Tb2|Rb5|Ta1| Ra5|Ty1| Disp6|v1|opcode7

An alternative would be to go to a wider 38-bit instruction format.

I seem to have gotten the idea that for software portability reasons it might be a good idea to have the branch range at least 18 bits in terms of bytes.

Re: 34 bit instructions

<4b352f40-4ea1-4322-ba0b-d29aa025682an@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a37:c447:: with SMTP id h7mr2832394qkm.63.1624348033140;
Tue, 22 Jun 2021 00:47:13 -0700 (PDT)
X-Received: by 2002:a4a:3e8e:: with SMTP id t136mr2127978oot.83.1624348032883;
Tue, 22 Jun 2021 00:47:12 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.snarked.org!border2.nntp.dca1.giganews.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: Tue, 22 Jun 2021 00:47:12 -0700 (PDT)
In-Reply-To: <vXB*iCcny@news.chiark.greenend.org.uk>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:56a:f8e3:d700:4414:94ea:7517:e34e;
posting-account=1nOeKQkAAABD2jxp4Pzmx9Hx5g9miO8y
NNTP-Posting-Host: 2001:56a:f8e3:d700:4414:94ea:7517:e34e
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> <a0f7fcfa-625f-4eef-940d-7f1ecd87c872n@googlegroups.com>
<vXB*iCcny@news.chiark.greenend.org.uk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4b352f40-4ea1-4322-ba0b-d29aa025682an@googlegroups.com>
Subject: Re: 34 bit instructions
From: jsav...@ecn.ab.ca (Quadibloc)
Injection-Date: Tue, 22 Jun 2021 07:47:13 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 17
 by: Quadibloc - Tue, 22 Jun 2021 07:47 UTC

On Monday, June 21, 2021 at 8:03:17 AM UTC-6, Theo wrote:
> You
> could maybe work out if an address was divisible by 9 to determine if it's
> the start of a pair or not, and if not assume the instruction is the second
> of a pair. Not impossible but it's rather unwieldy to do that.

I was thinking in terms of having instructions be addressed by an address
that indicates which 36-bit word in memory is desired. That address then
gets multiplied by nine and divided by two to figure out where that word
would be located in "real" memory.
The remainder, that last bit shifted out to the right, tells you if you have
an odd nybble to worry about.
Of course, the trouble is that if your data items are still 8, 16, 32, and 64
bits long, it's harder to tell, if programs and data are in the same address
space, where they bump into each other - while writing programs, because
you're using a different kind of address to refer to code.

John Savard

Re: 34 bit instructions

<sas8po$n5j$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!XpBc3qS8ZZIa50C3RMoQkQ.user.gioia.aioe.org.POSTED!not-for-mail
From: terje.ma...@tmsw.no (Terje Mathisen)
Newsgroups: comp.arch
Subject: Re: 34 bit instructions
Date: Tue, 22 Jun 2021 10:59:36 +0200
Organization: Aioe.org NNTP Server
Lines: 50
Message-ID: <sas8po$n5j$1@gioia.aioe.org>
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>
<a0f7fcfa-625f-4eef-940d-7f1ecd87c872n@googlegroups.com>
<vXB*iCcny@news.chiark.greenend.org.uk>
NNTP-Posting-Host: XpBc3qS8ZZIa50C3RMoQkQ.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101
Firefox/60.0 SeaMonkey/2.53.7.1
X-Notice: Filtered by postfilter v. 0.9.2
 by: Terje Mathisen - Tue, 22 Jun 2021 08:59 UTC

Theo wrote:
> Quadibloc <jsavard@ecn.ab.ca> wrote:
>> 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.
>
> I'm not sure I quite follow. Given instructions are aligned on 4.5 byte
> addresses, then instruction pairs are aligned on 9 byte boundaries. You
> could maybe work out if an address was divisible by 9 to determine if it's
> the start of a pair or not, and if not assume the instruction is the second
> of a pair. Not impossible but it's rather unwieldy to do that. You can do
> it in hardware for the instruction fetch but there are times when software
> needs to know too - maybe you would need a special instruction to do 'mod 9'
> efficiently.
>
> Another way around it would be to have a variation of a branch instruction
> that says 'branch to the second of the pair'. But that wouldn't play nicely
> with indirect branches where you only have the new PC and no information
> which half it's going to.
>
> I think you could probably make it work, although I think there's still risk
> of confusing instruction halves, and it would be nice to avoid any
> ambiguity.

It seems pretty obvious that any non-byte-aligned instruction set would
need to do all code addressing in instruction chunk size. (Even a
34/36-bit instruction set could have combined 68/72-bit opcodes to allow
large immediates etc.)

This way all branches and absolute addresses are in chunk units, only a
compiler/JIT would ever need to convert this to byte offsets, at which
point a compiler intrinsic/inline library function to do the conversions
would make sense.

Terje

--
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

Re: 34 bit instructions

<7cc7e6e1-7f91-4c2f-a632-bc8e1ec47557n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a37:8407:: with SMTP id g7mr10487677qkd.123.1624612820746;
Fri, 25 Jun 2021 02:20:20 -0700 (PDT)
X-Received: by 2002:a9d:c23:: with SMTP id 32mr8529149otr.182.1624612820510;
Fri, 25 Jun 2021 02:20:20 -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, 25 Jun 2021 02:20:20 -0700 (PDT)
In-Reply-To: <sas8po$n5j$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=99.251.79.92; posting-account=QId4bgoAAABV4s50talpu-qMcPp519Eb
NNTP-Posting-Host: 99.251.79.92
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> <a0f7fcfa-625f-4eef-940d-7f1ecd87c872n@googlegroups.com>
<vXB*iCcny@news.chiark.greenend.org.uk> <sas8po$n5j$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7cc7e6e1-7f91-4c2f-a632-bc8e1ec47557n@googlegroups.com>
Subject: Re: 34 bit instructions
From: robfi...@gmail.com (robf...@gmail.com)
Injection-Date: Fri, 25 Jun 2021 09:20:20 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: robf...@gmail.com - Fri, 25 Jun 2021 09:20 UTC

On Tuesday, June 22, 2021 at 4:59:39 AM UTC-4, Terje Mathisen wrote:
> Theo wrote:
> > Quadibloc <jsa...@ecn.ab.ca> wrote:
> >> 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.
> >
> > I'm not sure I quite follow. Given instructions are aligned on 4.5 byte
> > addresses, then instruction pairs are aligned on 9 byte boundaries. You
> > could maybe work out if an address was divisible by 9 to determine if it's
> > the start of a pair or not, and if not assume the instruction is the second
> > of a pair. Not impossible but it's rather unwieldy to do that. You can do
> > it in hardware for the instruction fetch but there are times when software
> > needs to know too - maybe you would need a special instruction to do 'mod 9'
> > efficiently.
> >
> > Another way around it would be to have a variation of a branch instruction
> > that says 'branch to the second of the pair'. But that wouldn't play nicely
> > with indirect branches where you only have the new PC and no information
> > which half it's going to.
> >
> > I think you could probably make it work, although I think there's still risk
> > of confusing instruction halves, and it would be nice to avoid any
> > ambiguity.
> It seems pretty obvious that any non-byte-aligned instruction set would
> need to do all code addressing in instruction chunk size. (Even a
> 34/36-bit instruction set could have combined 68/72-bit opcodes to allow
> large immediates etc.)
>
> This way all branches and absolute addresses are in chunk units, only a
> compiler/JIT would ever need to convert this to byte offsets, at which
> point a compiler intrinsic/inline library function to do the conversions
> would make sense.
>
> Terje
>
> --
> - <Terje.Mathisen at tmsw.no>
> "almost all programming can be viewed as an exercise in caching"

It may seem obvious to use chunk addressing, but it may be a lot easier to use a lowest-common denominator addressing even though it may not be as efficient. For 36 bits machine this is a nybble. For 34-bits a bit pair. At one point I made a 36-bit ISA machine with 18-bit compressed instructions that required bit-pair alignment.
Currently working on the assembler, to use chunk addressing with inline parameters they must be a multiple of a chunk size. This means counting the nybbles output and making sure it is a multiple of nine. Nonsense like this would not be necessary with LCD addressing.

Re: 34 bit instructions

<f7462847-dd4e-4a2e-90c2-84d4f5496befn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:1116:: with SMTP id o22mr4568994qkk.299.1624770591164;
Sat, 26 Jun 2021 22:09:51 -0700 (PDT)
X-Received: by 2002:a4a:8901:: with SMTP id f1mr15107935ooi.66.1624770590945;
Sat, 26 Jun 2021 22:09: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: Sat, 26 Jun 2021 22:09:50 -0700 (PDT)
In-Reply-To: <3bead7c5-3e63-4bba-a03e-f6ddbedcb8ffn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:56a:f8e3:d700:d1a6:2b2e:9e6e:2783;
posting-account=1nOeKQkAAABD2jxp4Pzmx9Hx5g9miO8y
NNTP-Posting-Host: 2001:56a:f8e3:d700:d1a6:2b2e:9e6e:2783
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com> <3bead7c5-3e63-4bba-a03e-f6ddbedcb8ffn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f7462847-dd4e-4a2e-90c2-84d4f5496befn@googlegroups.com>
Subject: Re: 34 bit instructions
From: jsav...@ecn.ab.ca (Quadibloc)
Injection-Date: Sun, 27 Jun 2021 05:09:51 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Quadibloc - Sun, 27 Jun 2021 05:09 UTC

On Thursday, June 17, 2021 at 3:10:20 AM UTC-6, Quadibloc wrote:
> 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.

I've streamlined the architecture down from five instruction sets to two, but I was
still dissatisfied.

Basically, there's one instruction set composed of 32-bit instructions and pairs of 16 bit
instructions only. To make that instruction set complete by my standards, all sorts of
restrictions on addressing modes and so on have been used to squeeze everything in.

The other instruction set works this way:

Every 16 bits left after the header has two bits associated with it, to specify 'immediately'
how it is to be decoded.

If those two bits are 00 or 01, the 16 bits are the first 16 bits of a 32-bit instruction.
If those two bits are 11, the 16 bits don't begin an instruction, so the decoder ignores them
until an instruction begun in a previous halfword calls for their decoding as part of that
instruction - if that happens.
If those two bits are 10, the instruction could be 16, 48, or 64 bits long - as determined by the
first few bits of the instruction.

The idea is that one goes _directly_ from these bits to decoding the instruction at the point
they refer to; there's no need to decode instructions one after the other.

To attain that goal, the coding is somewhat redundant.

I was dissatisfied because making the 32-bit instructions into 33-bit instructions got rid of
the _worst_ of the compromises made to squeeze them all in, but not all the compromises
that... of course could be avoided by going to a 48-bit instruction, but in many cases that would
be wasteful.

I considered a number of alternatives, and I finally came up with one I liked. The decoding is
a little more complicated, but it's still direct, and now the 32-bit instructions have become 34 bits.

Step 1: The pairs of bits that are 00 and 01 begin 32-bit instructions. The following pair of bits,
now known to be the second half of a 32-bit instruction, can be either 10 or 11, and the two pairs
of bits together indicate one of four sets of 32-bit instructions.

Step 2: Any remaining pairs of bits that are 10 or 11, which don't follow a pair of bits starting
with zero, are interpreted as before: 10 - an instruction begins here that is not 32 bits long,
11 - no instruction begins here.

John Savard

Re: 34 bit instructions

<0034c77f-9854-4ef6-b3b0-f6b90e918e3an@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:550d:: with SMTP id j13mr16643803qtq.131.1624775369905; Sat, 26 Jun 2021 23:29:29 -0700 (PDT)
X-Received: by 2002:a9d:70c1:: with SMTP id w1mr12596004otj.82.1624775369266; Sat, 26 Jun 2021 23:29:29 -0700 (PDT)
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!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: Sat, 26 Jun 2021 23:29:29 -0700 (PDT)
In-Reply-To: <f7462847-dd4e-4a2e-90c2-84d4f5496befn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=99.251.79.92; posting-account=QId4bgoAAABV4s50talpu-qMcPp519Eb
NNTP-Posting-Host: 99.251.79.92
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com> <3bead7c5-3e63-4bba-a03e-f6ddbedcb8ffn@googlegroups.com> <f7462847-dd4e-4a2e-90c2-84d4f5496befn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0034c77f-9854-4ef6-b3b0-f6b90e918e3an@googlegroups.com>
Subject: Re: 34 bit instructions
From: robfi...@gmail.com (robf...@gmail.com)
Injection-Date: Sun, 27 Jun 2021 06:29:29 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 109
 by: robf...@gmail.com - Sun, 27 Jun 2021 06:29 UTC

On Sunday, June 27, 2021 at 1:09:52 AM UTC-4, Quadibloc wrote:
> On Thursday, June 17, 2021 at 3:10:20 AM UTC-6, Quadibloc wrote:
> > 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.
>
> I've streamlined the architecture down from five instruction sets to two, but I was
> still dissatisfied.
>
> Basically, there's one instruction set composed of 32-bit instructions and pairs of 16 bit
> instructions only. To make that instruction set complete by my standards, all sorts of
> restrictions on addressing modes and so on have been used to squeeze everything in.
>
> The other instruction set works this way:
>
> Every 16 bits left after the header has two bits associated with it, to specify 'immediately'
> how it is to be decoded.
>
> If those two bits are 00 or 01, the 16 bits are the first 16 bits of a 32-bit instruction.
> If those two bits are 11, the 16 bits don't begin an instruction, so the decoder ignores them
> until an instruction begun in a previous halfword calls for their decoding as part of that
> instruction - if that happens.
> If those two bits are 10, the instruction could be 16, 48, or 64 bits long - as determined by the
> first few bits of the instruction.
>
> The idea is that one goes _directly_ from these bits to decoding the instruction at the point
> they refer to; there's no need to decode instructions one after the other..
>
> To attain that goal, the coding is somewhat redundant.
>
> I was dissatisfied because making the 32-bit instructions into 33-bit instructions got rid of
> the _worst_ of the compromises made to squeeze them all in, but not all the compromises
> that... of course could be avoided by going to a 48-bit instruction, but in many cases that would
> be wasteful.
>
> I considered a number of alternatives, and I finally came up with one I liked. The decoding is
> a little more complicated, but it's still direct, and now the 32-bit instructions have become 34 bits.
>
> Step 1: The pairs of bits that are 00 and 01 begin 32-bit instructions. The following pair of bits,
> now known to be the second half of a 32-bit instruction, can be either 10 or 11, and the two pairs
> of bits together indicate one of four sets of 32-bit instructions.
>
> Step 2: Any remaining pairs of bits that are 10 or 11, which don't follow a pair of bits starting
> with zero, are interpreted as before: 10 - an instruction begins here that is not 32 bits long,
> 11 - no instruction begins here.
>
> John Savard

I believe I understand the instruction layout. Is it using the block header to select the instruction set? I have shied away from using block headers because the software has to somehow come up with them. How does the linker / loader handle moving instructions around?

I settled on 512-bit cache line length as that is four 128-bit accesses to memory. The system memory controller acts on data in 128-bit strips. The more consecutive burst accesses that can be made, the more efficient they are.. Loading more strips would be even more efficient from a memory access point of view, but more than 512-bits seems excessive.

To support a variable length instruction set for the RTF64, the instructions are pre-decoded at cache load time. The cache load is from memory so there are lots of cycles available to do efficient decoding. All that is needed at that point is the length so only a length decoder is used. Decoders amount to a lookup-table as the length can be determined solely by looking at the first byte of the instruction. Instructions vary in length from one to eight bytes.
At every possible instruction boundary the length of the instruction that might be beginning at that location is calculated. The length information is stored in a cache line shadowing the regular instruction data. Whenever an instruction is fetched the length is immediately available with no decoding required. This makes it possible to find instructions with minimal delay.

I am a fan of the way RISC-V represents instruction lengths. I do not think it could be much more efficient. But I think for larger machines (64-bit+) I think the instruction really needs to be a little wider than 32—bits, 34 or 36 bits.

Robert Finch

Re: 34 bit instructions

<d2ab7f5a-9ca8-4bab-83e8-fdbe934fdad7n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a37:b6c5:: with SMTP id g188mr18996564qkf.92.1624780058485;
Sun, 27 Jun 2021 00:47:38 -0700 (PDT)
X-Received: by 2002:a9d:7f91:: with SMTP id t17mr16189467otp.22.1624780058177;
Sun, 27 Jun 2021 00:47:38 -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: Sun, 27 Jun 2021 00:47:37 -0700 (PDT)
In-Reply-To: <0034c77f-9854-4ef6-b3b0-f6b90e918e3an@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:56a:f8e3:d700:d1a6:2b2e:9e6e:2783;
posting-account=1nOeKQkAAABD2jxp4Pzmx9Hx5g9miO8y
NNTP-Posting-Host: 2001:56a:f8e3:d700:d1a6:2b2e:9e6e:2783
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
<3bead7c5-3e63-4bba-a03e-f6ddbedcb8ffn@googlegroups.com> <f7462847-dd4e-4a2e-90c2-84d4f5496befn@googlegroups.com>
<0034c77f-9854-4ef6-b3b0-f6b90e918e3an@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d2ab7f5a-9ca8-4bab-83e8-fdbe934fdad7n@googlegroups.com>
Subject: Re: 34 bit instructions
From: jsav...@ecn.ab.ca (Quadibloc)
Injection-Date: Sun, 27 Jun 2021 07:47:38 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Quadibloc - Sun, 27 Jun 2021 07:47 UTC

On Sunday, June 27, 2021 at 12:29:30 AM UTC-6, robf...@gmail.com wrote:

> I believe I understand the instruction layout. Is it using the block header
> to select the instruction set? I have shied away from using block headers
> because the software has to somehow come up with them. How does
> the linker / loader handle moving instructions around?

Just as programs for the Itanium are built up from 128-bit blocks which
are treated as single instructions by the linker/loader, my Concertina II
architecture builds programs from 256-bit blocks.

The computer reads 256 bits of program code from memory, which
must be aligned on a 256-bit boundary.

Unless the first 32 bits of that block contains one of two special bit
patterns, the block would consist of eight 32-bit instructions. In this
default case, because all the instructions are the same length, the
computer can immediately start decoding each one of the instructions
in parallel.

But the instructions still have to be executed one after the other in order -
or at least it has to _look_ like that's what happened (no doubt you've
heard of out-of-order execution, reservation stations, rename registers,
the arcane tech used to achieve that).

But the block _can_ have a header. If it does, it's in an alternative format.

The alternative block formats serve a number of purposes.

The most basic purpose is to state that instead of seven instructions after
the header, there are only five or six or even less. This allows some register-to-register
operate instructions to replace one of their source register operands by a pointer
into that unused space.

As Mitch Alsup has noted, there's an advantage if programs use instructions in
"immediate mode" instead of fetching constant values from the data area of memory.
Memory fetches are expensive these days compared to CPU calculations; an
immediate value is within the instruction stream, which is being fetched in consecutive
locations - which are the easiest for today's DRAM chips to supply.

But I had a problem with putting immediate values in instructions in the ordinary way:
immediate values come in different lengths, and this would make decoding the length
of an instruction complicated. I took inspiration from a scheme called "heads-and-tails
encoding", but I modified it to use pointers, even though they would take up some extra
space, again so that every instruction could be fully decoded independently of every other
instruction in the same block, for greater speed.

That's what I started with. But having a block header let me do other things.

One other thing I was able to do was add VLIW features to the architecture.

Things like instruction predication - I included a set of flag bits in the architecture
that could be set up ahead of time, and then in a block format including predication,
some instructions could be specified as only to be executed if a certain flag was set
a certain way.

Or explicit indication of parallelism. After all the instructions in a block have been
decoded separately in parallel... do they have to be executed one after the other?
Or are some instructions independent of the other instructions before them in the
block, so they can be started right away?

The Itanium did this. So do DSP chips, and I've modelled my scheme more on how
DSP chips work than on the Itanium.

And another thing the block headers can let me do is use an alternate instruction
set. I wanted that option because the requirement for every instruction to be
exactly 32 bits long (actually, I also allowed pairs of 16-bit instructions in a 32-bit
instruction slot, even without a header) was restrictive. Some types of instruction I
wanted to make available needed at least 48 bits to be specified. And even just
fitting all the basic operations into 32 bit instructions - because of the addressing
modes I wanted, and because I wanted to use register banks of 32 registers instead
of just eight (so that there would be less need for out-of-order operation for the
processor to run efficiently) - was difficult. I had to restrict the addressing modes
available on some types of instructions.

So if a program only needs the 32-bit instructions for most of its length, then it
can mostly consist of blocks in the simplest posible format. Occasionally, it
can include blocks in other formats to use the additional instructions in the
alternate set.

Or a subroutine meant to be very efficient - on a minimal implementation without
the out-of-order feature - can be made up of blocks in one of the formats that use
DSP features. So the architecture is suited to implementation on small chips for
embedded use, or big chips for high-power processing - at least, that's my goal.

John Savard

Re: 34 bit instructions

<aaa305e2-5b13-4afe-b8f1-9bc0c1595338n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a37:59c7:: with SMTP id n190mr21125471qkb.146.1624812706279;
Sun, 27 Jun 2021 09:51:46 -0700 (PDT)
X-Received: by 2002:aca:3d56:: with SMTP id k83mr12701557oia.110.1624812706022;
Sun, 27 Jun 2021 09:51:46 -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: Sun, 27 Jun 2021 09:51:45 -0700 (PDT)
In-Reply-To: <f7462847-dd4e-4a2e-90c2-84d4f5496befn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:8ceb:68e4:4832:bb07;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:8ceb:68e4:4832:bb07
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
<3bead7c5-3e63-4bba-a03e-f6ddbedcb8ffn@googlegroups.com> <f7462847-dd4e-4a2e-90c2-84d4f5496befn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <aaa305e2-5b13-4afe-b8f1-9bc0c1595338n@googlegroups.com>
Subject: Re: 34 bit instructions
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Sun, 27 Jun 2021 16:51:46 +0000
Content-Type: text/plain; charset="UTF-8"
 by: MitchAlsup - Sun, 27 Jun 2021 16:51 UTC

On Sunday, June 27, 2021 at 12:09:52 AM UTC-5, Quadibloc wrote:
> On Thursday, June 17, 2021 at 3:10:20 AM UTC-6, Quadibloc wrote:
> > 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.
>
> I've streamlined the architecture down from five instruction sets to two, but I was
> still dissatisfied.
>
> Basically, there's one instruction set composed of 32-bit instructions and pairs of 16 bit
> instructions only. To make that instruction set complete by my standards, all sorts of
> restrictions on addressing modes and so on have been used to squeeze everything in.
>
> The other instruction set works this way:
>
> Every 16 bits left after the header has two bits associated with it, to specify 'immediately'
> how it is to be decoded.
>
> If those two bits are 00 or 01, the 16 bits are the first 16 bits of a 32-bit instruction.
> If those two bits are 11, the 16 bits don't begin an instruction, so the decoder ignores them
> until an instruction begun in a previous halfword calls for their decoding as part of that
> instruction - if that happens.
> If those two bits are 10, the instruction could be 16, 48, or 64 bits long - as determined by the
> first few bits of the instruction.
<
Once you added the 10 format, which requires you to look at more bits to determine instruction
length, you ended up at the same gate delay as My 66000 in determining the location of the
successive instruction.
<
And as we have seen, My 66000 can decode as many as 16 instruction lengths per cycle
and is more likely instruction buffer width bound than instruction length bound when decoding
into SuperScalarity.
>
> The idea is that one goes _directly_ from these bits to decoding the instruction at the point
> they refer to; there's no need to decode instructions one after the other.
<
This is what the PARSE stage of my pipelines do, identify the position and width of each instruction
and then route the required bits to the subsequent DECODE stage. But even here, with My 66000,
Once issue width gets in the range of 6-8 inst/cycle I flip over to a different encoding technique
where I cache instruction issues not a stream of instructions.
>
> To attain that goal, the coding is somewhat redundant.
>
> I was dissatisfied because making the 32-bit instructions into 33-bit instructions got rid of
> the _worst_ of the compromises made to squeeze them all in, but not all the compromises
> that... of course could be avoided by going to a 48-bit instruction, but in many cases that would
> be wasteful.
>
> I considered a number of alternatives, and I finally came up with one I liked. The decoding is
> a little more complicated, but it's still direct, and now the 32-bit instructions have become 34 bits.
>
> Step 1: The pairs of bits that are 00 and 01 begin 32-bit instructions. The following pair of bits,
> now known to be the second half of a 32-bit instruction, can be either 10 or 11, and the two pairs
> of bits together indicate one of four sets of 32-bit instructions.
>
> Step 2: Any remaining pairs of bits that are 10 or 11, which don't follow a pair of bits starting
> with zero, are interpreted as before: 10 - an instruction begins here that is not 32 bits long,
> 11 - no instruction begins here.
>
> John Savard

Re: 34 bit instructions

<e18fe8e3-8c1b-4dce-a0aa-105b19448ecen@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a37:71c1:: with SMTP id m184mr11389896qkc.367.1624813031918;
Sun, 27 Jun 2021 09:57:11 -0700 (PDT)
X-Received: by 2002:a9d:ecf:: with SMTP id 73mr13585077otj.5.1624813031695;
Sun, 27 Jun 2021 09:57:11 -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: Sun, 27 Jun 2021 09:57:11 -0700 (PDT)
In-Reply-To: <d2ab7f5a-9ca8-4bab-83e8-fdbe934fdad7n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:8ceb:68e4:4832:bb07;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:8ceb:68e4:4832:bb07
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
<3bead7c5-3e63-4bba-a03e-f6ddbedcb8ffn@googlegroups.com> <f7462847-dd4e-4a2e-90c2-84d4f5496befn@googlegroups.com>
<0034c77f-9854-4ef6-b3b0-f6b90e918e3an@googlegroups.com> <d2ab7f5a-9ca8-4bab-83e8-fdbe934fdad7n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e18fe8e3-8c1b-4dce-a0aa-105b19448ecen@googlegroups.com>
Subject: Re: 34 bit instructions
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Sun, 27 Jun 2021 16:57:11 +0000
Content-Type: text/plain; charset="UTF-8"
 by: MitchAlsup - Sun, 27 Jun 2021 16:57 UTC

On Sunday, June 27, 2021 at 2:47:39 AM UTC-5, Quadibloc wrote:
> On Sunday, June 27, 2021 at 12:29:30 AM UTC-6, robf...@gmail.com wrote:
>
> > I believe I understand the instruction layout. Is it using the block header
> > to select the instruction set? I have shied away from using block headers
> > because the software has to somehow come up with them. How does
> > the linker / loader handle moving instructions around?
> Just as programs for the Itanium are built up from 128-bit blocks which
> are treated as single instructions by the linker/loader, my Concertina II
> architecture builds programs from 256-bit blocks.
>
> The computer reads 256 bits of program code from memory, which
> must be aligned on a 256-bit boundary.
>
> Unless the first 32 bits of that block contains one of two special bit
> patterns, the block would consist of eight 32-bit instructions. In this
> default case, because all the instructions are the same length, the
> computer can immediately start decoding each one of the instructions
> in parallel.
>
> But the instructions still have to be executed one after the other in order -
> or at least it has to _look_ like that's what happened (no doubt you've
> heard of out-of-order execution, reservation stations, rename registers,
> the arcane tech used to achieve that).
>
> But the block _can_ have a header. If it does, it's in an alternative format.
>
> The alternative block formats serve a number of purposes.
>
> The most basic purpose is to state that instead of seven instructions after
> the header, there are only five or six or even less. This allows some register-to-register
> operate instructions to replace one of their source register operands by a pointer
> into that unused space.
>
> As Mitch Alsup has noted, there's an advantage if programs use instructions in
> "immediate mode" instead of fetching constant values from the data area of memory.
<
Available earlier in the pipeline,
No pollution of the data cache,
No silly readable status in the MMU tables for fetch only data,
No wasting of registers to hold a constant,
.....
<
> Memory fetches are expensive these days compared to CPU calculations; an
> immediate value is within the instruction stream, which is being fetched in consecutive
> locations - which are the easiest for today's DRAM chips to supply.
<
The I cache is faster than the D cache because the D cache will invariably have a
load aligner whereas everything coming out of the I cache has word alignment.
<
>
> But I had a problem with putting immediate values in instructions in the ordinary way:
> immediate values come in different lengths, and this would make decoding the length
> of an instruction complicated.
>
As I just showed above, yours is already as hard (in delay) to decode as My 66000
in the case where the 2 leading bits are 10.
>
> I took inspiration from a scheme called "heads-and-tails
> encoding", but I modified it to use pointers, even though they would take up some extra
> space, again so that every instruction could be fully decoded independently of every other
> instruction in the same block, for greater speed.
>
> That's what I started with. But having a block header let me do other things.
>
> One other thing I was able to do was add VLIW features to the architecture.
>
> Things like instruction predication - I included a set of flag bits in the architecture
> that could be set up ahead of time, and then in a block format including predication,
> some instructions could be specified as only to be executed if a certain flag was set
> a certain way.
>
> Or explicit indication of parallelism. After all the instructions in a block have been
> decoded separately in parallel... do they have to be executed one after the other?
> Or are some instructions independent of the other instructions before them in the
> block, so they can be started right away?
>
> The Itanium did this. So do DSP chips, and I've modelled my scheme more on how
> DSP chips work than on the Itanium.
>
> And another thing the block headers can let me do is use an alternate instruction
> set. I wanted that option because the requirement for every instruction to be
> exactly 32 bits long (actually, I also allowed pairs of 16-bit instructions in a 32-bit
> instruction slot, even without a header) was restrictive. Some types of instruction I
> wanted to make available needed at least 48 bits to be specified. And even just
> fitting all the basic operations into 32 bit instructions - because of the addressing
> modes I wanted, and because I wanted to use register banks of 32 registers instead
> of just eight (so that there would be less need for out-of-order operation for the
> processor to run efficiently) - was difficult. I had to restrict the addressing modes
> available on some types of instructions.
>
> So if a program only needs the 32-bit instructions for most of its length, then it
> can mostly consist of blocks in the simplest posible format. Occasionally, it
> can include blocks in other formats to use the additional instructions in the
> alternate set.
>
> Or a subroutine meant to be very efficient - on a minimal implementation without
> the out-of-order feature - can be made up of blocks in one of the formats that use
> DSP features. So the architecture is suited to implementation on small chips for
> embedded use, or big chips for high-power processing - at least, that's my goal.
>
> John Savard

Re: 34 bit instructions

<2aea707d-c135-4dd5-ac2a-460b44d9a52bn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:622a:147:: with SMTP id v7mr19203153qtw.246.1624822791748;
Sun, 27 Jun 2021 12:39:51 -0700 (PDT)
X-Received: by 2002:a9d:d09:: with SMTP id 9mr17919931oti.16.1624822791423;
Sun, 27 Jun 2021 12:39:51 -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: Sun, 27 Jun 2021 12:39:51 -0700 (PDT)
In-Reply-To: <aaa305e2-5b13-4afe-b8f1-9bc0c1595338n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:56a:f8e3:d700:a9cd:c4dc:8658:7171;
posting-account=1nOeKQkAAABD2jxp4Pzmx9Hx5g9miO8y
NNTP-Posting-Host: 2001:56a:f8e3:d700:a9cd:c4dc:8658:7171
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
<3bead7c5-3e63-4bba-a03e-f6ddbedcb8ffn@googlegroups.com> <f7462847-dd4e-4a2e-90c2-84d4f5496befn@googlegroups.com>
<aaa305e2-5b13-4afe-b8f1-9bc0c1595338n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2aea707d-c135-4dd5-ac2a-460b44d9a52bn@googlegroups.com>
Subject: Re: 34 bit instructions
From: jsav...@ecn.ab.ca (Quadibloc)
Injection-Date: Sun, 27 Jun 2021 19:39:51 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 35
 by: Quadibloc - Sun, 27 Jun 2021 19:39 UTC

On Sunday, June 27, 2021 at 10:51:47 AM UTC-6, MitchAlsup wrote:

> Once you added the 10 format, which requires you to look at more bits to determine instruction
> length, you ended up at the same gate delay as My 66000 in determining the location of the
> successive instruction.

Ah, but you were able to decode My 66000 that quickly because you are an expert logic designer,
whereas my format is intended to be decoded quickly even if the logic to decode it is designed
by duffers like myself!

Also, remember that I'm not just thinking of the time to decode the length of _one instruction_;
I'm trying to decode all the instructions in a 256-bit block *in parallel*, where decoding takes
place locally, without any need to worry about the lengths of preceding instructions. Are you
sure you've taken _that_ into consideration?

In any case, though, my joy at finding so much more opcode space has now been dampened.

My goal was, with such a vast amount of opcode space for "32-bit" instructions, to remove all
the silly addressing mode restrictions from them, so as to return to the simplicity of such
architectures as the IBM System/360.

However, if I'm going to include memory-to-register operate instructions without any address
mode restrictions, but just for the basic operations... even without a C bit (oops!) I need three
of the four 32-bit opcode spaces I've made available for myself. The fourth one isn't quite
enough to handle removing address mode restrictions for everything else.

I have come up with ideas to increase the amount of opcode space available from four
opcode spaces to five and one-quarter opcode spaces, but they're ugly. The other alternative
is to accept a restriction to aligned operands for the memory-to-register operate instructions
only, which is not unreasonable.

So I still am not satisfied. That, of course, is my own fault, for being so unreasonable and
greedy. Ah well, I can always make another visit to the drawing board, and perhaps come up
with something that I will be content to accept.

John Savard

Re: 34 bit instructions

<78516cae-730e-4d0f-a0db-d8b1cf5ab025n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a0c:bf4b:: with SMTP id b11mr22669981qvj.11.1624825288430;
Sun, 27 Jun 2021 13:21:28 -0700 (PDT)
X-Received: by 2002:a9d:c23:: with SMTP id 32mr17795641otr.182.1624825288197;
Sun, 27 Jun 2021 13:21: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: Sun, 27 Jun 2021 13:21:27 -0700 (PDT)
In-Reply-To: <2aea707d-c135-4dd5-ac2a-460b44d9a52bn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:8ceb:68e4:4832:bb07;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:8ceb:68e4:4832:bb07
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
<3bead7c5-3e63-4bba-a03e-f6ddbedcb8ffn@googlegroups.com> <f7462847-dd4e-4a2e-90c2-84d4f5496befn@googlegroups.com>
<aaa305e2-5b13-4afe-b8f1-9bc0c1595338n@googlegroups.com> <2aea707d-c135-4dd5-ac2a-460b44d9a52bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <78516cae-730e-4d0f-a0db-d8b1cf5ab025n@googlegroups.com>
Subject: Re: 34 bit instructions
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Sun, 27 Jun 2021 20:21:28 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: MitchAlsup - Sun, 27 Jun 2021 20:21 UTC

On Sunday, June 27, 2021 at 2:39:52 PM UTC-5, Quadibloc wrote:
> On Sunday, June 27, 2021 at 10:51:47 AM UTC-6, MitchAlsup wrote:
>
> > Once you added the 10 format, which requires you to look at more bits to determine instruction
> > length, you ended up at the same gate delay as My 66000 in determining the location of the
> > successive instruction.
> Ah, but you were able to decode My 66000 that quickly because you are an expert logic designer,
> whereas my format is intended to be decoded quickly even if the logic to decode it is designed
> by duffers like myself!
<
I fretted long and hard about coming up with a code before getting that part of the decode process
enumerated. Logic drove the encoding--which is why is can be so expressive and (delay) efficient.
>
> Also, remember that I'm not just thinking of the time to decode the length of _one instruction_;
> I'm trying to decode all the instructions in a 256-bit block *in parallel*, where decoding takes
> place locally, without any need to worry about the lengths of preceding instructions. Are you
> sure you've taken _that_ into consideration?
<
Yes,
<
As I have enumerated several times, I am targeting a range of implementations from the
small (MIPS R-2000 level) up to the large (bigger than 8-instruction per cycle Out of Order).
But having done a 6-wide GBOoO I am aware of instruction caching techniques that solve
not just the decode problem, but the enumerated register data flow problem, too.
>
> In any case, though, my joy at finding so much more opcode space has now been dampened.
<
And yet MY 66000 has only grown from 59 instruction to 61 because I made a power×efficiency
argument on ABS and CopySign. Routing in {0, or S2<63>} for S1<63> is more power efficient
than a compare instruction, in addition, I can conceive of implementations where this takes
zero cycles of execution (it is done in the forwarding path.)
>
> My goal was, with such a vast amount of opcode space for "32-bit" instructions, to remove all
> the silly addressing mode restrictions from them, so as to return to the simplicity of such
> architectures as the IBM System/360.
<
Which I continue to think of as misguided (if not an outright mistake); but I am willing to watch
your gyrations to see if you are closing in, or just appearing to make forward progress.
>
> However, if I'm going to include memory-to-register operate instructions without any address
> mode restrictions, but just for the basic operations... even without a C bit (oops!) I need three
> of the four 32-bit opcode spaces I've made available for myself. The fourth one isn't quite
> enough to handle removing address mode restrictions for everything else.
<
I have roughly 23 out of 64 Major OpCodes reserved for the future and another 6 reserved in
perpetuity for protection against executing data. I have more than ½ of my memory OpCOde
space reserved for the future, more than ½ my 2-operand space reserved for the future, 3 of 8
of my 3-operand space reserved for the future, and 96% of my 1-operand space so reserved.
>
> I have come up with ideas to increase the amount of opcode space available from four
> opcode spaces to five and one-quarter opcode spaces, but they're ugly. The other alternative
> is to accept a restriction to aligned operands for the memory-to-register operate instructions
> only, which is not unreasonable.
<
This is the gyrations I was mentioning above.
>
> So I still am not satisfied. That, of course, is my own fault, for being so unreasonable and
> greedy. Ah well, I can always make another visit to the drawing board, and perhaps come up
> with something that I will be content to accept.
<
I did similarly over my 38 year career, and then I saw the light and got rid of the things in my
way and distilled it down to the necessities in an elegant and efficient encoding. Perhaps you
will eventually arrive at your destination.
>
> John Savard

Re: 34 bit instructions

<26388328-e722-456e-9a36-277ff8b6eba8n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ad4:5d4d:: with SMTP id jk13mr24113767qvb.28.1624859077882;
Sun, 27 Jun 2021 22:44:37 -0700 (PDT)
X-Received: by 2002:a9d:d09:: with SMTP id 9mr19185379oti.16.1624859077627;
Sun, 27 Jun 2021 22:44:37 -0700 (PDT)
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!news.mixmin.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: Sun, 27 Jun 2021 22:44:37 -0700 (PDT)
In-Reply-To: <2aea707d-c135-4dd5-ac2a-460b44d9a52bn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:56a:f8e3:d700:a9cd:c4dc:8658:7171;
posting-account=1nOeKQkAAABD2jxp4Pzmx9Hx5g9miO8y
NNTP-Posting-Host: 2001:56a:f8e3:d700:a9cd:c4dc:8658:7171
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
<3bead7c5-3e63-4bba-a03e-f6ddbedcb8ffn@googlegroups.com> <f7462847-dd4e-4a2e-90c2-84d4f5496befn@googlegroups.com>
<aaa305e2-5b13-4afe-b8f1-9bc0c1595338n@googlegroups.com> <2aea707d-c135-4dd5-ac2a-460b44d9a52bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <26388328-e722-456e-9a36-277ff8b6eba8n@googlegroups.com>
Subject: Re: 34 bit instructions
From: jsav...@ecn.ab.ca (Quadibloc)
Injection-Date: Mon, 28 Jun 2021 05:44:37 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Quadibloc - Mon, 28 Jun 2021 05:44 UTC

On Sunday, June 27, 2021 at 1:39:52 PM UTC-6, Quadibloc wr
> However, if I'm going to include memory-to-register operate instructions without any address
> mode restrictions, but just for the basic operations... even without a C bit (oops!) I need three
> of the four 32-bit opcode spaces I've made available for myself.

As that meant I would have to accept restricting those instructions to aligned operands,
I decided it was possible to go ahead. Also removing address mode restrictions from the
load/store instructions for the enlarged sets of 128 registers meant I still did have to use
the technique to expand the opcode space to five 32-bit opcode spaces, but at least now
I have the result that:

- everything fits that I intended to put in;
- the "extended mode" set now contrasts with the plain 32-bit instruction set, by
providing a significantly expanded instruction code repertoire in return for its
overhead costs, thus justifying its existence better;
- the coding for the prefix bits is more efficient - there are still only two of them
per each 16 bits of code, but now they provide more information - and yet they're
still decoded in a local and parallel manner.

None the less, the criticism that my ISA is overly complicated...

is one the validity of which is obvious even to me. If I manage to think of a simpler
way to achieve my goals to an extent that satisfies me, that will be wonderful. Although
I suspect that it is my goals that are badly flawed in that they can't really be achieved in
a reasonable manner.

John Savard

Re: 34 bit instructions

<xuWdnfOSDPdU3ED9nZ2dnUU7-e_NnZ2d@giganews.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!buffer1.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Wed, 30 Jun 2021 23:17:13 -0500
Newsgroups: comp.arch
Subject: Re: 34 bit instructions
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com> <3c3a3a17-82be-43b0-b2b4-2eb8685d9f01n@googlegroups.com> <9d29d3ea-e9a4-42e0-b820-eea3574d4f97n@googlegroups.com> <8439317b-cf4e-4b07-b461-d7e23da9d31fn@googlegroups.com>
Organization: provalid.com
X-Newsreader: trn 4.0-test76 (Apr 2, 2001)
From: keg...@provalid.com (Kent Dickey)
Originator: kegs@provalid.com (Kent Dickey)
Message-ID: <xuWdnfOSDPdU3ED9nZ2dnUU7-e_NnZ2d@giganews.com>
Date: Wed, 30 Jun 2021 23:17:13 -0500
Lines: 71
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-3Nf7xOxQCSUfMbHNlLTrhpkS4H8UUXKtKAZFMuhyeE5mWzsD8GbxN8vTUGTxFU4Rj6dMadWIDKkW3C3!2YBkTN2A/TuBZEox96w4rnn5HBsXb/Z1OoZlAF5eIiCISIcI4Rv5hxpv20d+5ShlRMoClDrPNwg=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 5003
 by: Kent Dickey - Thu, 1 Jul 2021 04:17 UTC

In article <8439317b-cf4e-4b07-b461-d7e23da9d31fn@googlegroups.com>,
robf...@gmail.com <robfi680@gmail.com> wrote:
>Instructions are allowed to be aligned on 0.5 byte addresses, so that
>pages of memory can be loaded with instructions aligned to the page
>address. It is easy to use half-byte addressing as a base. I am leaning
>towards converting branch displacements back to half-byte displacements.
>The field is 12-bit which IIRC is enough to cover about 99% of branch
>according to H&P. Using a half-byte displacement means the hardware does
>not need to multiply the displacement by nine for a branch instruction.
>It also makes it easy for conditional branching across a page boundary.
>I am toying with the idea of supporting compressed instructions which
>would likely be 20 bits or less in size. Half-byte displacement may be
>needed in the long run.

IA64 showed that they could put 3 instructions in 128 bits and have this
not be a problem. It basically treated instruction pointers [63:4] pointing
to a 128-bit block, and [3:2] pointing to the instruction offset, where
only the values 0, 1, 2 are valid.

For you to pack 15 34-bit instructions in 512 (64 bytes) bits, the PC would
be:

[63:6]: Addr[63:6] to point to this 64-byte block
[5:2]: Instr offset, in the range 0...0xe. 0xf (1111) is an illegal value
[1:0]: 00

So, PC = 0x1234 would point to the 64-byte block at 0x1200, and would
point to instruction 0xd displacement, which is +13*34 bits into that block.

PC would increment by 4 generally for each instruction executed, but if
[5:2] would equal '1111', it instead wraps up the next block.

The overall cost of this in hardware is almost 0, in terms of logic, and
in terms of speed. The cost to software is very nearly 0, but the
assembler/linker need changes (but if they already support IA64, the
changes are easy).

This idea can support any number of weird instructions in any size block. I
think 512 bits is a large chunk size, and you're better off fitting into
256-bits, merely because it's likely the linker will require all functions to
start at a chunk size (otherwise, the final link would be very annoying).
Spending all this effort to squeeze instructions to this weird size could be
wasted by the alignment issues--the last chunk of a function would likely be
just 1/2 full on average, wasting 256 bits for every function. This adds up
if there are a lot of small methods. It's very possible 36 bit instructions
fitting in 256 bits would actually result in less code bytes (since now
you're wasting on everage 128 bits per method, and not 256-bits), and even
more likely if you can use the extra instruction bits to sometimes save an
instruction.

The instructions don't even all have to be the same size, or have a simple
offset formula--IA64 places an encoding template in the 128-bit chunk, but
this isn't a good use of those bits. You have 2 bits left over (34*15=510
bits), you can make that a runt first instruction, where an encoding could be:

00: NOP, almost always used when not the first chunk of a function
01: BIG_ENTER: save all callee-saves registers, FP=SP, whatever else you want.
10: SMALL_ENTER: save half of the callee-saves registers
11: SP=SP-256; FP=SP. Simple function entry, creates small frame

Another idea is a sort-of-delayed branch:
11: RET at end of this chunk

This is sort of like a delayed branch, but it really isn't. This would
be useful in every function (in the last chunk), and it saves one RET
instruction per function. This saves one full chunk 1/15th of the time (when
the final RET would be in a new chunk all by itself). To use the runt
instruction, now PC[5:2] can take on all values, where the 0000 encoding
points to the runt instruction.

Kent

Re: 34 bit instructions

<726de1a4-4d5e-4c6d-a20f-bbe45213713dn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:5349:: with SMTP id d9mr25194333qto.91.1625117266797;
Wed, 30 Jun 2021 22:27:46 -0700 (PDT)
X-Received: by 2002:a05:6830:1d8:: with SMTP id r24mr5839730ota.206.1625117266580;
Wed, 30 Jun 2021 22:27:46 -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: Wed, 30 Jun 2021 22:27:46 -0700 (PDT)
In-Reply-To: <xuWdnfOSDPdU3ED9nZ2dnUU7-e_NnZ2d@giganews.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:fea8:1de1:d400:4c19:cfe0:b2ef:b45d;
posting-account=QId4bgoAAABV4s50talpu-qMcPp519Eb
NNTP-Posting-Host: 2607:fea8:1de1:d400:4c19:cfe0:b2ef:b45d
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
<3c3a3a17-82be-43b0-b2b4-2eb8685d9f01n@googlegroups.com> <9d29d3ea-e9a4-42e0-b820-eea3574d4f97n@googlegroups.com>
<8439317b-cf4e-4b07-b461-d7e23da9d31fn@googlegroups.com> <xuWdnfOSDPdU3ED9nZ2dnUU7-e_NnZ2d@giganews.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <726de1a4-4d5e-4c6d-a20f-bbe45213713dn@googlegroups.com>
Subject: Re: 34 bit instructions
From: robfi...@gmail.com (robf...@gmail.com)
Injection-Date: Thu, 01 Jul 2021 05:27:46 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: robf...@gmail.com - Thu, 1 Jul 2021 05:27 UTC

>IA64 showed that they could put 3 instructions in 128 bits and have this
>not be a problem. It basically treated instruction pointers [63:4] pointing
>to a 128-bit block, and [3:2] pointing to the instruction offset, where
>only the values 0, 1, 2 are valid.

>The overall cost of this in hardware is almost 0, in terms of logic, and
>in terms of speed. The cost to software is very nearly 0, but the
>assembler/linker need changes (but if they already support IA64, the
>changes are easy).

I agree that it is not that difficult a hardware issue to have odd sized instructions. I am surprised that there are not more designs with differing instruction sizes. Getting the software working with odd sized instructions is a bit more challenging.

>This idea can support any number of weird instructions in any size block. I
>think 512 bits is a large chunk size, and you're better off fitting into
>256-bits, merely because it's likely the linker will require all functions to
>start at a chunk size (otherwise, the final link would be very annoying).

I had not thought a lot about the linker. But at the moment instructions can be aligned on any nybble boundary. I find nybble addressing a simpler approach than packing instructions into chunks. So, the start of a function could be aligned on a 256-bit or even a 128-bit boundary. I guess it depends on what works the best for the linker. With nybble addressing the linker can choose the chunk size. I suppose it could be stipulated that all functions must be at least 16-byte aligned or more. That way the least significant five bits of a nybble address are always zero. Meaning the branch and jump instructions can omit them.

>00: NOP, almost always used when not the first chunk of a function
>01: BIG_ENTER: save all callee-saves registers, FP=SP, whatever else you want.
>10: SMALL_ENTER: save half of the callee-saves registers
>11: SP=SP-256; FP=SP. Simple function entry, creates small frame

>Another idea is a sort-of-delayed branch:
>11: RET at end of this chunk

Reminds me to look more into ENTER and LEAVE instructions. I have been doing some thought as to how to get multiple registers saved and restored.

Using a block header would make the instruction aligner a tiny bit more complex. It would have to start the realignment after the block header, instead of simply starting at the first bit.

Re: 34 bit instructions

<0275a42a-7045-47f3-8038-72fb462c737bn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ae9:c30f:: with SMTP id n15mr39100973qkg.71.1625123134310;
Thu, 01 Jul 2021 00:05:34 -0700 (PDT)
X-Received: by 2002:a4a:956f:: with SMTP id n44mr11854240ooi.54.1625123133975;
Thu, 01 Jul 2021 00:05:33 -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, 1 Jul 2021 00:05:33 -0700 (PDT)
In-Reply-To: <726de1a4-4d5e-4c6d-a20f-bbe45213713dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:56a:f8e3:d700:842f:37d9:add5:f676;
posting-account=1nOeKQkAAABD2jxp4Pzmx9Hx5g9miO8y
NNTP-Posting-Host: 2001:56a:f8e3:d700:842f:37d9:add5:f676
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
<3c3a3a17-82be-43b0-b2b4-2eb8685d9f01n@googlegroups.com> <9d29d3ea-e9a4-42e0-b820-eea3574d4f97n@googlegroups.com>
<8439317b-cf4e-4b07-b461-d7e23da9d31fn@googlegroups.com> <xuWdnfOSDPdU3ED9nZ2dnUU7-e_NnZ2d@giganews.com>
<726de1a4-4d5e-4c6d-a20f-bbe45213713dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0275a42a-7045-47f3-8038-72fb462c737bn@googlegroups.com>
Subject: Re: 34 bit instructions
From: jsav...@ecn.ab.ca (Quadibloc)
Injection-Date: Thu, 01 Jul 2021 07:05:34 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 11
 by: Quadibloc - Thu, 1 Jul 2021 07:05 UTC

On Wednesday, June 30, 2021 at 11:27:48 PM UTC-6, robf...@gmail.com wrote:

> I agree that it is not that difficult a hardware issue to have odd sized instructions.
> I am surprised that there are not more designs with differing instruction sizes.

I'm not. After all, an odd size for instructions is an additional bit of complexity,
so that's a cost that normally would not be accepted without a good reason.
Companies selling processors commercially want to be taken seriously, and so
they would be at pains to avoid anything that might seem like a needless eccentricity
in their designs.

John Savard

Re: 34 bit instructions

<sbjt1c$42a$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: m.del...@this.bitsnbites.eu (Marcus)
Newsgroups: comp.arch
Subject: Re: 34 bit instructions
Date: Thu, 1 Jul 2021 10:06:03 +0200
Organization: A noiseless patient Spider
Lines: 40
Message-ID: <sbjt1c$42a$1@dont-email.me>
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
<3c3a3a17-82be-43b0-b2b4-2eb8685d9f01n@googlegroups.com>
<9d29d3ea-e9a4-42e0-b820-eea3574d4f97n@googlegroups.com>
<8439317b-cf4e-4b07-b461-d7e23da9d31fn@googlegroups.com>
<xuWdnfOSDPdU3ED9nZ2dnUU7-e_NnZ2d@giganews.com>
<726de1a4-4d5e-4c6d-a20f-bbe45213713dn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 1 Jul 2021 08:06:04 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="2ddc155e91461d5454be722e81a0b8a7";
logging-data="4170"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+mgLW26KQqIyEnsoMV7LB5VwSH+momvvc="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:kTwR5F4NNWUpmEeZApSPyJT7Rjk=
In-Reply-To: <726de1a4-4d5e-4c6d-a20f-bbe45213713dn@googlegroups.com>
Content-Language: en-US
 by: Marcus - Thu, 1 Jul 2021 08:06 UTC

On 2021-07-01, robf...@gmail.com wrote:
>> IA64 showed that they could put 3 instructions in 128 bits and have this
>> not be a problem. It basically treated instruction pointers [63:4] pointing
>> to a 128-bit block, and [3:2] pointing to the instruction offset, where
>> only the values 0, 1, 2 are valid.
>
>> The overall cost of this in hardware is almost 0, in terms of logic, and
>> in terms of speed. The cost to software is very nearly 0, but the
>> assembler/linker need changes (but if they already support IA64, the
>> changes are easy).
>
> I agree that it is not that difficult a hardware issue to have odd sized instructions. I am surprised that there are not more designs with differing instruction sizes. Getting the software working with odd sized instructions is a bit more challenging.
>
>> This idea can support any number of weird instructions in any size block. I
>> think 512 bits is a large chunk size, and you're better off fitting into
>> 256-bits, merely because it's likely the linker will require all functions to
>> start at a chunk size (otherwise, the final link would be very annoying).
>
> I had not thought a lot about the linker. But at the moment instructions can be aligned on any nybble boundary. I find nybble addressing a simpler approach than packing instructions into chunks. So, the start of a function could be aligned on a 256-bit or even a 128-bit boundary. I guess it depends on what works the best for the linker. With nybble addressing the linker can choose the chunk size. I suppose it could be stipulated that all functions must be at least 16-byte aligned or more. That way the least significant five bits of a nybble address are always zero. Meaning the branch and jump instructions can omit them.
>

If you want allow the linker to do any kind of relaxations (transform
machine code for the benefit of reduced code size and/or improved
performance once final addresses and branch distances etc are known),
things could get quite messy with a block based odd sized instruction
encoding scheme like this.

>> 00: NOP, almost always used when not the first chunk of a function
>> 01: BIG_ENTER: save all callee-saves registers, FP=SP, whatever else you want.
>> 10: SMALL_ENTER: save half of the callee-saves registers
>> 11: SP=SP-256; FP=SP. Simple function entry, creates small frame
>
>> Another idea is a sort-of-delayed branch:
>> 11: RET at end of this chunk
>
> Reminds me to look more into ENTER and LEAVE instructions. I have been doing some thought as to how to get multiple registers saved and restored.
>
> Using a block header would make the instruction aligner a tiny bit more complex. It would have to start the realignment after the block header, instead of simply starting at the first bit.
>

Re: 34 bit instructions

<73b38b74-a24d-4b13-9108-1970d0a9db20n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:7f14:: with SMTP id f20mr1223120qtk.193.1625163956544; Thu, 01 Jul 2021 11:25:56 -0700 (PDT)
X-Received: by 2002:a9d:c23:: with SMTP id 32mr1072628otr.182.1625163955896; Thu, 01 Jul 2021 11:25:55 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!tr2.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, 1 Jul 2021 11:25:55 -0700 (PDT)
In-Reply-To: <726de1a4-4d5e-4c6d-a20f-bbe45213713dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:39ad:9960:ab74:f885; posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:39ad:9960:ab74:f885
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com> <3c3a3a17-82be-43b0-b2b4-2eb8685d9f01n@googlegroups.com> <9d29d3ea-e9a4-42e0-b820-eea3574d4f97n@googlegroups.com> <8439317b-cf4e-4b07-b461-d7e23da9d31fn@googlegroups.com> <xuWdnfOSDPdU3ED9nZ2dnUU7-e_NnZ2d@giganews.com> <726de1a4-4d5e-4c6d-a20f-bbe45213713dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <73b38b74-a24d-4b13-9108-1970d0a9db20n@googlegroups.com>
Subject: Re: 34 bit instructions
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Thu, 01 Jul 2021 18:25:56 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 56
 by: MitchAlsup - Thu, 1 Jul 2021 18:25 UTC

On Thursday, July 1, 2021 at 12:27:48 AM UTC-5, robf...@gmail.com wrote:
> >IA64 showed that they could put 3 instructions in 128 bits and have this
> >not be a problem. It basically treated instruction pointers [63:4] pointing
> >to a 128-bit block, and [3:2] pointing to the instruction offset, where
> >only the values 0, 1, 2 are valid.
> >The overall cost of this in hardware is almost 0, in terms of logic, and
> >in terms of speed. The cost to software is very nearly 0, but the
> >assembler/linker need changes (but if they already support IA64, the
> >changes are easy).
> I agree that it is not that difficult a hardware issue to have odd sized instructions.
<
<
>I am surprised that there are not more designs with differing instruction sizes. Getting the software working with odd sized instructions is a bit more challenging.
<
I would have been surprised, except I invented instruction-modifiers which
allowed me to effectively move the extra bits from the instruction itself
to the modifier so the very vast majority of instruction do not need modification.
<
> >This idea can support any number of weird instructions in any size block.. I
> >think 512 bits is a large chunk size, and you're better off fitting into
> >256-bits, merely because it's likely the linker will require all functions to
> >start at a chunk size (otherwise, the final link would be very annoying)..
> I had not thought a lot about the linker. But at the moment instructions can be aligned on any nybble boundary. I find nybble addressing a simpler approach than packing instructions into chunks. So, the start of a function could be aligned on a 256-bit or even a 128-bit boundary. I guess it depends on what works the best for the linker. With nybble addressing the linker can choose the chunk size. I suppose it could be stipulated that all functions must be at least 16-byte aligned or more. That way the least significant five bits of a nybble address are always zero. Meaning the branch and jump instructions can omit them.
> >00: NOP, almost always used when not the first chunk of a function
> >01: BIG_ENTER: save all callee-saves registers, FP=SP, whatever else you want.
> >10: SMALL_ENTER: save half of the callee-saves registers
> >11: SP=SP-256; FP=SP. Simple function entry, creates small frame
>
> >Another idea is a sort-of-delayed branch:
> >11: RET at end of this chunk
> Reminds me to look more into ENTER and LEAVE instructions. I have been doing some thought as to how to get multiple registers saved and restored.
>
> Using a block header would make the instruction aligner a tiny bit more complex. It would have to start the realignment after the block header, instead of simply starting at the first bit.

Re: 34 bit instructions

<c10d7c6e-1593-4f84-b415-3307444fbdbbn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:6214:2c9:: with SMTP id g9mr1408772qvu.28.1625164653888; Thu, 01 Jul 2021 11:37:33 -0700 (PDT)
X-Received: by 2002:a9d:7f91:: with SMTP id t17mr1132549otp.22.1625164653583; Thu, 01 Jul 2021 11:37:33 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!tr3.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, 1 Jul 2021 11:37:33 -0700 (PDT)
In-Reply-To: <73b38b74-a24d-4b13-9108-1970d0a9db20n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:56a:f8e3:d700:d1ac:2e52:9f08:e958; posting-account=1nOeKQkAAABD2jxp4Pzmx9Hx5g9miO8y
NNTP-Posting-Host: 2001:56a:f8e3:d700:d1ac:2e52:9f08:e958
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com> <3c3a3a17-82be-43b0-b2b4-2eb8685d9f01n@googlegroups.com> <9d29d3ea-e9a4-42e0-b820-eea3574d4f97n@googlegroups.com> <8439317b-cf4e-4b07-b461-d7e23da9d31fn@googlegroups.com> <xuWdnfOSDPdU3ED9nZ2dnUU7-e_NnZ2d@giganews.com> <726de1a4-4d5e-4c6d-a20f-bbe45213713dn@googlegroups.com> <73b38b74-a24d-4b13-9108-1970d0a9db20n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c10d7c6e-1593-4f84-b415-3307444fbdbbn@googlegroups.com>
Subject: Re: 34 bit instructions
From: jsav...@ecn.ab.ca (Quadibloc)
Injection-Date: Thu, 01 Jul 2021 18:37:33 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 8
 by: Quadibloc - Thu, 1 Jul 2021 18:37 UTC

On Thursday, July 1, 2021 at 12:25:57 PM UTC-6, MitchAlsup wrote:

> I would have been surprised, except I invented instruction-modifiers which
> allowed me to effectively move the extra bits from the instruction itself
> to the modifier so the very vast majority of instruction do not need modification.

Isn't the VAX-11/780 prior art on that one?

John Savard

Re: 34 bit instructions

<3f96e8b5-b357-4f3f-b3cc-b3cec45d7dc1n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a37:a98b:: with SMTP id s133mr1430441qke.387.1625164843170;
Thu, 01 Jul 2021 11:40:43 -0700 (PDT)
X-Received: by 2002:a4a:e1c5:: with SMTP id n5mr1037875oot.5.1625164842925;
Thu, 01 Jul 2021 11:40:42 -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: Thu, 1 Jul 2021 11:40:42 -0700 (PDT)
In-Reply-To: <c10d7c6e-1593-4f84-b415-3307444fbdbbn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:39ad:9960:ab74:f885;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:39ad:9960:ab74:f885
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
<3c3a3a17-82be-43b0-b2b4-2eb8685d9f01n@googlegroups.com> <9d29d3ea-e9a4-42e0-b820-eea3574d4f97n@googlegroups.com>
<8439317b-cf4e-4b07-b461-d7e23da9d31fn@googlegroups.com> <xuWdnfOSDPdU3ED9nZ2dnUU7-e_NnZ2d@giganews.com>
<726de1a4-4d5e-4c6d-a20f-bbe45213713dn@googlegroups.com> <73b38b74-a24d-4b13-9108-1970d0a9db20n@googlegroups.com>
<c10d7c6e-1593-4f84-b415-3307444fbdbbn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3f96e8b5-b357-4f3f-b3cc-b3cec45d7dc1n@googlegroups.com>
Subject: Re: 34 bit instructions
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Thu, 01 Jul 2021 18:40:43 +0000
Content-Type: text/plain; charset="UTF-8"
 by: MitchAlsup - Thu, 1 Jul 2021 18:40 UTC

On Thursday, July 1, 2021 at 1:37:35 PM UTC-5, Quadibloc wrote:
> On Thursday, July 1, 2021 at 12:25:57 PM UTC-6, MitchAlsup wrote:
>
> > I would have been surprised, except I invented instruction-modifiers which
> > allowed me to effectively move the extra bits from the instruction itself
> > to the modifier so the very vast majority of instruction do not need modification.
> Isn't the VAX-11/780 prior art on that one?
<
In what way ? If I understand VAX correctly, they had instruction modifiers within
an instruction (called address modes) whereas this is between instructions.
>
> John Savard

Re: 34 bit instructions

<d4bb7ba5-d4d8-402c-a2ca-ecc4587232d7n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:5a0e:: with SMTP id n14mr4532736qta.302.1625223348189;
Fri, 02 Jul 2021 03:55:48 -0700 (PDT)
X-Received: by 2002:a05:6808:d54:: with SMTP id w20mr11477980oik.175.1625223348005;
Fri, 02 Jul 2021 03:55:48 -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: Fri, 2 Jul 2021 03:55:47 -0700 (PDT)
In-Reply-To: <3f96e8b5-b357-4f3f-b3cc-b3cec45d7dc1n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:fea8:1de1:d400:bca4:e902:ca12:3d7c;
posting-account=QId4bgoAAABV4s50talpu-qMcPp519Eb
NNTP-Posting-Host: 2607:fea8:1de1:d400:bca4:e902:ca12:3d7c
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
<3c3a3a17-82be-43b0-b2b4-2eb8685d9f01n@googlegroups.com> <9d29d3ea-e9a4-42e0-b820-eea3574d4f97n@googlegroups.com>
<8439317b-cf4e-4b07-b461-d7e23da9d31fn@googlegroups.com> <xuWdnfOSDPdU3ED9nZ2dnUU7-e_NnZ2d@giganews.com>
<726de1a4-4d5e-4c6d-a20f-bbe45213713dn@googlegroups.com> <73b38b74-a24d-4b13-9108-1970d0a9db20n@googlegroups.com>
<c10d7c6e-1593-4f84-b415-3307444fbdbbn@googlegroups.com> <3f96e8b5-b357-4f3f-b3cc-b3cec45d7dc1n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d4bb7ba5-d4d8-402c-a2ca-ecc4587232d7n@googlegroups.com>
Subject: Re: 34 bit instructions
From: robfi...@gmail.com (robf...@gmail.com)
Injection-Date: Fri, 02 Jul 2021 10:55:48 +0000
Content-Type: text/plain; charset="UTF-8"
 by: robf...@gmail.com - Fri, 2 Jul 2021 10:55 UTC

On Thursday, July 1, 2021 at 2:40:44 PM UTC-4, MitchAlsup wrote:
> On Thursday, July 1, 2021 at 1:37:35 PM UTC-5, Quadibloc wrote:
> > On Thursday, July 1, 2021 at 12:25:57 PM UTC-6, MitchAlsup wrote:
> >
> > > I would have been surprised, except I invented instruction-modifiers which
> > > allowed me to effectively move the extra bits from the instruction itself
> > > to the modifier so the very vast majority of instruction do not need modification.
> > Isn't the VAX-11/780 prior art on that one?
> <
> In what way ? If I understand VAX correctly, they had instruction modifiers within
> an instruction (called address modes) whereas this is between instructions.
> >
> > John Savard

What is the difference between instruction modifiers and instruction prefixes such as on the x86 and other machines ?

Re: 34 bit instructions

<deeb3c45-8e0f-4848-a314-81471f7446e8n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a0c:b921:: with SMTP id u33mr125968qvf.12.1625241121910;
Fri, 02 Jul 2021 08:52:01 -0700 (PDT)
X-Received: by 2002:aca:4f16:: with SMTP id d22mr405910oib.44.1625241121679;
Fri, 02 Jul 2021 08:52:01 -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: Fri, 2 Jul 2021 08:52:01 -0700 (PDT)
In-Reply-To: <d4bb7ba5-d4d8-402c-a2ca-ecc4587232d7n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:7d00:2db5:dd4e:2acb;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:7d00:2db5:dd4e:2acb
References: <54baed57-14be-4375-9b44-69e704faa445n@googlegroups.com>
<3c3a3a17-82be-43b0-b2b4-2eb8685d9f01n@googlegroups.com> <9d29d3ea-e9a4-42e0-b820-eea3574d4f97n@googlegroups.com>
<8439317b-cf4e-4b07-b461-d7e23da9d31fn@googlegroups.com> <xuWdnfOSDPdU3ED9nZ2dnUU7-e_NnZ2d@giganews.com>
<726de1a4-4d5e-4c6d-a20f-bbe45213713dn@googlegroups.com> <73b38b74-a24d-4b13-9108-1970d0a9db20n@googlegroups.com>
<c10d7c6e-1593-4f84-b415-3307444fbdbbn@googlegroups.com> <3f96e8b5-b357-4f3f-b3cc-b3cec45d7dc1n@googlegroups.com>
<d4bb7ba5-d4d8-402c-a2ca-ecc4587232d7n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <deeb3c45-8e0f-4848-a314-81471f7446e8n@googlegroups.com>
Subject: Re: 34 bit instructions
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Fri, 02 Jul 2021 15:52:01 +0000
Content-Type: text/plain; charset="UTF-8"
 by: MitchAlsup - Fri, 2 Jul 2021 15:52 UTC

On Friday, July 2, 2021 at 5:55:49 AM UTC-5, robf...@gmail.com wrote:
> On Thursday, July 1, 2021 at 2:40:44 PM UTC-4, MitchAlsup wrote:
> > On Thursday, July 1, 2021 at 1:37:35 PM UTC-5, Quadibloc wrote:
> > > On Thursday, July 1, 2021 at 12:25:57 PM UTC-6, MitchAlsup wrote:
> > >
> > > > I would have been surprised, except I invented instruction-modifiers which
> > > > allowed me to effectively move the extra bits from the instruction itself
> > > > to the modifier so the very vast majority of instruction do not need modification.
> > > Isn't the VAX-11/780 prior art on that one?
> > <
> > In what way ? If I understand VAX correctly, they had instruction modifiers within
> > an instruction (called address modes) whereas this is between instructions.
> > >
> > > John Savard
> What is the difference between instruction modifiers and instruction prefixes such as on the x86 and other machines ?
<
Instruction-modifiers (Note: Hyphen) can modify several succeeding instructions;
Prefixes are for the current instruction only.
<
A 128-bit shift (by less than 64-bits):
<
CARRY R14,{{I}{IO}{IO}{O}}
SL R11,R1,Rshift
SL R12,R2,Rshift
SL R13,R3,Rshift
SL R14,R4,Rshift
<


devel / comp.arch / Re: 34 bit instructions

Pages:1234
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor