From ed58f77c473cf6f35a17ba1448a12dbca089987d Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Tue, 15 Aug 2006 17:41:22 -0400 Subject: fixes for gcc 4.1 Nate needs to fix sinic builder stuff Gabe needs to verify my fixes to decoder.isa OPT/DEBUG compiles for ALPHA_FS, ALPHA_SE, MIPS_SE, SPARC_SE with this changeset README: Fix the swig version in the readme src/SConscript: remove sinic until nate fixes the builder crap for it src/arch/alpha/system.hh: src/arch/mips/isa/includes.isa: src/arch/sparc/isa/decoder.isa: src/base/stats/visit.cc: src/base/timebuf.hh: src/dev/ide_disk.cc: src/dev/sinic.cc: src/mem/cache/miss/mshr.cc: src/mem/cache/miss/mshr_queue.cc: src/mem/packet.hh: src/mem/request.hh: src/sim/builder.hh: src/sim/system.hh: fixes for gcc 4.1 --HG-- extra : convert_revision : 3775427c0047b282574d4831dd602c96cac3ba17 --- src/sim/builder.hh | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'src/sim/builder.hh') diff --git a/src/sim/builder.hh b/src/sim/builder.hh index 2997fe5c3..aa0e3d17c 100644 --- a/src/sim/builder.hh +++ b/src/sim/builder.hh @@ -179,5 +179,45 @@ SimObjectClass the##OBJ_CLASS##Class(CLASS_NAME, \ /* see param.hh */ \ DEFINE_SIM_OBJECT_CLASS_NAME(CLASS_NAME, OBJ_CLASS) +/* Macros that use the namespace for sinic... yuk. */ +#define BEGIN_DECLARE_SIM_OBJECT_PARAMS_WNS(NAME_SPACE, OBJ_CLASS) \ +class NAME_SPACE##OBJ_CLASS##Builder : public SimObjectBuilder \ +{ \ + public: + +#define END_DECLARE_SIM_OBJECT_PARAMS_WNS(NAME_SPACE, OBJ_CLASS) \ + \ + NAME_SPACE##OBJ_CLASS##Builder(const std::string &iniSection); \ + virtual ~NAME_SPACE##OBJ_CLASS##Builder() {} \ + \ + NAME_SPACE::OBJ_CLASS *create(); \ +}; + +#define BEGIN_INIT_SIM_OBJECT_PARAMS_WNS(NAME_SPACE, OBJ_CLASS) \ + NAME_SPACE::OBJ_CLASS##Builder::OBJ_CLASS##Builder(const std::string &iSec) \ + : SimObjectBuilder(iSec), + + +#define END_INIT_SIM_OBJECT_PARAMS_WNS(NAME_SPACE, OBJ_CLASS) \ +{ \ +} + +#define CREATE_SIM_OBJECT_WNS(NAME_SPACE, OBJ_CLASS) \ +NAME_SPACE::OBJ_CLASS *NAME_SPACE##OBJ_CLASS##Builder::create() + +#define REGISTER_SIM_OBJECT_WNS(NAME_SPACE, CLASS_NAME, OBJ_CLASS) \ +SimObjectBuilder * \ +new##NAME_SPACEi##OBJ_CLASS##Builder(const std::string &iniSection) \ +{ \ + return new NAME_SPACE##OBJ_CLASS##Builder(iniSection); \ +} \ + \ +SimObjectClass the##NAME_SPACE##OBJ_CLASS##Class(CLASS_NAME, \ + new##NAME_SPACE##OBJ_CLASS##Builder); \ + \ +/* see param.hh */ \ +DEFINE_SIM_OBJECT_CLASS_NAME(CLASS_NAME, NAME_SPACE##OBJ_CLASS) + + #endif // __BUILDER_HH__ -- cgit v1.2.3