From: Doug Evans <dje@sebabeach.org>
To: Dave Korn <dave.korn.cygwin@googlemail.com>
Cc: cgen@sourceware.org
Subject: Re: sim-model.scm @cpu@ vs @prefix@ confusion
Date: Tue, 25 Aug 2009 05:41:00 -0000 [thread overview]
Message-ID: <4A93798E.1070603@sebabeach.org> (raw)
In-Reply-To: <4A9335C2.1030606@gmail.com>
Dave Korn wrote:
> 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
>
>
Thanks for the patch!
I looked into this and you are correct.
I'll apply the patch tomorrow.
For reference sake, prefix is set here in src/sim/common/cgen.sh. This
explains where <cpu>_<isa> is coming from.
if test -z "$isa" ; then
isa=all
prefix=$cpu
else
prefix=${cpu}_$isa
fi
[Seems like the test should be $isa == "" || $isa == "all", but that's
another patch.]
prev parent reply other threads:[~2009-08-25 5:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-25 0:38 Dave Korn
2009-08-25 5:41 ` Doug Evans [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A93798E.1070603@sebabeach.org \
--to=dje@sebabeach.org \
--cc=cgen@sourceware.org \
--cc=dave.korn.cygwin@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).