diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2014-10-09 17:04:19 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2014-10-09 17:04:19 +0200 |
| commit | 59ef1b1d854cac3e94cd4565a0ac750de9a4c92d (patch) | |
| tree | 7325c13af164828bc9f4b4e251dbb8de7e982462 /miasm2/jitter/vm_mngr.h | |
| parent | 19ff9643d73b6c95a202f24b62b24871555b3797 (diff) | |
| download | miasm-59ef1b1d854cac3e94cd4565a0ac750de9a4c92d.tar.gz miasm-59ef1b1d854cac3e94cd4565a0ac750de9a4c92d.zip | |
Jitter: add endianess support
Diffstat (limited to 'miasm2/jitter/vm_mngr.h')
| -rw-r--r-- | miasm2/jitter/vm_mngr.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/miasm2/jitter/vm_mngr.h b/miasm2/jitter/vm_mngr.h index 2bf23f37..deb56042 100644 --- a/miasm2/jitter/vm_mngr.h +++ b/miasm2/jitter/vm_mngr.h @@ -22,7 +22,6 @@ #define __BYTE_ORDER __BYTE_ORDER__ #endif -#if __BYTE_ORDER == __BIG_ENDIAN #define Endian16_Swap(value) \ ((((uint16_t)((value) & 0x00FF)) << 8) | \ (((uint16_t)((value) & 0xFF00)) >> 8)) @@ -42,13 +41,6 @@ ((((uint64_t)value)>>24) & 0x0000000000FF0000ULL) | \ ((((uint64_t)value)>>40) & 0x000000000000FF00ULL) | \ ((((uint64_t)value)>>56) & 0x00000000000000FFULL)) -#else -#define Endian16_Swap(value) (value) - -#define Endian32_Swap(value) (value) - -#define Endian64_Swap(value) (value) -#endif @@ -66,9 +58,11 @@ LIST_HEAD(memory_breakpoint_info_head, memory_breakpoint_info); #define MAX_MEMORY_PAGE_POOL_TAB 0x100000 #define MEMORY_PAGE_POOL_MASK_BIT 12 #define PAGE_SIZE (1<<MEMORY_PAGE_POOL_MASK_BIT) +#define VM_BIG_ENDIAN 1 +#define VM_LITTLE_ENDIAN 2 typedef struct { - + int sex; struct memory_page_list_head memory_page_pool; struct code_bloc_list_head code_bloc_pool; struct memory_breakpoint_info_head memory_breakpoint_pool; |