summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2024-12-16 06:54:22 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2024-12-16 06:54:22 (GMT)
commit5da8b16972f6d9ce34c3c200b3acabace9b956f5 (patch)
treee215f8d93d8950b576ad063ff78028dd5cec241a /src/common
parentc9207edf32d966e67bccc1ed82cf0958de459817 (diff)
Move some basic data type definitions.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/datatypes.h26
-rw-r--r--src/common/entropy.h3
2 files changed, 28 insertions, 1 deletions
diff --git a/src/common/datatypes.h b/src/common/datatypes.h
index 3983267..681e232 100644
--- a/src/common/datatypes.h
+++ b/src/common/datatypes.h
@@ -52,5 +52,31 @@ typedef enum _SourceEndian
} SourceEndian;
+/* Taille des données intégrées */
+typedef enum _MemoryDataSize
+{
+ MDS_UNDEFINED = 0x0, /* Taille non définie */
+
+ MDS_4_BITS_UNSIGNED = 0x1, /* Opérande sur 4 bits n.-s. */
+ MDS_8_BITS_UNSIGNED = 0x2, /* Opérande sur 8 bits n.-s. */
+ MDS_16_BITS_UNSIGNED = 0x3, /* Opérande sur 16 bits n.-s. */
+ MDS_32_BITS_UNSIGNED = 0x4, /* Opérande sur 32 bits n.-s. */
+ MDS_64_BITS_UNSIGNED = 0x5, /* Opérande sur 64 bits n.-s. */
+
+ MDS_4_BITS_SIGNED = 0x8 | 0x1, /* Opérande sur 4 bits signés */
+ MDS_8_BITS_SIGNED = 0x8 | 0x2, /* Opérande sur 8 bits signés */
+ MDS_16_BITS_SIGNED = 0x8 | 0x3, /* Opérande sur 16 bits signés */
+ MDS_32_BITS_SIGNED = 0x8 | 0x4, /* Opérande sur 32 bits signés */
+ MDS_64_BITS_SIGNED = 0x8 | 0x5 /* Opérande sur 64 bits signés */
+
+} MemoryDataSize;
+
+#define MDS_4_BITS MDS_4_BITS_UNSIGNED
+#define MDS_8_BITS MDS_8_BITS_UNSIGNED
+#define MDS_16_BITS MDS_16_BITS_UNSIGNED
+#define MDS_32_BITS MDS_32_BITS_UNSIGNED
+#define MDS_64_BITS MDS_64_BITS_UNSIGNED
+
+
#endif /* _COMMON_DATATYPES_H */
diff --git a/src/common/entropy.h b/src/common/entropy.h
index b677a77..cfd51ef 100644
--- a/src/common/entropy.h
+++ b/src/common/entropy.h
@@ -26,9 +26,10 @@
#include <stdbool.h>
+#include <stddef.h>
-#include "../arch/archbase.h"
+#include "../common/datatypes.h"