Article View: comp.arch
Article #395Re: floating point, interrupt handling latency and weird register use (was Re: OT: Epic RISC-V rant)
From: John Levine
Date: Tue, 27 Oct 2026 20:08
Date: Tue, 27 Oct 2026 20:08
24 lines
2446 bytes
2446 bytes
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. -- Regards, John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies", Please consider the environment before reading this e-mail. https://jl.ly
Technical Details
Message-ID:
<11br0bm$267v$1@gal.iecc.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!weretis.net!feeder9.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!not-for-mailReferences:
<87qzk0nejz.fsf@nightsong.com> <2026Oct27.171414@mips.complang.tuwien.ac.at> <1793120789-5857@newsgrouper.org> <11bqq0k$1p107$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!weretis.net!feeder9.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!not-for-mail From: John Levine <johnl@taugh.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 20:08:22 -0000 (UTC) Organization: Taughannock Networks Message-ID: <11br0bm$267v$1@gal.iecc.com> References: <87qzk0nejz.fsf@nightsong.com> <2026Oct27.171414@mips.complang.tuwien.ac.at> <1793120789-5857@newsgrouper.org> <11bqq0k$1p107$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 27 Oct 2026 20:08:22 -0000 (UTC) Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="71935"; mail-complaints-to="abuse@iecc.com" In-Reply-To: <87qzk0nejz.fsf@nightsong.com> <2026Oct27.171414@mips.complang.tuwien.ac.at> <1793120789-5857@newsgrouper.org> <11bqq0k$1p107$1@dont-email.me> Cleverness: some X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Originator: johnl@iecc.com (John Levine)