🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #1013

Re: Fitting in Short Instructions

#1013
From: MitchAlsup
Date: Wed, 02 Dec 2026 00:45
53 lines
3125 bytes
quadibloc@invalid.com (John Savard) posted:

> A short operate instruction needs at least 17 bits; seven bits for
> opcode, and five each for source and destination register.
> That's obviously a problem.

One must moderate the conceptualization of a perceived issue with the
cost of not fixing it.

One an ICache is big enough, ICache waiting time is rather small--
{simply because its miss rate is so small}. We used this argument
all the time back in 1982 when developing the fist generation
RISCs. {{The argument is less valid on DataBase than on Scientific/
engineering workloads. The argument is irrelevant for office 
applications as any computer (post 2000) is vastly more powerful 
than needed}}

Big enough seems to be ~8KB (and larger--although sets help).

You have been trying to fit in small instructions for quite some
time. With performance doubling every few years, you have already
consumed one of those doublings.

Code footprint is only (really) an issue for the very low end MCUs.
Is that your market ?? and how does a "do everything for everybody"
architecture fit in the price structure of that market ??

> So I've thought of various ways around it. Don't use all the
> registers. Limit the opcode space. Restrict which registers can be
> used together.
> But something has occurred to me: there is a useful property of the
> code which I could exploit.
> 
> Instead of using ten bits for a full destination and source register
> specification, I might be able to get away with just using seven.
> The destination register gets a five-bit field for a full register
> specification.
> The source register, though, is indicated by a two-bit field with the
> following meanings:
> 00 - the destination register of the previous instruction
> 01 - the destination register of the instruction before that
> and so on.
> 
> Since the result registers of integer instructions are irrelevant to
> floating-point instructions and vice-versa, one could have two
> separate stacks of register pointers. Or eight, handling operands of
> each length separately.
> Maintaining the stacks is extra overhead, but it allows instructions
> to be specified in a very compact way - and the stacks only contain
> register pointers, not values, so it's simpler than an actual stack
> architecture.
> 
> John Savard
Technical Details
Message-ID: <1796172304-5857@newsgrouper.org>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!newsgrouper.org!.POSTED!not-for-mail
References: <6b0e6f8f.17868593@news.eternal-september.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!newsgrouper.org!.POSTED!not-for-mail
From: MitchAlsup <user5857@newsgrouper.org.invalid>
Newsgroups: comp.arch
Subject: Re: Fitting in Short Instructions
References: <6b0e6f8f.17868593@news.eternal-september.org>
Date: Wed, 02 Dec 2026 00:45:04 GMT
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Message-ID: <1796172304-5857@newsgrouper.org>
Injection-Info: newsgrouper.org; mail-complaints-to="newsgrouper@yahoo.com"; posting-account=user5857
Injection-Date: Wed, 02 Dec 2026 00:45:04 GMT
User-Agent: Newsgrouper/0.9.0