sim-model.scm @cpu@ vs @prefix@ confusion

Dave Korn dave.korn.cygwin@googlemail.com
Tue Aug 25 00:38:00 GMT 2009


    Hi CGEN,

  It looks to me like there are a couple of spots in -gen-mach-defns where the
 prefix should be used instead of the cpu, specifically when referencing
*_INSN__MAX and in the names of the *_engine_run_* functions.  Certainly
that's how genmloop.sh and friends expect them to look.  I had to apply the
attached patch otherwise I get undefined references in the generated mloop.c,
so here it is.

cgen/ChangeLog:

	* sim-model.scm (-gen-mach-defns): Replace @cpu@ and @CPU@ by @prefix@
	and @PREFIX@ when setting CPU_MAX_INSNS and the CPU_*_ENGINE_FNs.

  I'm not sure about the relation between cpu and prefix yet, but in my
generated files the prefix appears to be a concatenation of isa and cpu.
Maybe in other ports the prefix ends up just being equal to the cpu and that's
why this hasn't caused any problems in /src?  I didn't investigate yet.

    cheers,
      DaveK

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sim-model-cpu2prefix.diff
Type: text/x-c
Size: 852 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/cgen/attachments/20090825/33840674/attachment.bin>


More information about the Cgen mailing list