aboutsummaryrefslogtreecommitdiff
path: root/cpu-defs.h
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-01-24 15:26:06 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-01-24 15:26:06 +0000
commit35b66fc4f9dd2c4c3fb8e26c5c1480965b81bbd4 (patch)
tree783786d117cfbfc5f339061cbd5c97e418f5c74e /cpu-defs.h
parent13eb76e091a302dff848b0001a64d1b571450ccc (diff)
downloadqemu-35b66fc4f9dd2c4c3fb8e26c5c1480965b81bbd4.zip
qemu-35b66fc4f9dd2c4c3fb8e26c5c1480965b81bbd4.tar.gz
qemu-35b66fc4f9dd2c4c3fb8e26c5c1480965b81bbd4.tar.bz2
correct target_ulong definition
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@582 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'cpu-defs.h')
-rw-r--r--cpu-defs.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/cpu-defs.h b/cpu-defs.h
index 84b5e28..013076b 100644
--- a/cpu-defs.h
+++ b/cpu-defs.h
@@ -23,6 +23,22 @@
#include "config.h"
#include <setjmp.h>
+#ifndef TARGET_LONG_BITS
+#error TARGET_LONG_BITS must be defined before including this header
+#endif
+
+#define TARGET_LONG_SIZE (TARGET_LONG_BITS / 8)
+
+#if TARGET_LONG_SIZE == 4
+typedef int32_t target_long;
+typedef uint32_t target_ulong;
+#elif TARGET_LONG_SIZE == 8
+typedef int64_t target_long;
+typedef uint64_t target_ulong;
+#else
+#error TARGET_LONG_SIZE undefined
+#endif
+
#define EXCP_INTERRUPT 256 /* async interruption */
#define EXCP_HLT 257 /* hlt instruction reached */
#define EXCP_DEBUG 258 /* cpu stopped after a breakpoint or singlestep */