Re: [cc65] Re: floating point support redux

From: Groepaz <groepaz1gmx.net>
Date: 2010-04-26 21:41:38
On Montag 26 April 2010, Aaron J. Grier wrote:
> On Thu, Apr 08, 2010 at 06:29:47PM +0200, Groepaz wrote:
> > - the compiler uses ieee754 floats. same calling conventions as for
> > 32bit longs can be used. (optionally, doubles can be made the same as
> > floats)
> >
> > - floating point library routines may come at two flavours: one
> > generic fully iee compliant emulator (to be written), and target
> > specific routines which may work on a different floating point format
> > *internally* (i have such routines for c64, similar ones can probably
> > be written for most targets that have basic in rom or sth). there
> > might be a linker switch to select which of the two gets linked.
> 
> VAX and PDP-11 both have non-IEEE floating point.  even alpha needs
> additional routines to do full IEEE implementation.  why is IEEE
> necessary, other than being interesting from a hack perspective, or data
> interchange with other platforms?  for c64 at least, doesn't the kernal
> have some floating point routines that could be re-used?

every floating point format must be supported by both the target AND the host 
(the compiler), so while using the kernal float routines for cbm targets might 
sound like a good idea at first, it also means writing (and maintaining) a 
floating point implementation with the exact same properties on the host. now 
multiply that with the number of targets. its much easier to write one 
emulator that can deal with the format used on all hosts.

-- 

http://www.hitmen-console.org    http://magicdisk.untergrund.net
http://www.pokefinder.org        http://ftp.pokefinder.org

It is practically impossible to teach good programming to students that have 
had a prior exposure to BASIC; as potential programmers they are mentally 
mutilated beyond hope of regeneration. 
<Edsgar W. Dijkstra>

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Apr 26 21:48:51 2010

This archive was generated by hypermail 2.1.8 : 2010-04-26 21:48:53 CEST