Hi Since there are a few new files, I made a tarball of them (which is attached to this mail). Comments are more than welcome! [component/cgen-cpu] 2002-05-17 Johan Rydberg * compCGEN.cxx: If SIDTARGET_PCC, add hw-cpu-ppc support. * configure.in: Decend into ppc if necessary. * configure: Regenerate. [component/gloss] 2002-05-17 Johan Rydberg * compGloss.cxx: If SIDTARGET_PCC, add sw-gloss-ppc/libgloss and sw-gloss-ppc/bug support. * Makefile.am (PPCGLOSS): Define if SIDTARGET_PPC is defined. * Makefine.in: Regenerate. [bsp] 2002-05-17 Johan Rydebrg * configrun-sid.in: Add PowerPC support. * Makefile.am: Likewise. * Makefile.in: Regenerate. * powerpc-elf-sid: New file. Index: bsp/Makefile.am =================================================================== RCS file: /cvs/src/src/sid/bsp/Makefile.am,v retrieving revision 1.7 diff -u -u -r1.7 Makefile.am --- bsp/Makefile.am 17 Dec 2001 09:31:17 -0000 1.7 +++ bsp/Makefile.am 17 May 2002 16:45:09 -0000 @@ -20,6 +20,10 @@ FAM3SCRIPTS = m68k-elf-sid endif +if SIDTARGET_PPC +FAM4SCRIPTS = powerpc-elf-sid +endif + if SIDTARGET_XSTORMY16 FAM10SCRIPTS = xstormy16-elf-sid endif Index: bsp/configrun-sid.in =================================================================== RCS file: /cvs/src/src/sid/bsp/configrun-sid.in,v retrieving revision 1.34 diff -u -u -r1.34 configrun-sid.in --- bsp/configrun-sid.in 28 Dec 2001 21:16:48 -0000 1.34 +++ bsp/configrun-sid.in 17 May 2002 16:45:10 -0000 @@ -14,6 +14,7 @@ %cpu_comptype = ( "arm" => "hw-cpu-arm7t", "thumb" => "hw-cpu-arm7t", + "ppc" => "hw-cpu-ppc", "x86" => "hw-cpu-x86", # INSERT NEW ENTRIES HERE "m32r" => "hw-cpu-m32r/d", @@ -21,6 +22,7 @@ ); %cpu_defaultendian = ( + "ppc" => "-EB" "x86" => "-EL", "m32r" => "-EB", "xstormy16" => "-EL", @@ -29,6 +31,7 @@ %gloss_comptype = ( "arm" => "sw-gloss-arm/angel", "thumb" => "sw-gloss-arm/angel", + "ppc" => "sw-gloss-ppc/bug", "x86" => "sw-gloss-generic/libgloss", # INSERT NEW ENTRIES HERE "m32r" => "sw-gloss-m32r/libgloss", @@ -38,6 +41,7 @@ %gloss_memspecs = ( "arm" => "0x00000000,0x00800000", "thumb" => "0x00000000,0x00800000", + "ppc" => "0x00000000,0x00800000", "x86" => "0x00000,0x500000", # INSERT NEW ENTRIES HERE "m32r" => "0x00000000,0x00800000", Index: component/cgen-cpu/compCGEN.cxx =================================================================== RCS file: /cvs/src/src/sid/component/cgen-cpu/compCGEN.cxx,v retrieving revision 1.8 diff -u -u -r1.8 compCGEN.cxx --- component/cgen-cpu/compCGEN.cxx 7 Feb 2002 17:32:28 -0000 1.8 +++ component/cgen-cpu/compCGEN.cxx 17 May 2002 16:45:10 -0000 @@ -26,6 +26,9 @@ #if SIDTARGET_M32R #include "m32rbf.h" #endif +#if SIDTARGET_PPC +#include "ppcbf.h" +#endif #if SIDTARGET_XSTORMY16 #include "xstormy16.h" #endif @@ -280,6 +283,9 @@ #if SIDTARGET_ARM types.push_back ("hw-cpu-arm7t"); #endif +#if SIDTARGET_PPC + types.push_back ("hw-cpu-ppc"); +#endif #if SIDTARGET_XSTORMY16 types.push_back ("hw-cpu-xstormy16"); #endif @@ -298,6 +304,10 @@ #if SIDTARGET_ARM if (typeName == "hw-cpu-arm7t") return new arm7f::arm7f_cpu (); +#endif +#if SIDTARGET_PPC + if (typeName == "hw-cpu-ppc") + return new ppcbf::ppcbf_cpu (); #endif #if SIDTARGET_XSTORMY16 if (typeName == "hw-cpu-xstormy16") Index: component/cgen-cpu/configure.in =================================================================== RCS file: /cvs/src/src/sid/component/cgen-cpu/configure.in,v retrieving revision 1.3 diff -u -u -r1.3 configure.in --- component/cgen-cpu/configure.in 17 Dec 2001 09:31:19 -0000 1.3 +++ component/cgen-cpu/configure.in 17 May 2002 16:45:10 -0000 @@ -37,6 +37,9 @@ if test $sidtarget_m32r -eq 1; then cpu_subdirs="$cpu_subdirs m32r" fi +if test $sidtarget_ppc -eq 1; then + cpu_subdirs="$cpu_subdirs ppc" +fi if test $sidtarget_xstormy16 -eq 1; then cpu_subdirs="$cpu_subdirs xstormy16" fi Index: component/gloss/Makefile.am =================================================================== RCS file: /cvs/src/src/sid/component/gloss/Makefile.am,v retrieving revision 1.3 diff -u -u -r1.3 Makefile.am --- component/gloss/Makefile.am 4 Aug 2001 11:20:36 -0000 1.3 +++ component/gloss/Makefile.am 17 May 2002 16:45:10 -0000 @@ -31,9 +31,17 @@ M32RDATA = endif +if SIDTARGET_PPC +PPCGLOSS = ppc.cxx +PPCDATA = +else +PPCGLOSS = +PPCDATA = +endif + libgloss_la_SOURCES = \ compGloss.cxx gloss.cxx hostops.cxx newlib.cxx \ - $(MIPSGLOSS) $(ARMGLOSS) $(M32RGLOSS) + $(MIPSGLOSS) $(ARMGLOSS) $(M32RGLOSS) $(PPCGLOSS) libgloss_la_LDFLAGS = -module -no-undefined Index: component/gloss/compGloss.cxx =================================================================== RCS file: /cvs/src/src/sid/component/gloss/compGloss.cxx,v retrieving revision 1.1 diff -u -u -r1.1 compGloss.cxx --- component/gloss/compGloss.cxx 7 Dec 2000 19:30:50 -0000 1.1 +++ component/gloss/compGloss.cxx 17 May 2002 16:45:10 -0000 @@ -19,6 +19,9 @@ #if SIDTARGET_MIPS #include "mips.h" #endif +#if SIDTARGET_PPC +#include "ppc.h" +#endif #include "gloss.h" using namespace std; @@ -39,6 +42,10 @@ #if SIDTARGET_MIPS types.push_back("sw-gloss-mips32/idt"); #endif +#if SIDTARGET_PPC + types.push_back("sw-gloss-ppc/libgloss"); + types.push_back("sw-gloss-ppc/bug"); +#endif types.push_back("sw-gloss-generic/libgloss"); return types; } @@ -60,6 +67,12 @@ if (typeName == "sw-gloss-mips32/idt") return new mips32_idt(); #endif +#if SIDTARGET_PPC + if (typeName == "sw-gloss-ppc/libgloss") + return new ppc_libgloss(); + if (typeName == "sw-gloss-ppc/bug") + return new ppc_ppcbug(); +#endif if (typeName == "sw-gloss-generic/libgloss") return new gloss32(); return 0; @@ -83,8 +96,12 @@ mips32_idt* g3 = dynamic_cast(c); if (g3) { delete g3; return; } #endif - gloss32* g4 = dynamic_cast(c); +#if SIDTARGET_PPC + ppc_libgloss* g4 = dynamic_cast(c); if (g4) { delete g4; return; } +#endif + gloss32* g5 = dynamic_cast(c); + if (g5) { delete g5; return; } }