Lately I have been poking around machine descriptors and GCC internals. Today I decided to actually attempt to make a z80 target for GCC 4.9.1, and so far I have been moving forward with familiarizing myself with GCC and how the backends generate code. So far not much can be shown other than some early code generation. I will update my progress as I continue planning out how to deal with registers and calling as well as adding a base set of instructions.

Sources of interest:
http://ftp.axis.se/pub/users/hp/pgccfd/pgccfd-0.5.pdf - Masters thesis going over the cris backend
https://gcc.gnu.org/onlinedocs/gccint/index.html#Top - GCC's internal documentation
ewwwwww. Why are you not using LLVM? GCC is the least hacking-friendly code imaginable.
There is significantly less work required to get a minimal target added.

Anyways, this has seen quite some progress, but not usable yet. Still working on getting basic operators added in as well as working around some restrictions placed on opcodes that gcc doesn't recognize. Right now, this is being pushed back on my project queue for a bit for some driver work and progress on Lift for the Prizm.
Sadly, this is being pushed back in my project queue due to contest #13. Once I get back to working on it, I can finish adding opcodes and allow 16-bit ints to have some use. I didn't get around to posting the latest progress, but will do that once I get my contest entry done.
Trying to decide... I think I should make a patch of all of my changes, fork a gcc clone on github, checkout the version I had, apply the patch, then merge to stable releases.

At least this way, my changes will not be scattered on local linux machines.
Forked GCC on github and pushed my patch to the z80-target branch, based off of the 4.9.1 release tag. It is able to build (woo) and compile (woo!) still. I'll be picking up on this soon.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement