This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Porting gcc for a virtual machine


Hi,

I want to port gcc to some virtual m/c (not yet designed). This is mainly
because we need to extract linear three address IR from gcc (similar to
Lance). The main idea is to write some virtual m/c having instruction
set as low-level C in some format so that the ported gcc (C) compiler
should emit our IR as target code. Unfortunately I'm unable to get any
detailed information from anywhere. Is there something fundamentally wrong
in the entire idea? This is because no one seemed to have done this
previously or at least did not write some informative guide for doing so
(not even core gcc team).

I've been trying to do so for last several days and following questions
are still largely unanswered:

1. What files need to written: .md is ok, but any other barely essential
	file(s) (as the low-level C code can be separately compiled for
	getting required executable)?
2. How do I tell gcc about new m/c? gcc/configure.in modification,
	gcc/config/ adding new directory and adding m/c name in
	${basic_machine} in config.sub is vaguely known.
3. How do I configure and build gcc for the new virtual m/c?

Please at least give some pointers (except gcc internals and porting gcc).
The major reason for venturing into gcc is largely because of availability
of information, which in my case at least is not very true. If I'm
searching blindly, please show me some light.

---
Aditya Kanade.
M.Tech. Student, CSE, IIT Bombay.
http://www.cse.iitb.ac.in/~aditya



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]