This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
gen_* functions in gcc source
- To: help-gcc at gnu dot org
- Subject: gen_* functions in gcc source
- From: Soubhik Bhattacharya <soubhik at cse dot iitk dot ac dot in>
- Date: Sun, 11 Feb 2001 20:33:30 +0530 (IST)
- Organization: Dept of Computer Science IIT Kanpur
***pl CC the reply to me as i'm NOT on the list***
hi!
i'm working on a tool that reads a machine description (written in a
language called Sim-nML) and generates a machine description for gcc. for
this i'm looking into machide descriptions and source files (of gcc
2.8.1).......
i guess the expected prototypes of gen_* functions (e.g. gen_call()) are
hard-coded in gcc's m/c independent files. in fact, machine-independent
files, calls.c, expr.c invokes gen_call() with four arguments, so that the
expected prototype of gen_call() is as follows:
rtx gen_call (rtx, rtx, rtx, rtx)
now, one can write an arbitrary m/c description so that gen_call(), as
generated from the target.md, has a different prototype. in fact, i've
modified sparc.md in a way, that in insn-emit.c (a file generated from
the md file), gen_call() has following prototype definition:
rtx gen_call(rtx, rtx)
because of this mismatch, one would expect that while building gcc for
sparc, there will be a compilation error. but this is not happening. in
fact, i've invoked gen_call() recursively in insn-emit.c (just to
test) with four arguments and compiled that module (stand-alone)
successfully!...... dose anybody have a clue? my compiler is gcc 2.95.3
and build platform is i586-linux-gnu2.2.15......
regards,
soubhik.