Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!swidir.switch.ch!scsing.switch.ch!news.belwue.de!news.dfn.de!Germany.EU.net!howland.reston.ans.net!swrinde!elroy.jpl.nasa.gov!news.larc.nasa.gov!news.msfc.nasa.gov!bcm!usenet From: dan@dna.neusc.bcm.tmc.edu Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: Packages on a 386? Date: 22 Aug 1995 03:09:40 GMT Organization: Baylor College of Medicine Lines: 30 Message-ID: <41bhpk$khm@gazette.bcm.tmc.edu> References: <3vv184$qou@cronkite.cisco.com> <40pb71$jut@cronkite.cisco.com> <DDE4yM.9G1@theatre.pandora.sax.de> <4kAPL1W00YUpA15HMG@andrew.cmu.edu> <40uvpp$8sc@bonnie.tcd-dresden.de> Reply-To: dan@dna.neusc.bcm.tmc.edu NNTP-Posting-Host: dnp.neusc.bcm.tmc.edu X-Newsreader: IBM NewsReader/2 v1.02 In <40uvpp$8sc@bonnie.tcd-dresden.de>, j@bonnie.heep.sax.de (J Wunsch) writes: )Matthew Jason White <mwhite+@CMU.EDU> wrote: )> I may be wrong, but as I remember, the way a CPU without co-processor )> works is this: if there appears a floating point instruction and there )> is no FPU, the CPU generates that ``floating exception'' to leave the )> possibility to the software to get around that. ) )No, no floating point exception, it raises a (sort-of, forgot the )actual name) ``emulator trap''. On the PDP-11, it's really been )called by this name, and you can still find a SIGEMT in the list of )signals... ever been wondering why? :-) Actually I do believe on the PDP-11 it was a floating point exception, SIGFPE, which was an interrupt. It is the emulator's job to intercept that interrupt and look at the instruction that caused the FPE and do the right thing. A SIGEMT is caused by executing the EMT instruction, a software interrupt that is exactly like the TRAP instruction, except that it uses a different vector address. The TRAP instruction is used by PDP-11 UNIX to implement system calls. Whereas the EMT instruction is used by DEC OS's (RT-11, RSX-11, etc.) for system calls. Both the EMT and TRAP instructions carry a small number within the instruction itself which specifies the particular system call (I think from 0-63). Why a special TRAP/EMT instruction and not a simple subroutine ? Because 1) TRAP/EMT interrupts revert to kernel mode and its address space, 2) they push the processor status as well as the return address. But all signals (SIGFPE, SIGEMT) are software/OS constructs, not hardware constructs. UNIX intercepts the hardware interrupt and communicates its occurence to the offending process via the signal.