H. Peter Anvin
d85d250fa2
First cut at AVX machinery.
...
First cut at AVX machinery support. The only instruction implemented
is VPERMIL2PS, and it's probably buggy. I'm checking this in with the
hope that other people can start helping out with (a) testing this,
and (b) adding instructions.
NDISASM support is not there yet.
2008-05-04 17:53:31 -07:00
H. Peter Anvin
134b94665d
Add %ifempty and variants
2008-02-16 17:01:40 -08:00
H. Peter Anvin
cbf768d67d
Implement %iftoken, test for a single token
...
Implement %iftoken, a test for a single token. This is useful in
cases using %+ to splice a macro-provided token.
2008-02-16 16:41:25 -08:00
H. Peter Anvin
188ce76c46
Constipate the stdmac[] array.
2008-02-16 13:58:45 -08:00
H. Peter Anvin
927c92b478
BR 1582430: Allow numbers with leading + or - for %ifnum
...
Allow numbers with a leading + or - to return true for %ifnum.
2008-02-16 13:44:52 -08:00
H. Peter Anvin
b4daadc0d8
preproc.c: simplify detoken() slightly
...
Probably pointless optimization of detoken()...
2008-01-21 16:31:57 -08:00
Beroset
095e6a2973
regularized spelling of license to match name of LICENSE file
2007-12-29 09:44:23 -05:00
H. Peter Anvin
7061ad73fe
BR 852464: Fix memory leak in %if/%elseif
2007-11-26 22:03:53 -08:00
H. Peter Anvin
2a15e69ebe
Slightly faster implementation of the deadman counter
...
Count down to zero instead of up to a constant...
2007-11-19 13:14:59 -08:00
H. Peter Anvin
cb1cf59312
BR 812417: Deadman counter for macro expansion
...
Per BR 812417, certain macro expansions can hang NASM. Allow a
deadman counter (currently set to 2^20) to fail out if it gets
ridiculous.
2007-11-19 12:26:50 -08:00
Charles Crayne
7eaf919a22
Add flat64 to %stacksize choices
2007-11-08 22:11:14 -08:00
H. Peter Anvin
8781cb0d00
BR 1828103: Fix %arg and %local
...
Correct the implementation of %arg and %local.
It's questionable how much they make sense for 64-bit mode; even in
32-bit mode one normally make references off the stack pointer instead
of the base pointer (frame pointer), but that requires keeping track
of the stack pointer offset.
2007-11-08 20:01:11 -08:00
H. Peter Anvin
c2df282092
Fix the handling of floating-point tokens in the preprocessor
...
Correct the handling of floating-point tokens in the preprocessor.
The preprocessor scanner and the main scanner really are painfully
divergent for no good reason.
2007-10-24 15:29:51 -07:00
H. Peter Anvin
7065309739
Formatting: kill off "stealth whitespace"
...
"Stealth whitespace" makes it harder to read diffs, and just generally
cause unwanted weirdness. Do a source-wide pass to get rid of it.
2007-10-19 14:42:29 -07:00
Charles Crayne
192d5b5e9c
Suppress a few signedness warnings
2007-10-18 19:02:42 -07:00
Keith Kanios
a5fc6467ab
Fix 32-bit types in preproc.c and eval.c
...
Fix 32-bit types in preproc.c and eval.c that should have been 64-bit
types. This allows %assign to work correctly with 64-bit integers.
2007-10-13 07:09:22 -07:00
H. Peter Anvin
4db5a16128
preproc.c: move smacro define/undef to separate functions
...
Instead of tons of replicated code, move smacro define/undef into
separate static functions.
2007-10-11 13:42:09 -07:00
H. Peter Anvin
95e7f957f2
preproc.c: PP_DEFINE and PP_XDEFINE are case-sensitive
...
The statement for case-sensitivity had PP_DEFINE and PP_IXDEFINE,
rather than PP_XDEFINE.
2007-10-11 13:38:38 -07:00
H. Peter Anvin
4bc9f1de73
preproc.c: normalize the handling of case sensitivity
...
Fix a bug relating to case sensitivity, and make remaining code more
similar.
2007-10-11 12:52:03 -07:00
H. Peter Anvin
f8ba53eb2a
preproc.c: allow 64-bit repeat counts
...
Allow the count of %rep to exceed 2^31.
2007-10-11 10:11:57 -07:00
H. Peter Anvin
16ed438e71
preproc.c: For an SMacro, in_progress really is a boolean (no %rep)
2007-10-11 10:06:19 -07:00
H. Peter Anvin
70055964fc
Additional uses of bool and enum
...
Proper use of bool and enum makes code easier to debug. Do more of
it. In particular, we really should stomp out any residual uses of
magic constants that aren't enums or, in some cases, even #defines.
2007-10-11 00:05:57 -07:00
H. Peter Anvin
54901e1785
preproc.c: MMacro.in_progress is not a boolean
...
Per the comment:
* In a MMacro describing a `%rep' block, the `in_progress' field
* isn't merely boolean, but gives the number of repeats left to
* run.
This fixes the "global" directive not getting recognized, since it
repeats over all its arguments.
2007-10-11 00:05:57 -07:00
H. Peter Anvin
6867acc18e
Use the compiler-provided booleans if available, otherwise emulate
...
Both C and C++ have "bool", "true" and "false" in lower case; C
requires <stdbool.h> for this, in C++ it is an inherent type built
into the compiler. Use those instead of the old macros; emulate with
a simple typedef enum if unavailable.
2007-10-10 14:58:45 -07:00
H. Peter Anvin
476d2864b0
preproc.c: constipation
...
Add "const" in suitable places
2007-10-02 22:04:15 -07:00
H. Peter Anvin
fe501957c0
Portability fixes
...
Concentrate compiler dependencies to compiler.h; make sure compiler.h
is included first in every .c file (since some prototypes may depend
on the presence of feature request macros.)
Actually use the conditional inclusion of various functions (totally
broken in previous releases.)
2007-10-02 21:53:51 -07:00
H. Peter Anvin
e373efdab5
preproc.c: fix the loop in %undef
...
The parent-pointer-based freeing loop in %undef should not advance the
parent pointer when a node is freed, since that will result accessing
freed memory.
2007-09-24 21:33:17 -07:00
H. Peter Anvin
37a321fbbe
Implement the -MG option (SF RFE 1564264)
...
Implement the -MG option, to generate dependencies in the presence of
generated files. In the end, we probably need to support the full
gamut of GCC-like dependency-generation options.
2007-09-24 13:41:58 -07:00
H. Peter Anvin
25a993488c
BR 1783117: Document that %+ needs a space after it, and fix crash
...
Document that %+ needs a space after it due to collision with %+1
syntax for multiline macro arguments; make it issue an error message
rather than crashing.
2007-09-22 17:45:45 -07:00
H. Peter Anvin
97a234782d
Switch the preprocessor over to using the hash table library
...
Switch the preprocessor over to using the hash table library. On my
system, this improves the runtime of the output of test/pref/macro.pl
from over 600 seconds to 7 seconds.
Macros have an odd mix of case-sensitive and case-insensitive
behaviour, plus there are matching parameters for arguments, etc. As
a result, we use case-insensitive hash tables and use a linked list to
store all the possible isomorphs.
2007-09-16 18:04:57 -07:00
H. Peter Anvin
8cfdb9d185
preproc.c: remove unnecessary int64_t
...
We hardly need to support more than 2^31 arguments to a macro.
2007-09-14 18:36:01 -07:00
H. Peter Anvin
95e28828ab
preproc.c: adjust whitespace
...
Be consistent about whitespace.
2007-09-12 04:20:08 +00:00
H. Peter Anvin
da10e7b85e
More automation in the preprocessor conditionals handling
...
Further automate the production of preprocessor conditionals. Now the
code automatically folds if/elif and the negatives.
2007-09-12 04:18:37 +00:00
H. Peter Anvin
9bf0aa7c52
Generate automatically correct tests for %if and %elif
...
Automatically generate macros to test for %if and %elif variants, which
are guaranteed to be correct across future changes.
2007-09-12 02:12:07 +00:00
H. Peter Anvin
4169a47bd9
Use a perfect hash to look up preprocessor directives
...
Use a perfect hash to look up preprocessor directives, and generate
the preprocessor directive list automatically.
2007-09-12 01:29:43 +00:00
H. Peter Anvin
ce9be34d3d
Add RCXZ as a known preprocessor condition
2007-09-12 00:22:29 +00:00
Chuck Crayne
60ae75d3ab
Add %IFN and %ELIFN as per RFE #786286
2007-05-02 01:59:16 +00:00
Keith Kanios
93f2e9a5a1
c99 printf/fprintf compliance.
2007-04-14 00:10:59 +00:00
Keith Kanios
a6dfa78b78
Fixed distinction between char and int8_t data types.
2007-04-13 16:47:53 +00:00
Keith Kanios
b7a89544d0
General push for x86-64 support, dubbed 0.99.00.
2007-04-12 02:40:54 +00:00
H. Peter Anvin
e2c80181b6
Apply Nindent to all .c and .h files
2005-01-15 22:15:51 +00:00
Ed Beroset
3ef4e4da04
changed last sprintf to more secure snprintf to prevent vulnerability to buffer
...
overflow exploits.
2004-12-15 18:30:54 +00:00
Ed Beroset
19f927ac64
cleaned up most but not all sprintf() and vsprintf() calls to avoid
...
vulnerability to buffer overflow exploits.
2004-12-15 17:07:03 +00:00
Ed Beroset
ec2e10cfea
replaced vsprintf() with vsnprintf() to avoid buffer overflow exploit
2004-12-15 16:45:46 +00:00
Nickolay Yurchenko
f7956c4072
For compatibility with older code removed feature:
...
* Unterminated string auto termination.
2003-09-26 19:03:40 +00:00
Nickolay Yurchenko
f3b3ce27bd
* Unterminated string auto termination.
...
* %(el)if(n)idn insensitivity to string quotes difference (#809300 ).
2003-09-21 20:38:43 +00:00
Nickolay Yurchenko
9aea715998
* Fix for %rep with no arguments ( #560568 )
...
* Fix concatenation of preprocessor function call (#794686 )
2003-09-07 22:46:26 +00:00
Frank Kotler
d0ed6fd30d
Alexei's patch to allow "-I" paths to be searched for "incbin"ed files
2003-08-27 11:33:56 +00:00
Frank Kotler
7fd4f00930
Remove "backslash()"
2003-08-06 07:10:16 +00:00
Frank Kotler
d352302111
apply dborca's patch - make the "-U" switch work - finally!
2003-06-14 12:12:26 +00:00
H. Peter Anvin
bfebdb0a07
"const"-ipation fixes from Trevor Woerner
2002-09-12 02:23:54 +00:00
Ed Beroset
3ab3f41305
fixed multiple %ROTATE bugs (numbers 560567 and 560930) and changed
...
return value of do_directive from meaningless numbers to #defined values.
2002-06-11 03:31:49 +00:00
H. Peter Anvin
7cf897e7ae
Correctly recognize $$ as TOKEN_BASE
2002-05-30 21:30:33 +00:00
H. Peter Anvin
0c60815d91
Undo broken %elif change, and put in a big comment explaining why the
...
existing code is correct.
2002-05-22 22:59:40 +00:00
Ed Beroset
168c9c0c43
Fixed bug 556600 in which an unterminated macro error never included a file
...
name or line number.
2002-05-17 03:10:13 +00:00
H. Peter Anvin
0a7a3b459c
Change "const static" -> "static const" to keep gcc happy
2002-05-14 23:54:46 +00:00
H. Peter Anvin
310b3e165f
Code cleanup fixes from Ed Beroset
2002-05-14 22:38:55 +00:00
H. Peter Anvin
99941bf067
Change __error (reserved namespace) to _error (normal namespace)
2002-05-14 17:44:03 +00:00
H. Peter Anvin
77ba0c6f98
Fix from Ed Beroset for unterminated %macro directive -> coredump
2002-05-14 03:18:53 +00:00
H. Peter Anvin
6574726f21
Add %ifmacro and friends, and fix two minor bugs:
...
a) The argument to %elif* is handled different than the one to %if*
b) Incorrect error messages for the %ifdef variants
2002-05-07 00:10:05 +00:00
H. Peter Anvin
9a633fa3b9
NASM 0.98.25alt
2002-04-30 21:08:11 +00:00
H. Peter Anvin
9f39464e5b
NASM 0.98.25
2002-04-30 21:07:51 +00:00
H. Peter Anvin
dce1e2f795
NASM 0.98.23
2002-04-30 21:06:37 +00:00
H. Peter Anvin
9eb185bfdb
NASM 0.98.15
2002-04-30 21:02:47 +00:00
H. Peter Anvin
ce61607e11
NASM 0.98.14
2002-04-30 21:02:23 +00:00
H. Peter Anvin
788e6c10e1
NASM 0.98.12
2002-04-30 21:02:01 +00:00
H. Peter Anvin
734b188090
NASM 0.98.09
2002-04-30 21:01:08 +00:00
H. Peter Anvin
1cd0e2d5bf
NASM 0.98.08
2002-04-30 21:00:33 +00:00
H. Peter Anvin
af535c16cf
NASM 0.98.03
2002-04-30 20:59:21 +00:00
H. Peter Anvin
ef7468f4ec
NASM 0.98p7
2002-04-30 20:57:59 +00:00
H. Peter Anvin
620515ab4e
NASM 0.98p6
2002-04-30 20:57:38 +00:00
H. Peter Anvin
4836e3374e
NASM 0.98p3.5
2002-04-30 20:56:43 +00:00
H. Peter Anvin
b64535fd4e
NASM 0.98p3.3
2002-04-30 20:55:37 +00:00
H. Peter Anvin
eba20a73f2
NASM 0.98p3
2002-04-30 20:53:55 +00:00
H. Peter Anvin
87bc61964c
NASM 0.97
2002-04-30 20:53:16 +00:00
H. Peter Anvin
76690a12ad
NASM 0.96
2002-04-30 20:52:49 +00:00
H. Peter Anvin
6768eb71d8
NASM 0.95
2002-04-30 20:52:26 +00:00
H. Peter Anvin
d7ed89eac9
NASM 0.94
2002-04-30 20:52:08 +00:00