Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!know!zaphod.mps.ohio-state.edu!usc!snorkelwacker!bloom-beacon!daemon From: jfc@athena.mit.edu (John F Carr) Newsgroups: comp.sys.ibm.pc.rt Subject: AOS floating point bug Message-ID: <1990Sep17.061429.27757@athena.mit.edu> Date: 17 Sep 90 06:14:29 GMT Sender: daemon@athena.mit.edu (Mr Background) Distribution: na Organization: Massachusetts Institute of Technology Lines: 33 There is a bug in the floating point code generator for the 68881 (/usr/lib/libfp.a(f881gen.o)). In some cases, single precision floats in general registers can cause bad code generation (register 0 is marked as available for address calculations when it is [1] not a valid base register for address calculations [2] in use). Apparently hc doesn't generate much code that triggers this bug, but gcc does. This is a fix (it will be making its way though official channels to IBM as well). *** /source/bsd-4.3/rt/usr.lib/libfp/genfp/f881gen.c Fri Jun 16 17:35:44 1989 --- f881gen.c Mon Sep 17 01:53:39 1990 *************** *** 309,315 **** if (is_scratchg(gi, (rr & 0x0f))) fp_free_genr(gi, (rr & 0x0f)); ! if (is_scratchg(gi, (rr >> 4))) fp_free_genr(gi, (rr >> 4)); return (i); --- 309,315 ---- if (is_scratchg(gi, (rr & 0x0f))) fp_free_genr(gi, (rr & 0x0f)); ! if (is_double(rr) && is_scratchg(gi, (rr >> 4))) fp_free_genr(gi, (rr >> 4)); return (i); -- --John Carr (jfc@athena.mit.edu)