summaryrefslogtreecommitdiff
path: root/compiler.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-11-13 09:37:59 -0800
committerH. Peter Anvin <hpa@zytor.com>2007-11-13 09:37:59 -0800
commitd1fb15c154b99f9ca8d2356fa9057827b0ab89af (patch)
treee6e95a1979107466eadfad29577e278ee1273890 /compiler.h
parenta5fb90834aa2e849e67bf45b478d498a6cb72062 (diff)
downloadnasm-d1fb15c154b99f9ca8d2356fa9057827b0ab89af.tar.gz
nasm-d1fb15c154b99f9ca8d2356fa9057827b0ab89af.tar.bz2
nasm-d1fb15c154b99f9ca8d2356fa9057827b0ab89af.zip
Address data is int64_t; simplify writing an address object
Address data is always int64_t even if the size itself is smaller; this was broken on bigendian hosts (still need testing!) Create simple "write sized object" macros.
Diffstat (limited to 'compiler.h')
-rw-r--r--compiler.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler.h b/compiler.h
index 6e9e37e..b660855 100644
--- a/compiler.h
+++ b/compiler.h
@@ -96,4 +96,15 @@ int strnicmp(const char *, const char *, size_t);
char *strsep(char **, const char *);
#endif
+/*
+ * Define this to 1 for faster performance if this is a littleendian
+ * platform which can do unaligned memory references. It is safe
+ * to leave it defined to 0 even if that is true.
+ */
+#if defined(__i386__) || defined(__x86_64__)
+# define X86_MEMORY 1
+#else
+# define X86_MEMORY 0
+#endif
+
#endif /* NASM_COMPILER_H */