This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
Re: multiple isa support
- To: Ben Elliston <bje at redhat dot com>
- Subject: Re: multiple isa support
- From: Johan Rydberg <johan dot rydberg at netinsight dot se>
- Date: Fri, 01 Dec 2000 15:16:26 +0100
- CC: Doug Evans <dje at transmeta dot com>, cgen development <cgen at sources dot redhat dot com>
- Organization: Net Insight AB
- References: <Pine.LNX.4.30.0011241309040.2578-100000@moshpit.cygnus.com>
Ben Elliston wrote:
>
> Hi Doug,
>
> > #include "cgen-engine.h"
> > #include "cpu.h"
> > #include "decode.h"
>
> I'm guessing the way to go is to have a separate #include for each
> decoder. After quick glance at m32r's decode.h and decodex.h it seems
> like they can co-exist.
>
> I ended up leaving the code generator to emit #include "decode.h" and then
> created my own decode.h which brings in the relevant decoder:
>
> #ifdef WANT_ISA_FOO
> #include "decode-foo.h"
> #endif
>
> #ifdef WANT_ISA_BAR
> #include "decode-bar.h"
> #endif
Is this commited to the CVS-repository ?
I'm using CGEN to port an architecture (OpenRISC) that has two isas:
OR32
and OR16. I have created a main .cpu-file for the architecture and has
two other files that holds the seperate isas (much like the arm.cpu <->
arm7.cpu, thumb.cpu).
From the main .cpu-file:
(if (keep-isa? (or32))
(include "or32.cpu"))
(if (keep-isa? (or16))
(include "or16.cpu"))
When generated "desc.[c|h]" using the "desc" target it seems just to
handle
one ISA (the first one defined).
Here's how I'm invoking cgen:
$ make ARCH=or1k desc
If you look at the result (tmp-desc.c) you see:
/* jr $rA */
{
@ARCH@_INSN_JR, "jr", "jr", 32,
{ 0|A(DELAY_SLOT)|A(UNCOND_CTI), { (1<<MACH_BASE), (1<<ISA_OR32) }
}
},
...
/* jr $rA */
{
@ARCH@_INSN_JR, "jr", "jr", 16,
{ 0|A(DELAY_SLOT)|A(UNCOND_CTI), { (1<<MACH_BASE), (1<<ISA_OR32) }
}
},
The first "jr" insn is from the OR32 isa, the other one from OR16.
I guess that this is not the right behavior, right? Is this a bug,
not implemented or am I just invoking cgen incorrect?
Maybe someone could give me some guidence how to use cgen with multiple
isas.
regards,
Johan.
--
Johan Rydberg, Net Insight AB, Sweden, +46-8-685 04 00
$ ON F$ERROR("LANGUAGE","ENGLISH","IN_MESSAGE").GT.F$ERROR("NORMAL") -
THEN EXCUSE/OBJECT=ME