cpu: ext_reg switch bug FIX by markus
[calu.git] / 3b_sim / cdat.hpp
index e9f88f6f93156657238620d78c951d4a469f56c8..2046de5914162772fbfe2fbf497f7aee57f4b551 100644 (file)
@@ -4,9 +4,12 @@
 #include <string>
 #include <sstream>
 
-typedef int CDat;
+typedef __uint32_t CDat;
+typedef __uint64_t CDatd;
 
-#define BIT_LEN 32
+#define BYTE_COUNT 4
 
-//static_assert(sizeof(CDat) == 4, "The size of the datatype for int is NOT 4 bytes (32 Bit!)");
+#define BIT_LEN (BYTE_COUNT * 8)
+static_assert(sizeof(CDat) == BYTE_COUNT, "The size of the datatype for int is NOT 4 bytes (32 Bit!)");
+static_assert(sizeof(CDatd) > BYTE_COUNT, "The size of the datatype for double int is NOT bigger than 4 bytes (32 Bit!)");
 #endif