summaryrefslogtreecommitdiff
path: root/asm/tokens.dat
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2019-09-23 16:40:03 -0700
committerH. Peter Anvin <hpa@zytor.com>2019-09-23 16:40:03 -0700
commit8571f06061b47471a340e350fdfcd804098637d6 (patch)
treec255ed0e90a4b716e98d6c9b7635bb88b482e212 /asm/tokens.dat
parentf7dbdb2e136db99051b14403a0f29c5155bbf7d8 (diff)
downloadnasm-8571f06061b47471a340e350fdfcd804098637d6.tar.gz
preprocessor: major cleanups; inline text into Tokenpp-inline
Major cleanups of the preprocessor. In particular, the block-allocation of Token is pretty ridiculous since nearly every token requires a text allocation anyway. Change the definition of Token so that only very long tokens (48+ characters on 64-bit systems) need to be stored out of line. If malloc() preserves alignment (XXX: glibc doesn't) then this means that each Token will fit in a cache line. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'asm/tokens.dat')
-rw-r--r--asm/tokens.dat46
1 files changed, 44 insertions, 2 deletions
diff --git a/asm/tokens.dat b/asm/tokens.dat
index ad26420d..81875f0e 100644
--- a/asm/tokens.dat
+++ b/asm/tokens.dat
@@ -1,5 +1,5 @@
## --------------------------------------------------------------------------
-##
+##
## Copyright 1996-2016 The NASM Authors - All Rights Reserved
## See the file AUTHORS included with the NASM distribution for
## the specific copyright holders.
@@ -14,7 +14,7 @@
## copyright notice, this list of conditions and the following
## disclaimer in the documentation and/or other materials provided
## with the distribution.
-##
+##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
## CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
## INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
@@ -149,3 +149,45 @@ z
evex
vex3
vex2
+
+# Multi-character operators. Used in ppscan().
+% TOKEN_SHR, 0, 0, 0
+>>
+
+% TOKEN_SAR, 0, 0, 0
+>>>
+
+% TOKEN_SHL, 0, 0, 0
+<<
+<<<
+
+% TOKEN_SDIV, 0, 0, 0
+//
+
+% TOKEN_SMOD, 0, 0, 0
+%%
+
+% TOKEN_EQ, 0, 0, 0
+==
+
+% TOKEN_NE, 0, 0, 0
+!=
+<>
+
+% TOKEN_LE, 0, 0, 0
+<=
+
+% TOKEN_GE, 0, 0, 0
+>=
+
+% TOKEN_LEG, 0, 0, 0
+<=>
+
+% TOKEN_DBL_AND, 0, 0, 0
+&&
+
+% TOKEN_DBL_OR, 0, 0, 0
+||
+
+% TOKEN_DBL_XOR, 0, 0, 0
+^^