🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #413

Re: interrupt handling latency and weird register use (was Re: OT: Epic RISC-V rant)

#413
From: Waldek Hebisch
Date: Wed, 28 Oct 2026 12:33
36 lines
2979 bytes
MitchAlsup <user5857@newsgrouper.org.invalid> wrote:
> anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:
> 
>> makendo <makendo@makendo.invalid> writes:
>> >The case where division is implemented but
>> >multiplication is not does not have a name assigned -- it is pretty
>> >well known that hardware designers, compiler writers and low-level
>> >programmers hate division far more than multiplication, so I doubt
>> >if divison-only hardware is even out in the wild for any ISA...
>> 
>> I don't think that "hate" is the right concept.  Division is costly:
> 
> But "lack of division" is also costly !! especially if some future
> implementation will have division {which it will} and then you have
> no direct means to make the dusty decks fast.

You assume binaries or assembler code.  In microcontroller world
programs are frequently compiled for one specific CPU model.
And in case of microcontrollers savings due to ommision of
divide circuit can be significant.  I know you do not like
Risc-V, but one small model (CH32V003) even skips multiplication.
IIUC even smallest Arm-s have multiplication (which theoretically
can be slow, but on all small models that I know it 32 bit
multiplication executes in 1 cycle).

> Note to µArchitects, put the instruction in even if you are going to
> TRAP to SW emulation. Later on when DIV is implemented it just runs
> faster and you had to do nothing (but put it in).

You need to make it fast enough so that compilers are not tempted
to call software emulation.  Also beware of interrput latency,
if division is slow microcontroller probably should allow
interrupts in the middle of division.

-- 
                              Waldek Hebisch
Technical Details
Message-ID: <11bsq36$36q1t$3@paganini.bofh.team>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!newsfeed.bofh.team!paganini.bofh.team!not-for-mail
References: <87qzk0nejz.fsf@nightsong.com> <116d89d$27baf$1@paganini.bofh.team> <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>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!newsfeed.bofh.team!paganini.bofh.team!not-for-mail
From: antispam@fricas.org (Waldek Hebisch)
Newsgroups: comp.arch
Subject: Re: interrupt handling latency and weird register use (was Re: OT: Epic RISC-V rant)
Date: Wed, 28 Oct 2026 12:33:44 -0000 (UTC)
Organization: bofh.team Usenet service
Message-ID: <11bsq36$36q1t$3@paganini.bofh.team>
References: <87qzk0nejz.fsf@nightsong.com> <116d89d$27baf$1@paganini.bofh.team> <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>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 28 Oct 2026 12:33:44 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="3369021"; mail-complaints-to="usenet@bofh.team"; posting-host="d028f9ad2fa2c51f22dbfed0d81d7daf"; posting-account="69e66f1681224ab92235b464ce7a90b6"
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.1.0-9-amd64 (x86_64))
X-Postfilter: Postfilter-NG 2026.10.2