From: Michael H. <mic...@ju...> - 2001-11-08 00:07:46
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 There are volatiles throughout the fp libraries, pretty much on all of the args. Funny thing is that on the z80 _fsadd performs _better_ with the volatiles there than without. It's probably something to do with only having 4 bytes worth of registers available, and probably something to do with my poor code :) - -- Michael On Wed, 7 Nov 2001, Sandeep Dutta wrote: > These look incorrect to me.. Will take a look.. The first > version had some problems with alias analysis & it took > me a while to figure it out .. hence the volatiles... > > Sandeep > > > -----Original Message----- > > From: sdc...@li... > > [mailto:sdc...@li...]On Behalf Of > > Michael Hope > > Sent: Wednesday, November 07, 2001 1:25 PM > > To: sdc...@li... > > Subject: [sdcc-devel] commit: Z80 floats / questions on promotion > > > > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > I got bored and added basic support for floats to the z80 > > port. It seems > > that the floating pt library routines are quite broken currently. I > > mostly fixed fsadd.c, but got a bit confused if I was working > > around a bug > > or fixing the code. > > > > The interesting ones are: > > > > #define SIGNBIT ((unsigned long)0x80000000) > > volatile long sign = 0; > > > > sign = SIGNBIT; > > > > This turned into > > sign = 0x7FFFFFFF. > > > > Seems reasonable. > > > > volatile long mant1; > > ... > > while (!(mant1 & (unsigned long) 0xE0000000)) > > > > turns into > > while (!(mant1 & 0x7FFFFFFF) > > > > Don't know if this should promote or what. > > > > #define HIDDEN (unsigned long)(1 << 23) > > > > mant1 &= ~HIDDEN; > > > > turns into > > mant1 &= 0x7FFFFFFF; > > > > Seems wrong. > > > > Also, all the variables are volatile which is a performance hit. Does > > anyone know why? Normally it's to work around a bug when I do it :) > > > > - -- Michael > > > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v1.0.6 (OpenBSD) > > Comment: For info see http://www.gnupg.org > > > > iEYEARECAAYFAjvppqkACgkQ3L3H1ImjCiQ2FwCeOvesbWEbaZPoiw+zxZ30Q25H > > EeIAoKARGw2WQ3FwgEhV37k4DUHHVrQM > > =sIJH > > -----END PGP SIGNATURE----- > > > > > > > > _______________________________________________ > > sdcc-devel mailing list > > sdc...@li... > > https://lists.sourceforge.net/lists/listinfo/sdcc-devel > > > > > > > > _______________________________________________ > sdcc-devel mailing list > sdc...@li... > https://lists.sourceforge.net/lists/listinfo/sdcc-devel > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (OpenBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjvpzMoACgkQ3L3H1ImjCiTKewCgsicItYYn7QbSjaTzHr9zl3Rp xNIAnRpZu6KN119v4AjZnQw8qeqrM/cx =48kj -----END PGP SIGNATURE----- |