summaryrefslogtreecommitdiff
path: root/eval.c
Commit message (Collapse)AuthorAgeFilesLines
* eval: rexp3 should operate with 64bit numbersCyrill Gorcunov2010-11-201-1/+1
| | | | | | | | | | | reloc_value returns 64bit numbers but we strip it down to 'int' which causes problems if the former value is big enough to overflow 'int'. Fix it. [ BR3104312 ] Reported-by: Christian Masloch Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* Various tab/space/comment cleanupCyrill Gorcunov2009-10-311-52/+51
| | | | | | No change on binary level Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* NASM: relicense under the 2-clause BSD licenseH. Peter Anvin2009-07-061-12/+0
| | | | | | | | *To the best of my knowledge*, we now have authorization from everyone who has significantly contributed to NASM in the past. As such, change the license to the 2-clause BSD license. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add copyright headers to the *.c/*.h files in the main directoryH. Peter Anvin2009-06-281-6/+45
| | | | | | | | | | Add copyright headers to the *.c/*.h files in the main directory. For files where I'm sure enough that we have all the approvals, I have given them the 2-BSD license, the others have been given the "LGPL for now" license header. Most of them can probably be changed after auditing. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* fix unitialized variable in eval_strfuncVictor van den Elzen2008-07-161-0/+1
|
* Support __utf16__ and __utf32__ in an expression contextH. Peter Anvin2008-06-141-0/+45
| | | | Support __utf16__ and __utf32__ in expression contexts.
* Make strings a first-class token type; defer evaluationH. Peter Anvin2008-06-091-0/+9
| | | | | | | Make strings a proper, first-class token type, instead of relying on the "TOKEN_NUM with tv_charptr" hack. Only convert a string to a number if requested in an expression context; this also makes it possible to actually issue a warning when it overflows.
* Display fully qualified local label in "not defined" messageCharles Crayne2008-03-121-4/+6
| | | | | | | Add new function "local_scope" to label subsystem to return the previous non-local label for a given local label, and invoke this funcion in eval.c to display the fully qualified name in the "not defined" error message.
* regularized spelling of license to match name of LICENSE fileBeroset2007-12-291-1/+1
|
* Upgrade label functions to 64-bitCharles Crayne2007-11-051-1/+2
|
* Permit opcode names as labels as long as they are followed by a colonH. Peter Anvin2007-11-041-2/+5
| | | | | | | | Permit opcode names to be used as labels if and only if they are succeeded by a colon. Opcode names occurring when parsing expressions are all treated as labels; a leading colon occurred when parsing an instruction forces a parser restart with the instruction forcibly treated as an identifier.
* Use a 32-bit floating-point limb size; support 8-bit floatH. Peter Anvin2007-10-291-0/+1
| | | | | | | | | | Use a 32-bit limb size ("like a digit, but bigger") for floating-point conversion. This cuts the number of multiplications per constant by a factor of four. This means supporting fractional-limb-sized numbers, so while we're at it, add support for 8-bit floating point numbers (apparently used in graphics and in audio compression applications.)
* Formatting: kill off "stealth whitespace"H. Peter Anvin2007-10-191-1/+1
| | | | | "Stealth whitespace" makes it harder to read diffs, and just generally cause unwanted weirdness. Do a source-wide pass to get rid of it.
* Fix 32-bit types in preproc.c and eval.cKeith Kanios2007-10-131-16/+16
| | | | | 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.
* Use the compiler-provided booleans if available, otherwise emulateH. Peter Anvin2007-10-101-9/+9
| | | | | | | 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.
* Change cloc_t to struct location, and reorder the membersH. Peter Anvin2007-10-031-2/+2
| | | | | | Change cloc_t to struct location, and reorder the members so that it should fit in 16 bytes instead of needing 8 bytes of extra padding on 64-bit machines.
* BR 1352920: change loc_t -> cloc_tH. Peter Anvin2007-10-031-2/+2
| | | | | | Change loc_t to cloc_t to avoid AIX conflict. We really shouldn't use _t names at all; they are usually considered platform types, but worry about that later.
* Portability fixesH. Peter Anvin2007-10-021-0/+2
| | | | | | | | | 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.)
* Support __float*__ for floating-point numbers in expressionsH. Peter Anvin2007-09-241-0/+59
| | | | | | | | | Add special operators to allow the use of floating-point constants in contexts other than DW/DD/DQ/DT/DO. As part of this checkin, make MAX_KEYWORD generated by tokhash.pl, since it knows what all the keywords are so it can tell which one is the longest.
* eval.c: replace sequence of ifs with switchH. Peter Anvin2007-09-241-9/+21
| | | | Replace a sequence of "if" statements with a switch.
* Allow '!' to be used in expressions with same meaning as in C.Chuck Crayne2007-05-021-0/+13
|
* General push for x86-64 support, dubbed 0.99.00.Keith Kanios2007-04-121-25/+26
|
* Apply Nindent to all .c and .h filesnasm-0.98.39LATESTH. Peter Anvin2005-01-151-501/+478
|
* Correct handling of SEG <nonsegment>; per BR 560575H. Peter Anvin2002-05-271-0/+2
|
* Handle $ and $$ in ABSOLUTE sectionsH. Peter Anvin2002-05-261-3/+7
|
* NASM 0.98.03nasm-0.98.03H. Peter Anvin2002-04-301-2/+2
|
* NASM 0.98p3.2nasm-0.98p3.2H. Peter Anvin2002-04-301-19/+10
|
* NASM 0.98p3nasm-0.98p3H. Peter Anvin2002-04-301-87/+154
|
* NASM 0.96nasm-0.96H. Peter Anvin2002-04-301-0/+761