# error spike requires a two''s-complement c++ implementation
#endif
+#ifdef WORDS_BIGENDIAN
+# error spike requires a little-endian host
+#endif
+
#include <cstdint>
#include <string.h>
#include <strings.h>
} while(0)
#define set_pc_and_serialize(x) \
- do { set_pc(x); /* check alignment */ \
+ do { reg_t __npc = (x); \
+ set_pc(__npc); /* check alignment */ \
npc = PC_SERIALIZE_AFTER; \
- STATE.pc = (x); \
+ STATE.pc = __npc; \
} while(0)
/* Sentinel PC values to serialize simulator pipeline */
#define DEBUG_RAM_SIZE 64
#define DEBUG_RAM_END (DEBUG_RAM_START + DEBUG_RAM_SIZE)
#define DEBUG_END 0xfff
-#define DEBUG_CLEARDEBINT 0x108
-#define DEBUG_SETHALTNOT 0x100
+#define DEBUG_CLEARDEBINT 0x100
+#define DEBUG_SETHALTNOT 0x10c
#define DEBUG_SIZE (DEBUG_END - DEBUG_START + 1)
#endif