> > I have been porting tic54x to gcc. I use gcc-4.2.2 version. I write some > > simplest c54x.h and c54x.c and a empty md, and I > > I think the answer is right there > ^^^^^^^^^^
IIRC what you need as a bare minimum as a whole bunch of macros in the header file and a jump insn. Take a look at some of the tutorials on writing machine descriptions off the gcc wiki. There was a workshop about writing incremental machine descriptions held sometime back that can help you write one from scratch. http://gcc.gnu.org/wiki/GettingStarted http://www.cse.iitb.ac.in/~uday/gcc-workshop/?file=downloads HTH cheers Ramana On Dec 16, 2007 8:24 PM, Hans-Peter Nilsson <[EMAIL PROTECTED]> wrote: > On Wed, 12 Dec 2007, a2220333 wrote: > > > hi, > > I have been porting tic54x to gcc. I use gcc-4.2.2 version. I write some > > simplest c54x.h and c54x.c and a empty md, and I > > I think the answer is right there > ^^^^^^^^^^ > > > compile it to generate the tic54x-gcc compiler. > > > > But when I execute the compiler I generate I got a segmentation fault > > error. Is there anything must be define in c54x.c or > > c54x.h that could make the simplest compiler with no correct output and no > > errors? Because I want to add functions from this > > basic port. > > If that wasn't the bug, I suggest you start up gdb and step > through cc1, but I'd be surprised if you get anywhere without > the prerequisite move, add, and control flow insns in the .md. > > brgds, H-P > -- Ramana Radhakrishnan