🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #503

Re: Unimplemented opcodes via jump tables (was: interrupt handling latency and weird register use)

#503
From: Anton Ertl
Date: Sun, 01 Nov 2026 16:11
40 lines
3420 bytes
Thomas Koenig <tkoenig@netcologne.de> writes:
>MitchAlsup <user5857@newsgrouper.org.invalid> schrieb:
>> Thomas Koenig <tkoenig@netcologne.de> posted:
>>> You could have instructions that either do things in hardware or
>>> jump to a subroutine at a defined address from a jump table
>>> index by opcode.  That would solve the problem, I think, and
>>
>> That would add LDD-latency plus JUMP-latency to instruction-latency--
>> even if the index was extracted by HW. Probably around 5-6 cycles.

Just treat it like a call, and predict it very accurately after the
first execution.  The major cost is the extraction of the various
fields and the access to the registers; alternatively, have 32K
variants of each software-defined three-address instruction (assuming
32 registers) where the registers are hard-coded in the variant.

>What I was thinking of was to expose this in the ISA, so people
>could use multiplication etc without having to switch on CPU
>type, which is a pain.

Ideally the CPU exposes the defined instruction, and leaves the
implementation details to some deeper level in the implementation, and
for this kind of implementation maybe in the firmware.  If the
implementations are visible in the user-level and system-level address
space, we cannot avoid making it somewhat visible.

An alternative would be to put these implementations in a separate
address space, but:

1) That implies additional hardware costs which are not necessarily
worth the benefit.

2) When the implemented instruction performs memory accesses or
control flow, extra capabilities are needed to do that in the
usr/system address space.

- anton
-- 
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
  Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
Technical Details
Message-ID: <2026Nov1.171123@mips.complang.tuwien.ac.at>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <87qzk0nejz.fsf@nightsong.com> <87ecfcagiw.fsf_-_@debian> <2026Sep1.225146@mips.complang.tuwien.ac.at> <11bpfm8$190ap$1@dont-email.me> <2026Oct27.171414@mips.complang.tuwien.ac.at> <1793120789-5857@newsgrouper.org> <11bsq36$36q1t$3@paganini.bofh.team> <1793202439-5857@newsgrouper.org> <ygnwlr084yt.fsf@y.z> <1793320218-5857@newsgrouper.org> <ygnjymy5uo2.fsf@y.z> <11c4dcm$102m6$1@dont-email.me> <1793471234-5857@newsgrouper.org> <11c5efn$1cdb3$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.arch
Subject: Re: Unimplemented opcodes via jump tables (was: interrupt handling latency and weird register use)
Date: Sun, 01 Nov 2026 16:11:23 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 40
Message-ID: <2026Nov1.171123@mips.complang.tuwien.ac.at>
References: <87qzk0nejz.fsf@nightsong.com> <87ecfcagiw.fsf_-_@debian> <2026Sep1.225146@mips.complang.tuwien.ac.at> <11bpfm8$190ap$1@dont-email.me> <2026Oct27.171414@mips.complang.tuwien.ac.at> <1793120789-5857@newsgrouper.org> <11bsq36$36q1t$3@paganini.bofh.team> <1793202439-5857@newsgrouper.org> <ygnwlr084yt.fsf@y.z> <1793320218-5857@newsgrouper.org> <ygnjymy5uo2.fsf@y.z> <11c4dcm$102m6$1@dont-email.me> <1793471234-5857@newsgrouper.org> <11c5efn$1cdb3$1@dont-email.me>
Injection-Date: Sun, 01 Nov 2026 16:38:59 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="2214173"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+wJBUnMUjTr/N49WFxTE93"; posting-host="1989c266a3e475c63dac2f8901649b20"
Cancel-Lock: sha1:p3o5mj5GKjpkptokAN62RTYZ3ek= sha256:meG4QCItsKW6sio8rIfvgU85wOiov7CSV7bf33BgtqI=
	sha1:PtLQrB7n5Kwy0p4/3rvvZRS6DmM= sha256:58S9EQLTYehwZg8AMv8QxIb5Oxgo0vqxbLpzhPs+7lE=
X-newsreader: xrn 10.11