summaryrefslogtreecommitdiff
path: root/nasm.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-11-08 20:43:22 -0800
committerH. Peter Anvin <hpa@zytor.com>2007-11-08 20:43:22 -0800
commit44d7dcf87b5717306318f0b5882157f801e844f4 (patch)
tree01be48b1c1813b712cb1edec9aa623d5226feceb /nasm.h
parent88602aa53acc6826b358de2adfb4c554df48aba0 (diff)
downloadnasm-44d7dcf87b5717306318f0b5882157f801e844f4.tar.gz
nasm-44d7dcf87b5717306318f0b5882157f801e844f4.tar.bz2
nasm-44d7dcf87b5717306318f0b5882157f801e844f4.zip
Fix building under OpenWatcom
OpenWatcom doesn't like 64-bit switch arguments; the change to 64-bit type arguments caused that to happen in outmacho.c. Hack around it for now; however, realistically speaking the whole bit stealing thing is probably a bad idea, especially since virtually all CPUs handle short immediates better than long ones.
Diffstat (limited to 'nasm.h')
-rw-r--r--nasm.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/nasm.h b/nasm.h
index 9cfd77e..0d514fb 100644
--- a/nasm.h
+++ b/nasm.h
@@ -840,14 +840,15 @@ struct ofmt {
* OUT_RAWDATA, in which case it points to an "uint8_t"
* array.
*/
-#define OUT_RAWDATA (uint64_t)0x0000000000000000
-#define OUT_ADDRESS (uint64_t)0x1000000000000000
-#define OUT_REL2ADR (uint64_t)0x2000000000000000
-#define OUT_REL4ADR (uint64_t)0x3000000000000000
-#define OUT_RESERVE (uint64_t)0x4000000000000000
-#define OUT_REL8ADR (uint64_t)0x5000000000000000
-#define OUT_TYPMASK (uint64_t)0xF000000000000000
-#define OUT_SIZMASK (uint64_t)0x0FFFFFFFFFFFFFFF
+#define OUT_RAWDATA UINT64_C(0x0000000000000000)
+#define OUT_ADDRESS UINT64_C(0x1000000000000000)
+#define OUT_REL2ADR UINT64_C(0x2000000000000000)
+#define OUT_REL4ADR UINT64_C(0x3000000000000000)
+#define OUT_RESERVE UINT64_C(0x4000000000000000)
+#define OUT_REL8ADR UINT64_C(0x5000000000000000)
+#define OUT_TYPMASK UINT64_C(0xF000000000000000)
+#define OUT_SIZMASK UINT64_C(0x0FFFFFFFFFFFFFFF)
+#define OUT_TYPE(x) ((int)((x) >> 60))
/*
* ------------------------------------------------------------