Re: [cc65] lcc port to the c64

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2000-11-16 20:10:40


On Thu, Nov 16, 2000 at 03:39:46PM +0100, cpg_at_aladdin.de wrote:
> If you follow the credits section to the lcc backend, there is also something
> noteworthy - a 6502 version of gcc. Maybe we could change it to used ca65 and
> friends?

I have had a look an the sources of this gcc port a long time ago, and I don't
think this would be worthwile:

  * It emulates a 24 bit machine with 16 registers on the 6502. First, this is
    slow, since the 6502 has enough trouble even with 16 bit values. Second,
    this means that there are no 32 bit longs (which is the minimum size
    according to the standard). And third, the zeropage footprint is quite
    large.

  * There is no stack, all space for locals is static. This means that you
    cannot have functions calling themselves.

  * The docs state that "This port required changes to the standard GCC source
    code, code that is normally not necessary to change for a port." I don't
    think that the gcc folks will like that, so it may be difficult to get the
    changes into the main gcc tree.

  * The patches are from '97 - which means they're quite old. It may be quite
    some work to apply them to a more recent version of gcc (remember that gcc
    development is fast since egcs has taken over).

All in all it seems that gcc is too big as a compiler to be targeted to an 8
bit machine. As far as I remember there has never been a port to 16 bit intel
CPUs for this reason.

The 6502 lcc compiler is a much more interesting port. Unfortunately it has
been vapourware for several years (Daniel Dallmans Lunix page mentions it for
a long time now, but I've never found anything to download). Maybe this will
change (I could not test the compiler that is downloadable from the Oric page,
since I currently do not have any DOS capable machines running).

Regards


	Uz


--
Ullrich von Bassewitz                                  uz_at_musoftware.de



---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo_at_musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:36 CET