From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johan Rydberg To: Ben Elliston Cc: Doug Evans , cgen development Subject: Re: multiple isa support Date: Fri, 01 Dec 2000 06:15:00 -0000 Message-id: <3A27B2BA.45326A9A@netinsight.se> References: X-SW-Source: 2000-q4/msg00159.html 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<