Commit Graph

1278 Commits

Author SHA1 Message Date
H. Peter Anvin
96a6954db4 BR 2017453: indirect jumps in 64-bit mode are implicitly 64 bits
Indirect jumps in 64-bit mode implicitly have 64-bit operand size.
Fix this; the disassembly is still unnecessarily ugly, however.
2008-07-13 15:21:01 -07:00
H. Peter Anvin
570b1c12b6 test: add test of nested %rep, BCD constants, and %warning
Add a test case which has smoked out errors in the handling of nested
%rep, BCD constants, and %warning...
2008-07-13 15:06:55 -07:00
H. Peter Anvin
97b6d5b676 preproc.c: make %warning actually issue a warning...
The calculation of "severity" was buggered up, with the result that
%warning actually issued an error.
2008-07-13 15:05:53 -07:00
H. Peter Anvin
cdc69da37c version.mak for the version Makefile fragment
Be consistent about the naming of the version Makefile fragment.  We
use .mak elsewhere for Makefiles, so use that.
2008-07-13 13:54:47 -07:00
Charles Crayne
a8ef7ab51d Fix Bugs item #2017455 (LTR in long mode)
LTR is valid in long (64-bit) mode, but still uses
16-bit operand, so remove NOLONG restriction.
2008-07-13 12:52:02 -07:00
Charles Crayne
d4200bed8e %EXITREP inside nested %REPs
Apply updated version of fix submitted with feature request 803785.
This fix causes %exitrep to terminate only the innermost %rep block,
and also allows the count for nested blocks to be calculated in the
containing block.
2008-07-12 16:42:33 -07:00
H. Peter Anvin
386866a345 Add version.make to PERLREQ
version.make is produced by a Perl script, and therefore should be in
PERLREQ.
2008-07-05 17:45:01 -07:00
H. Peter Anvin
514c8de2a3 test: simple test of packed BCD. 2008-07-03 20:16:40 -07:00
H. Peter Anvin
63ebf1650c For consistency, allow 0p.. prefix for packed BCD
Allow 0p... to be used as a prefix, for analogy with base conversion.
2008-07-03 20:16:07 -07:00
H. Peter Anvin
45f22924ea float: support packed-BCD constants in 'dt' statements
Support packed-BCD constants in 'dt' statements (and elsewhere 80-bit
floating point is handled), using MASM syntax (terminal 'p').
2008-07-03 20:12:37 -07:00
H. Peter Anvin
5aa689f80d float: fix buffer overrun
Fix a buffer overrun; generally causing hexadecimal constants to be
incorrectly rejected.
2008-07-03 20:11:30 -07:00
H. Peter Anvin
0b826ac316 standard.mac: use anonymous contexts
Use anonymous %push instead of giving a context name.
2008-07-02 18:11:49 -07:00
H. Peter Anvin
11dfa1a5a5 preproc: Allow anonymous contexts
Allow %push and %repl without a context name.  For a lot of uses, it
is only a potential source of namespace pollution.
2008-07-02 18:11:04 -07:00
H. Peter Anvin
accf43334d Permit commas in %strcat 2008-07-01 21:42:08 -07:00
H. Peter Anvin
f26e097304 preproc: %strcat directive to concatenate quoted strings
I noticed there was no sane way to concatenate the contents of quoted
strings, so add the %strcat directive.

These really need to become preprocessor functions at some stage.
2008-07-01 21:26:27 -07:00
H. Peter Anvin
a396a18074 Update the INSTALL file to match current reality 2008-06-28 18:53:55 -07:00
H. Peter Anvin
a50a4449e5 Document case-insensitivity bug. 2008-06-28 18:39:13 -07:00
H. Peter Anvin
a676075b51 test: add a test for %imacro
Add a test for case-insensitive matching of %imacro.
2008-06-28 18:32:16 -07:00
H. Peter Anvin
edc510a115 nasmlib: fix nasm_str[n]icmp()
Fix nasm_str[n]icmp() on platforms which don't have this function
natively.

XXX: Given the new nasm_tolower() implementation, we should consider
if this might actually be a faster function than the platform-native
one.
2008-06-28 18:31:08 -07:00
H. Peter Anvin
538002dc01 preproc: MMacro.finishes is a pointer, not a boolean
MMacro.finishes is a pointer, not a boolean, so set it to "false", not
"NULL".
2008-06-28 18:30:27 -07:00
H. Peter Anvin
f89d681805 AES instructions are WESTMERE, not NEHALEM
Still need to make this crap saner...
2008-06-27 11:41:59 -07:00
H. Peter Anvin
7e50d232ba Make the macros table "unsigned char"
It gets less ugly if we make the macros table "unsigned char".
2008-06-25 14:54:14 -07:00
H. Peter Anvin
7b5aad8498 Run "make alldeps" 2008-06-21 18:19:13 -07:00
H. Peter Anvin
18ed99daea pp_directives_len can be uint8_t
Save a few hundred bytes...
2008-06-21 18:18:41 -07:00
H. Peter Anvin
cda816306d Drop the index tables from the canned macros
Instead of an array of strings, just have a character array; that
reduces the size of canned macros by up to 30%, and we only did
sequential access anyway.
2008-06-21 15:15:40 -07:00
H. Peter Anvin
f221b9ee08 Fix a few more <ctype.h> instances
A few isolated instances of isalpha() and isxdigit().
2008-06-21 11:03:51 -07:00
H. Peter Anvin
bda7a6e371 ctype.h: wrapper ctype functions with a cast to (unsigned char)
ctype functions take an *int*, which the user is expected to have
taken the input character from getc() and friends, or taken a
character and cast it to (unsigned char).

