diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2024-12-16 06:54:22 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2024-12-16 06:54:22 (GMT) |
commit | 5da8b16972f6d9ce34c3c200b3acabace9b956f5 (patch) | |
tree | e215f8d93d8950b576ad063ff78028dd5cec241a /src | |
parent | c9207edf32d966e67bccc1ed82cf0958de459817 (diff) |
Move some basic data type definitions.
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/archbase.h | 6 | ||||
-rw-r--r-- | src/arch/vmpa.h | 1 | ||||
-rw-r--r-- | src/common/datatypes.h | 26 | ||||
-rw-r--r-- | src/common/entropy.h | 3 |
4 files changed, 32 insertions, 4 deletions
diff --git a/src/arch/archbase.h b/src/arch/archbase.h index 59bf18e..b29d2a1 100644 --- a/src/arch/archbase.h +++ b/src/arch/archbase.h @@ -50,6 +50,7 @@ typedef uint64_t vmpa_t; #define VMPA_MAX_SIZE 19 +#if 0 /* Taille des données intégrées */ typedef enum _MemoryDataSize { @@ -68,6 +69,7 @@ typedef enum _MemoryDataSize MDS_64_BITS_SIGNED = 0x85 /* Opérande sur 64 bits signés */ } MemoryDataSize; +#endif #define MDS_RANGE(mds) ((mds & 0xf) - 1) @@ -99,13 +101,13 @@ typedef enum _MemoryDataSize __result; \ }) - +#if 0 #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 /* Etablit la comparaison entre deux adresses. */ diff --git a/src/arch/vmpa.h b/src/arch/vmpa.h index 42136e2..8a9b961 100644 --- a/src/arch/vmpa.h +++ b/src/arch/vmpa.h @@ -30,7 +30,6 @@ #include <stdint.h> -#include "archbase.h" #include "../common/cpp.h" #include "../common/datatypes.h" #include "../common/packed.h" 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" |