The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: segaloco via TUHS <tuhs@tuhs.org>
To: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: tuhs@tuhs.org
Subject: [TUHS] Re: Clever code
Date: Tue, 13 Dec 2022 20:14:07 +0000	[thread overview]
Message-ID: <rDnLDqoqgKZ4gc9lTTrBWVytgujVWqpfQRA-lOqU-gSiabVBUSU_lFMF2Rf3cIsT9OBzsm0rb4y1NaE_symvpNqwhXKkn86ah-0hFJkhSSQ=@protonmail.com> (raw)
In-Reply-To: <20221213185109.663zv3usi5ey5jx6@illithid>

Where RISC-V is very intentional on this, my reading has lead me to understand that many previous CPU architectures simply passed pieces of the opcode to further hardware in the microarchitecture, so it wasn't so much of a design a register system to fit in a specific bit width but rather a matter of bits 3-5 and 7-9 are connected directly to the two inputs of the ALU internally or something to that effect.  Hearsay of course, I wasn't there, but that's the explanation I've heard in the past.

Now how much settling on a bit width for the register field of opcodes influences the number of registers or vice versa, hard to say.  Did Motorola want a 3 bit register field in opcodes or a resolution of 8 registers per addressing mode in the 68k first for instance, and which decision then followed?  I don't know, maybe someone does?  In fact, that makes me now wonder if there are CPUs with non-power-of-two register counts outside of the early days.  Anything else would waste values in a bitfield.

- Matt G.

------- Original Message -------
On Tuesday, December 13th, 2022 at 10:51 AM, G. Branden Robinson <g.branden.robinson@gmail.com> wrote:


> At 2022-12-13T12:58:11-0500, Noel Chiappa wrote:
> 
> > ... registers used to have two aspects - one now gone (and maybe
> > the second too). The first was that the technology used to implement
> > them (latches built out of tubes, then transistors) was faster than
> > main memory - a distinction now mostly gone, especially since caches
> > blur the speed distinction between today's main memory and registers.
> > The second was that registers, being smaller in numbers, could be
> > named with a few bits, allowing them to be named with a small share of
> > the bits in an instruction. (This one still remains, although
> > instructions are now so long it's probably less important.)
> 
> 
> Maybe less important on x86, but the amount of space in the instruction
> for encoding registers seems to me to have played a major role in the
> design of the RV32I/E and C (compressed) extension instruction formats
> of RISC-V.
> 
> https://riscv.org/wp-content/uploads/2017/05/riscv-spec-v2.2.pdf
> 
> Regards,
> Branden

  reply	other threads:[~2022-12-13 20:14 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13 17:58 Noel Chiappa
2022-12-13 18:51 ` G. Branden Robinson
2022-12-13 20:14   ` segaloco via TUHS [this message]
2022-12-13 20:58     ` Warren Toomey via TUHS
2022-12-14  2:28     ` Luther Johnson
  -- strict thread matches above, loose matches on Subject: below --
2022-12-13 18:02 Noel Chiappa
2022-12-13  3:30 Rudi Blom
2022-12-13  3:41 ` Warner Losh
2022-12-13  3:53 ` Dave Horsfall
2022-12-13  4:03   ` George Michaelson
2022-12-13  8:05     ` Ralph Corderoy
2022-12-13  9:45       ` Dagobert Michelsen
2022-12-13  7:47   ` Ralph Corderoy
2022-12-13 19:56     ` Dave Horsfall
2022-12-13 11:46   ` John P. Linderman
2022-12-13 14:07     ` Douglas McIlroy
2022-12-13 14:31       ` arnold
2022-12-13 14:48         ` Ralph Corderoy
2022-12-13 15:10         ` Douglas McIlroy
2022-12-13 15:34           ` Stuff Received
2022-12-13 15:56             ` Ralph Corderoy
2022-12-13 23:02           ` Harald Arnesen
2022-12-14  7:31           ` arnold
2022-12-15 18:06           ` Marc Donner
2022-12-15 18:08             ` Marc Donner
2022-12-13 15:52 ` Bakul Shah
2022-12-13 16:14   ` Ralph Corderoy
2022-12-13 16:30     ` Bakul Shah
2022-12-11 20:03 [TUHS] Re: Stdin Redirect in Cu History/Alternatives? Larry McVoy
2022-12-12  2:15 ` [TUHS] Clever code (was " Bakul Shah
2022-12-12  9:48   ` [TUHS] Re: Clever code Michael Kjörling

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='rDnLDqoqgKZ4gc9lTTrBWVytgujVWqpfQRA-lOqU-gSiabVBUSU_lFMF2Rf3cIsT9OBzsm0rb4y1NaE_symvpNqwhXKkn86ah-0hFJkhSSQ=@protonmail.com' \
    --to=tuhs@tuhs.org \
    --cc=g.branden.robinson@gmail.com \
    --cc=segaloco@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).