🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #404

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

#404
From: Brian G. Lucas
Date: Tue, 27 Oct 2026 21:44
25 lines
2548 bytes
On 10/27/26 3:08 PM, John Levine wrote:
> According to Terje Mathisen  <terje.mathisen@tmsw.no>:
>> Intel actually did this correctly back in 1978/79 when they designed the
>> 8087: If you did not have the FPU, then the main 8088 CPU would trap to
>> an emulation layer which did what was required. The only real problem
>> was that this was significantly slower than a direct call to a SW
>> function which did the same operation.
> 
> Sadly, no.  Without an 8087 the 8088 just ignored the ESC opcode used
> by floating instructions, but ...
> 
>> What we ended up with on most applications was a hybrid, where the
>> compiler would generate calls to a shim, said shim would inspect the
>> available HW (FPU/No FPU) and patch the call:
> 
> The Wizard C compiler, the predecessor of Turbo C, had a hack where it
> emitted floating point instructions but with the first byte replaced
> by a trap opcode.  Then it was roughly as you described, patch it
> to a real float instruction if there was an 8087, or call the software
> version.
> 
We also did that in the PC/IX kernel.

Brian
Technical Details
Message-ID: <11br60g$1tno3$1@dont-email.me>
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> <2026Oct27.171414@mips.complang.tuwien.ac.at> <1793120789-5857@newsgrouper.org> <11bqq0k$1p107$1@dont-email.me> <11br0bm$267v$1@gal.iecc.com>

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: "Brian G. Lucas" <bagel99@gmail.com>
Newsgroups: comp.arch
Subject: Re: floating point, interrupt handling latency and weird register use
 (was Re: OT: Epic RISC-V rant)
Date: Tue, 27 Oct 2026 17:44:58 -0400
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <11br60g$1tno3$1@dont-email.me>
References: <87qzk0nejz.fsf@nightsong.com>
 <2026Oct27.171414@mips.complang.tuwien.ac.at>
 <1793120789-5857@newsgrouper.org> <11bqq0k$1p107$1@dont-email.me>
 <11br0bm$267v$1@gal.iecc.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 27 Oct 2026 21:44:49 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="2023171"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19wYVJ4f9b5ipdiWuFftuDf"; posting-host="c852cc66823a380959e707f31653fc4f"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:k1PuJFcht6SyAgGOC7nkTge5oUc= sha256:0nmJpSGmG02ZCa5lgswJ36RZ5/AJp4aQOm7Tt7/UJmM=
	sha1:49rmdUztX8RHXM3w4QfEqKAvubk= sha256:Q4ykkx4qyw/7YtC5uYxSf6vpIi5Fahw3Y9v5GhJeaNM=
Content-Language: en-US
In-Reply-To: <11br0bm$267v$1@gal.iecc.com>