This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

multiple isa support


Ben Elliston writes:
 > Hi.
 > 
 > I'm making slow progress on making cgen capable of emitting separate
 > decoders and semantics for each of a number of ISAs.  cpuall.h contains one
 > booby trap that I'm not sure about how to handle:
 > 
 > 	#include "cgen-engine.h"
 > 	#include "cpu.h"
 > 	#include "decode.h"
 > 
 > [...]
 > 
 > Should there be a #include for each decoder?  Should they be able to
 > co-exist?  If so, an additional problem is that hardwiring filenames like
 > this is *wrong* -- the shell wrapper may suffix all of the generated
 > filenames.
 > 
 > Any advice on how to proceed?

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.  Whether decoders for different isas can co-exist, I
dunno; I'd have to see them first.

Which suffix are you refering to?
Here's what m32r/cpuall.h contains.


/* Include files for each cpu family.  */

#ifdef WANT_CPU_M32RBF
#include "eng.h"
#include "cgen-engine.h"
#include "cpu.h"
#include "decode.h"
#endif

#ifdef WANT_CPU_M32RXF
#include "engx.h"
#include "cgen-engine.h"
#include "cpux.h"
#include "decodex.h"
#endif

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]