This is the mail archive of the
cgen@sourceware.org
mailing list for the CGEN project.
[patch] One more cpu-vs-prefix fix.
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: cgen at sourceware dot org
- Date: Tue, 29 Sep 2009 04:59:36 +0100
- Subject: [patch] One more cpu-vs-prefix fix.
Hiya! I found one more place that looks to me like it should be using
@prefix@ instead of @cpu@, since that's how all the rest of the code generates
the "XXX_init_idesc_table" name.
I haven't tested this much yet except that it fixes a discrepancy between
the prototype generated in the decode.h and the function call in the mloop.c
files for the private port I'm working on. I think that sh64 is the only
target where there actually is any difference between @prefix@ and @cpu@ in
practice, so I tried regenerating it and it seemed to compile ok, or at any
rate without any missing or duplicated symbols. I couldn't get the tests to
run, they all fail with an error that suggests the testsuite is attempting to
run target binaries on the host machine:
> spawn /sgun/tools/obj.sh64/ld/ld-new andb.cgs.o -m shelf32 -o andb.cgs.x
> andb.cgs.x
> spawn andb.cgs.x
> andb.cgs.x: andb.cgs.x: cannot execute binary file
> FAIL: sh5 andb.cgs (execution)
> Testing andi.cgs on machine sh5.
So whatever that is, I'd guess it's not related. Here's a changelog entry,
if you want the patch:
cgen/ChangeLog:
* sim-model.scm (@cpu@_prepare_run): Use @prefix@, not @cpu@.
cheers,
DaveK
Index: cgen/sim-model.scm
===================================================================
--- cgen/sim-model.scm (revision 171)
+++ cgen/sim-model.scm (working copy)
@@ -305,7 +305,7 @@ static void
@cpu@_prepare_run (SIM_CPU *cpu)
{
if (CPU_IDESC (cpu) == NULL)
- @cpu@_init_idesc_table (cpu);
+ @prefix@_init_idesc_table (cpu);
}
static const CGEN_INSN *