diff --git a/src/core/sal/SALConfig.cc b/src/core/sal/SALConfig.cc index 7fe641c4..db5acdd5 100644 --- a/src/core/sal/SALConfig.cc +++ b/src/core/sal/SALConfig.cc @@ -2,11 +2,18 @@ namespace fail { -const address_t ADDR_INV = static_cast (0); -const address_t ANY_ADDR = static_cast (-1); -const unsigned ANY_INSTR = static_cast (-1); -const unsigned ANY_TRAP = static_cast (-1); -const unsigned ANY_INTERRUPT = static_cast (-1); +// Flag initialization depends on the current selected simulator +// (For now, the initialization values are all the same): +#if defined BUILD_BOCHS || defined BUILD_GEM5 || \ + defined BUILD_OVP || defined BUILD_QEMU +const address_t ADDR_INV = static_cast (0); +const address_t ANY_ADDR = static_cast (-1); +const unsigned ANY_INSTR = static_cast (-1); +const unsigned ANY_TRAP = static_cast (-1); +const unsigned ANY_INTERRUPT = static_cast (-1); const timer_id_t INVALID_TIMER = static_cast (0); +#else + #error SAL Config Target not defined +#endif } // end-of-namespace: fail diff --git a/src/core/sal/SALConfig.hpp b/src/core/sal/SALConfig.hpp index 3353a760..048e3e79 100644 --- a/src/core/sal/SALConfig.hpp +++ b/src/core/sal/SALConfig.hpp @@ -26,9 +26,7 @@ typedef uint32_t regwidth_t; //!< type of register width [bits] typedef register_data_t regdata_t; //!< type of register data typedef timer_t timer_id_t; //!< type of timer IDs -// The following flags are defined in SALConfig.cc. - -// FIXME: The flags should be initialized based on simulator-specific values! +// Note: The following flags are defined in SALConfig.cc. //! invalid address flag (e.g. for memory address ptrs) extern const address_t ADDR_INV;