diff --git a/libsrc/Makefile b/libsrc/Makefile index 970ae6972..9bbb0aadb 100644 --- a/libsrc/Makefile +++ b/libsrc/Makefile @@ -197,9 +197,9 @@ ifeq ($(TARGET),$(filter $(TARGET),$(GEOS))) endif ifeq ($(TARGET),c65) -# FIXME: the compiler does not work for 4510 yet +# FIXME: this does not work because of the SP vs C_SP clash else ifeq ($(TARGET),mega65) -# FIXME: the compiler does not work for 45GS02 yet +# FIXME: this does not work because of the SP vs C_SP clash else SRCDIRS += common \ conio \ diff --git a/src/cc65/main.c b/src/cc65/main.c index abed6acae..648c603cd 100644 --- a/src/cc65/main.c +++ b/src/cc65/main.c @@ -348,7 +348,6 @@ static void DefineCpuMacros (void) case CPU_NONE: case CPU_SWEET16: case CPU_M740: - case CPU_4510: case CPU_UNKNOWN: CPUName = (CPU == CPU_UNKNOWN)? "unknown" : CPUNames[CPU]; Internal ("Invalid CPU \"%s\"", CPUName); @@ -382,6 +381,14 @@ static void DefineCpuMacros (void) DefineNumericMacro ("__CPU_HUC6280__", 1); break; + case CPU_4510: + DefineNumericMacro ("__CPU_4510__", 1); + break; + + case CPU_45GS02: + DefineNumericMacro ("__CPU_45GS02__", 1); + break; + default: FAIL ("Unexpected value in switch"); break; @@ -397,6 +404,8 @@ static void DefineCpuMacros (void) DefineNumericMacro ("__CPU_ISET_65C02__", CPU_ISET_65C02); DefineNumericMacro ("__CPU_ISET_65816__", CPU_ISET_65816); DefineNumericMacro ("__CPU_ISET_HUC6280__", CPU_ISET_HUC6280); + DefineNumericMacro ("__CPU_ISET_4510__", CPU_ISET_4510); + DefineNumericMacro ("__CPU_ISET_45GS02__", CPU_ISET_45GS02); /* Now define the macro that contains the bit set with the available ** cpu instructions.