Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: net.lang.c Subject: Re: Re: Float Double Parameters Message-ID: <2596@brl-smoke.ARPA> Date: Sun, 13-Apr-86 14:24:40 EST Article-I.D.: brl-smok.2596 Posted: Sun Apr 13 14:24:40 1986 Date-Received: Sun, 20-Apr-86 08:47:09 EST References: <5216@alice.UUCP> <1700006@umn-cs.UUCP> Reply-To: gwyn@brl.ARPA Organization: Ballistic Research Lab (BRL) Lines: 27 Herndon correctly attributes C's "double-precision only" design to PDP-11 FP11 characteristics (although I think it was also felt that single-precision had too few bits to be very useful anyway), but he is mistaken in many of the details. The kernel could both read and write the status register; 6th Edition UNIX as distributed did not properly handle asynchronous FP11s, although it did make an attempt to save and restore FP11 state during user process context switching. (Note that the FP11 needed to be put into double mode during register save/restore.) One of the things I did to the kernel at Geotronics was to fix FP11 handling and install it in the non-I&D version; it wasn't very difficult. Allowing both single- and double-precision operation would certainly complicate the code generator, since the FP11 used a "mode" setting rather than separate instructions. Thus, a SETD at the beginning of the code would suffice to lock in double-precision operation; it also would cause a trap on a non-FP11 machine, so there were special arrangements to ignore the trap. The current conception is to permit either the double-only implementation of C or allow support for single-precision in expressions at the implementor's discretion.