🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #461

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

#461
From: John Dallman
Date: Fri, 30 Oct 2026 11:50
26 lines
2039 bytes
In article <ygnwlr084yt.fsf@y.z>, x@y.z (Josh Vanderhoof) wrote:

> Would it be possible to have a hardware version of polyfill?  The 
> basic idea would be that instead of emulation via trapping, the 
> software calls a standardized divide routine.  On hardware with a 
> divide instruction it checks the routine and if it sees it's the 
> standard divide routine it just uses its divide instruction 
> instead.  If it doesn't have hardware division it just runs the 
> divide routine.

Older 32-bit versions of AIX had a version of this IIRC that IBM called
"millicode." The problem was that POWER1 and POWER2 didn't have quite the
same ISA as 32-bit PowerPC. IBM produced lots of material about how they
were /mostly/ the same, but the differences were a real pain for
compilers. 

You could do the same things on the variant ISAs, but some of them needed
more than one instruction. So the compiler would generate enough space
for the longest of the alternative instruction sequences and the loader,
which knows what hardware it's running on, would fill in the correct
sequences, and no-ops in any spare space. 

None of this was necessary on 64-bit AIX, where the core ISA was
standardised from the beginning. 

John 
Technical Details
Message-ID: <memo.20261030115049.2644T@jgd.cix.co.uk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nntp.terraraq.uk!news1.firedrake.org!.POSTED.178.238.153.114!not-for-mail
References: <ygnwlr084yt.fsf@y.z>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nntp.terraraq.uk!news1.firedrake.org!.POSTED.178.238.153.114!not-for-mail
From: jgd@cix.co.uk (John Dallman)
Newsgroups: comp.arch
Subject: Re: interrupt handling latency and weird register use (was Re: OT: Epic RISC-V
Date: Fri, 30 Oct 2026 11:50 +0000 (GMT Standard Time)
Organization: Firedrake Synthesis
Message-ID: <memo.20261030115049.2644T@jgd.cix.co.uk>
References: <ygnwlr084yt.fsf@y.z>
Reply-To: jgd@cix.co.uk
Injection-Info: lustrous.firedrake.org; posting-host="178.238.153.114";
	logging-data="8559"; mail-complaints-to="usenet@lustrous.firedrake.org"
X-Clacks-Overhead-header: GNU Terry Pratchett