home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!tools!ws
- From: ws@tools.de (Wolfgang Solfrank)
- Newsgroups: comp.unix.bsd
- Subject: Re: [386BSD] A caution on using new man & gcc 2.3.1 notes.
- Date: 17 Nov 92 13:54:38
- Organization: TooLs GmbH, Bonn, Germany
- Lines: 53
- Distribution: comp
- Message-ID: <WS.92Nov17135438@kurt.tools.de>
- References: <JKH.92Nov9195806@esel.lotus.com>
- <1992Nov15.232902.5582@raid.dell.com>
- NNTP-Posting-Host: kurt.tools.de
- In-reply-to: james@raid.dell.com's message of 15 Nov 92 23:29:02 GMT
-
- In article <1992Nov15.232902.5582@raid.dell.com> james@raid.dell.com (James Van Artsdalen) writes:
-
- > Of course, when I tried to compile libc with it, it coredumped on
- > ldexp.c, so it's not *that* robust either!
-
- I would bet that there is an asm statement in ldexp.c that tries to
- use 387 registers. gcc 2.3.1 uses a different syntax for such
- expressions than gcc 1.39, and it's unlikely that any asm statement
- involving 387 regs will work without being rewritten.
-
- That's correct. I changed ldexp for use with gcc 2.1 some time ago.
- Here is the context diff for my version. It should compile with both
- the new and the old version of gcc.
-
- diff -c bsd/lib/libc/i386/gen/ldexp.c:1.1.1.1 bsd/lib/libc/i386/gen/ldexp.c:1.3
- *** bsd/lib/libc/i386/gen/ldexp.c:1.1.1.1 Tue Nov 17 13:47:27 1992
- --- bsd/lib/libc/i386/gen/ldexp.c Tue Nov 17 13:47:27 1992
- ***************
- *** 43,48 ****
- --- 43,50 ----
- *
- * Written by Sean Eric Fagan (sef@kithrup.COM)
- * Sun Mar 11 20:27:09 PST 1990
- + * Modified by Wolfgang Solfrank (ws@tools.de) for GCC 2.1
- + * Tue Jun 9 12:56:33 MET DST 1992
- */
-
- /*
- ***************
- *** 55,62 ****
- --- 57,74 ----
- {
- double temp, texp, temp2;
- texp = exp;
- + #ifdef __GNUC__
- + #if __GNUC__ >= 2
- + asm ("fscale "
- + : "=u" (temp), "=t" (temp2)
- + : "0" (texp), "1" (value));
- + #else
- asm ("fscale ; fxch %%st(1) ; fstp%L1 %1 "
- : "=f" (temp), "=0" (temp2)
- : "0" (texp), "f" (value));
- + #endif
- + #else
- + error unknown asm
- + #endif
- return (temp);
- }
-
- Hope this helps someone...
- --
- ws@tools.de (Wolfgang Solfrank, TooLs GmbH) +49-228-985800
-