We don't care about EOF (-1), so use macros that cast to (unsigned
char) for us.
2008-06-21 10:23:17 -07:00
H. Peter Anvin
86877b294a preproc: free the include path and the final filename
Memory leaks: free the include path, and the final used filename.
2008-06-20 15:55:45 -07:00
H. Peter Anvin
cfb7176ca2 Move the output format macros into the macros.pl mechanism
Move the handling of "extra" macros (i.e. output format macros) into
the macros.pl mechanism.  This allows us to change the format of the
internal macro store in the future - e.g. to a single byte store
without redundant pointers.

Also, stop using indicies into a long array when there is no good
reason to not just use different arrays.
2008-06-20 15:20:16 -07:00
H. Peter Anvin
76cbaa4b2e raa: clean up indentation
Clean up in indentation in the RAA code.
2008-06-19 23:19:20 -07:00
H. Peter Anvin
3c7e6b396f saa: fix indentation
Apply standard indentation to the SAA code, not sure why it was
different...
2008-06-19 23:09:11 -07:00
H. Peter Anvin
b2a5fda157 Somewhat more clever way to generate the %use guard macros
Automatically generate a %define as the first string in the include
block, and just pick the string out of it from that %define statement
to verify existence.  That way we eliminate any use of toupper() --
all case-insensitivity in NASM uses tolower()/nasm_tolower().
2008-06-19 21:42:42 -07:00
H. Peter Anvin
f4ae5ad11b Protect %use from multi-inclusion and provide a test macro
Automatically provide an include guard for %use packages; the macro
__USE_package__ is automatically defined, and inclusion is suppressed
if it is already defined.
2008-06-19 18:39:24 -07:00
H. Peter Anvin
5f9f4007ff doc: framework for documenting standard macro packages
Add a framework for documenting the standard macro packages.  Also
move the standard macros to the end of the preprocessor section,
instead of having them in the middle of the directives list.
2008-06-19 16:58:05 -07:00
H. Peter Anvin
926fc40b65 %use: call these directives "standard macro packages"
Adopt the term "standard macro packages", "modules" are too
ambiguous.
2008-06-19 16:26:12 -07:00
H. Peter Anvin
435d55b344 macros.pl: need to use $' to get proper left-to-right behaviour
Using ^(.*) means we do right-to-left search, since (.*) is a greedy
expression; instead use $' to get the lead-in part of the string.
2008-06-19 16:17:41 -07:00
H. Peter Anvin
e21ede9c76 macros.pl: remove debug prints; improve compression regex
Remove debug print statements from macros.pl
Make sure we test for whitespace at end of statements
2008-06-19 16:12:20 -07:00
H. Peter Anvin
72edbb87ef macros.c: compress by tokenizing macro directives
Compress macros.c by representing macro directives with a single byte.
We can do this because we only use the ASCII character range inside
the standard macro files.

Note: we could save significant additional space by not having a
pointer array, and instead relying on the fact that we sweep
sequentially through the output array.
2008-06-19 16:00:04 -07:00
H. Peter Anvin
d2456590fc preproc: add support for builtin include modules (%use)
Add a builtin equivalent to the %include directive called %use.
%use includes a standard macro file compiled into the binary; these
come from the macros/ directory in the source code.

The idea here is to be able to provide optional macro packages with
the distribution, without adding complex host filesystem dependencies.
2008-06-19 15:04:18 -07:00
H. Peter Anvin
9dee352dee doc: macroize texi2ipf and ipfc
Macroize the texi2ipf and ipfc commands (used for OS/2).
2008-06-19 11:47:13 -07:00
H. Peter Anvin
eec3b52505 doc: for ps to pdf conversion, use "acrodist", "ps2pdf" or "pstopdf"
For PostScript to PDF conversion, use whichever of "acrodist",
"ps2pdf", or "pstopdf" which we can find on the system.  I haven't
tried either acrodist or pstopdf myself, only going my the
documentation, but prefer acrodist since it is claimed to produce
smaller output files than ps2pdf.
2008-06-19 11:39:23 -07:00
H. Peter Anvin
ca6a242dcd Merge branch 'nasm-2.03.x'
Conflicts:

	Makefile.in
	Mkfiles/msvc.mak
	Mkfiles/netware.mak
	Mkfiles/openwcom.mak
	Mkfiles/owlinux.mak
2008-06-16 21:45:42 -07:00
H. Peter Anvin
07c1468307 doc: add missing nasmdoc.txt target 2008-06-16 21:19:34 -07:00
H. Peter Anvin
96b18600ce NASM 2.03.01 2008-06-16 21:11:59 -07:00
H. Peter Anvin
90c419ac17 Backport the syncfiles script to the nasm-2.03.x branch
This is a maintenance tool only, it doesn't change the code in any
way.  However, it makes it a lot less likely that we'll have a release
go out with a broken Makefile.
2008-06-16 15:55:19 -07:00
H. Peter Anvin
c0d6066d99 syncfiles: use #-- ... --# for consistency with mkdep.pl
mkdep.pl already used #-- ... --# (two dashes) whereas syncfiles.pl
was using #--- ... ---# (three dashes).  Change syncfiles.pl to match
mkdep.pl.
2008-06-15 23:50:50 -07:00
H. Peter Anvin
c5d8030768 syncfiles: terminate directory names at equal signs
In the case where the directory name should be removed (null pathname
separator) don't search backwards past an equal sign, just in case
there isn't a space after the assignment.
2008-06-15 23:43:44 -07:00
H. Peter Anvin
64ca4b6998 Merge branch 'nasm-2.03.x' 2008-06-15 21:51:52 -07:00
H. Peter Anvin
c4f1685736 -F implies -g backported to 2.03.01 2008-06-15 21:51:17 -07:00
H. Peter Anvin
018a6700c4 CHANGES: document backport of -F implies -g 2008-06-15 21:50:41 -07:00