This is the mail archive of the gcc-help@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]

gen_* functions in gcc source


***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.


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