platform/upstream/nasm.git
16 years agoBR 1783117: Document that %+ needs a space after it, and fix crash
H. Peter Anvin [Sun, 23 Sep 2007 00:45:45 +0000 (17:45 -0700)]
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.

16 years agonasm.spec.in: minor fixes
H. Peter Anvin [Sat, 22 Sep 2007 23:44:56 +0000 (16:44 -0700)]
nasm.spec.in: minor fixes

%setup needs -n to deal with the case when nasm_version != _version
There is no standard %make macro, just use "make".

16 years agorelease script: handle stricter CLI parsing for "git tag"
H. Peter Anvin [Sat, 22 Sep 2007 23:38:25 +0000 (16:38 -0700)]
release script: handle stricter CLI parsing for "git tag"

The current version of "git tag" seems to demand that the options
precede arguments; the name is an argument, but the -m option and its
parameter is an option.

16 years agoUpdate nasm.spec.in and make it handle rc releases
H. Peter Anvin [Sat, 22 Sep 2007 23:35:11 +0000 (16:35 -0700)]
Update nasm.spec.in and make it handle rc releases

Update nasm.spec.in to match modern conventions, and make it handle rc
releases by using the "mangled" version of the name (1.99.99.91
instead of 2.0rc1).

16 years agoversion.pl: support version numbers of the form X.Y[.Z]rcW
H. Peter Anvin [Sat, 22 Sep 2007 23:19:19 +0000 (16:19 -0700)]
version.pl: support version numbers of the form X.Y[.Z]rcW

Support version numbers of the form X.Y[.Z]rcW where X, Y, Z and W are
numbers.  For the numeric macros, drop them down to a lower level, so
2.0rc1 is treated as version 1.99.99.91.

16 years agoMerge branch 'master' of git+ssh://ccrayne@repo.or.cz/srv/git/nasm
Charles Crayne [Fri, 21 Sep 2007 04:33:43 +0000 (21:33 -0700)]
Merge branch 'master' of git+ssh://ccrayne@repo.or.cz/srv/git/nasm

16 years ago modified: misc/release to fix bug in removing .git
Charles Crayne [Fri, 21 Sep 2007 04:12:33 +0000 (21:12 -0700)]
modified:   misc/release to fix bug in removing .git

16 years agoMerge branch 'master' of git+ssh://repo.or.cz/srv/git/nasm
H. Peter Anvin [Thu, 20 Sep 2007 04:41:43 +0000 (21:41 -0700)]
Merge branch 'master' of git+ssh://repo.or.cz/srv/git/nasm

16 years agoUpdate manual pages
H. Peter Anvin [Thu, 20 Sep 2007 04:41:27 +0000 (21:41 -0700)]
Update manual pages

Update manual pages to include 64-bit support, and remove section
about sync point limits in ndisasm.

16 years agoRemove limit on number of sync points
H. Peter Anvin [Thu, 20 Sep 2007 04:41:02 +0000 (21:41 -0700)]
Remove limit on number of sync points

Make it possible for ndisasm to allocate more memory for sync points
as needed.

16 years agoMake nasm_malloc() et al available from inside ndisasm
H. Peter Anvin [Thu, 20 Sep 2007 04:40:37 +0000 (21:40 -0700)]
Make nasm_malloc() et al available from inside ndisasm

Clean up nasmlib to remove functions irrelevant for ndisasm; make
nasm_malloc() etc usable inside ndisasm.

16 years agoVersion 0.99.03
Frank Kotler [Thu, 20 Sep 2007 01:07:32 +0000 (21:07 -0400)]
Version 0.99.03

16 years agoMerge branch 'master' of git+ssh://fbkotler@repo.or.cz/srv/git/nasm
Frank Kotler [Thu, 20 Sep 2007 01:06:59 +0000 (21:06 -0400)]
Merge branch 'master' of git+ssh://fbkotler@repo.or.cz/srv/git/nasm

16 years agoMerge commit 'origin/sse5'
H. Peter Anvin [Wed, 19 Sep 2007 23:22:03 +0000 (16:22 -0700)]
Merge commit 'origin/sse5'

16 years agotest/Makefile: make a bit more useful
H. Peter Anvin [Wed, 19 Sep 2007 23:15:22 +0000 (16:15 -0700)]
test/Makefile: make a bit more useful

16 years agoSlightly optimize the interface to nasm_token_hash()
H. Peter Anvin [Wed, 19 Sep 2007 05:54:40 +0000 (22:54 -0700)]
Slightly optimize the interface to nasm_token_hash()

Instead of returning -1 from nasm_token_hash, set tv->t_type to
TOKEN_ID and return TOKEN_ID, since that's what stdscan.c wants to do
with it anyway.  This allows us to simply tailcall nasm_token_hash().

16 years agoMerge branch 'master' of git+ssh://fbkotler@repo.or.cz/srv/git/nasm
Frank Kotler [Wed, 19 Sep 2007 05:34:55 +0000 (01:34 -0400)]
Merge branch 'master' of git+ssh://fbkotler@repo.or.cz/srv/git/nasm

16 years agoMerge commit 'origin/master' into sse5
H. Peter Anvin [Wed, 19 Sep 2007 05:23:42 +0000 (22:23 -0700)]
Merge commit 'origin/master' into sse5

16 years agoelf64: fix 32-bit truncations
H. Peter Anvin [Wed, 19 Sep 2007 05:22:49 +0000 (22:22 -0700)]
elf64: fix 32-bit truncations

Fix 32-bit truncations, as evidenced by the following test program:

    mov rax, 8080808080808080h

16 years agoDocument Infinity and NaN
H. Peter Anvin [Wed, 19 Sep 2007 05:08:04 +0000 (22:08 -0700)]
Document Infinity and NaN

Add __Infinity__, __QNaN__, and __SNaN__ to the documentation.

16 years agoSupport generating NaNs and infinities
H. Peter Anvin [Wed, 19 Sep 2007 04:55:56 +0000 (21:55 -0700)]
Support generating NaNs and infinities

Support generating NaNs and infinities as part of floating-point
constants.

16 years agoUpdate documentation
H. Peter Anvin [Wed, 19 Sep 2007 02:12:26 +0000 (19:12 -0700)]
Update documentation

Document new floating-point capabilities, and clean up the discussion
about BITS 64 and REX prefixes.

16 years agoSimple test for hexadecimal floating-point numbers
H. Peter Anvin [Wed, 19 Sep 2007 01:37:36 +0000 (18:37 -0700)]
Simple test for hexadecimal floating-point numbers

Very trivial test for hexadecimal floating-point numbers

16 years agoFix error-reporting in hexadecimal floating-point numbers
H. Peter Anvin [Wed, 19 Sep 2007 01:33:17 +0000 (18:33 -0700)]
Fix error-reporting in hexadecimal floating-point numbers

16 years agoSupport C99-style hexadecimal floating point.
H. Peter Anvin [Wed, 19 Sep 2007 01:31:26 +0000 (18:31 -0700)]
Support C99-style hexadecimal floating point.

Add support for C99-style hexadecimal floating point.  The format is
0x <hexadecimal mantissa> p <binary exponent>.  0x1.0e+1 thus is the
same as 2.0.

16 years agoUnify all standard IEEE floating-point formats; add 128-bit
H. Peter Anvin [Wed, 19 Sep 2007 00:50:34 +0000 (17:50 -0700)]
Unify all standard IEEE floating-point formats; add 128-bit

Unify all the standard IEEE formats into one function, add support for
IEEE standard 128-bit floating point numbers.

The 80-bit format is still special since it explicitly represents the
integer portion.

16 years agoFix handling of DO; support unary + for floating-point numbers
H. Peter Anvin [Wed, 19 Sep 2007 00:49:09 +0000 (17:49 -0700)]
Fix handling of DO; support unary + for floating-point numbers

Floating-point users generally expect to be able to use a unary plus.
Fix support for the DO instruction in several places.

16 years agoSupport 16-bit IEEE floating point; used in SSE5
H. Peter Anvin [Tue, 18 Sep 2007 23:39:03 +0000 (16:39 -0700)]
Support 16-bit IEEE floating point; used in SSE5

SSE5 supports standard IEEE 16-bit floating point, so we should
support that too.

16 years agoMerge commit 'origin/master' into sse5
H. Peter Anvin [Tue, 18 Sep 2007 22:43:40 +0000 (15:43 -0700)]
Merge commit 'origin/master' into sse5

16 years agoAdd NOP with argument to the instruction list
H. Peter Anvin [Tue, 18 Sep 2007 22:43:08 +0000 (15:43 -0700)]
Add NOP with argument to the instruction list

0F 1F /0 is documented as an EA-taking NOP since the P6.
0F 18..1F + EA are all "hinting nops" (instructions which, when
unimplemented, have no effect rather than #UD) but 0F 1F /0
specifically has no operation whatsoever.

16 years agoRemove 0FC2 from list of instruction prefixes
H. Peter Anvin [Tue, 18 Sep 2007 22:24:38 +0000 (15:24 -0700)]
Remove 0FC2 from list of instruction prefixes

0FC2 is not really an instruction prefix; it's the opcode for
CMPPS/CMPSS, which takes a control immediate which Intel chose to have
opcode aliases for.  However, we can't dispatch on a tail byte, so
it's useless.

16 years agoSpeed up the disassembler by allowing prefixed instruction tables
H. Peter Anvin [Tue, 18 Sep 2007 22:08:20 +0000 (15:08 -0700)]
Speed up the disassembler by allowing prefixed instruction tables

Modify the disassembler so that we can have separate instruction
tables for prefixed instructions.  As it was, all instructions which
started with 0F were linearly searched, and that is by now more than
half the instruction set.

16 years agoDocument oword, do and reso
H. Peter Anvin [Tue, 18 Sep 2007 20:45:12 +0000 (13:45 -0700)]
Document oword, do and reso

Document oword and the associated do and reso pseudoinstructions.

16 years agoImplement "oword" (128 bits) as a first-class size
H. Peter Anvin [Tue, 18 Sep 2007 20:01:32 +0000 (13:01 -0700)]
Implement "oword" (128 bits) as a first-class size

Implement oword, reso, do, as well as the SO flag to instructions.  No
instructions are actually flagged with SO yet, but this allows us to
specify 128-bit sizes in instruction patterns.

16 years agoChange the token prehash function for better convergence
H. Peter Anvin [Tue, 18 Sep 2007 19:38:07 +0000 (12:38 -0700)]
Change the token prehash function for better convergence

Combining arithmetric (add) and bitwise (xor) mixing seems to give
better result than either.

With the new prehash function, we find a valid hash much quicker.

16 years agoSSE5 instruction table
H. Peter Anvin [Tue, 18 Sep 2007 19:23:21 +0000 (12:23 -0700)]
SSE5 instruction table

Implement the full SSE5 instruction table.

16 years agoadd "const" to output/outdbg.c
Frank Kotler [Tue, 18 Sep 2007 06:06:09 +0000 (02:06 -0400)]
add "const" to output/outdbg.c

apparently we missed that when updating "const" in other files

16 years agoDisassembler support for SSE5 instructions
H. Peter Anvin [Tue, 18 Sep 2007 01:45:44 +0000 (18:45 -0700)]
Disassembler support for SSE5 instructions

Support for the SSE5 instruction format in the disassembler.

Also adds some comments to insnsd.c for easier debugging.

16 years agoinsns.dat: All SSE5 instructions are AMD
H. Peter Anvin [Tue, 18 Sep 2007 00:27:46 +0000 (17:27 -0700)]
insns.dat: All SSE5 instructions are AMD

SSE5 is an AMD-defined instruction set, so tag those AMD.

16 years agoActually generate SSE5 instructions
H. Peter Anvin [Tue, 18 Sep 2007 00:25:27 +0000 (17:25 -0700)]
Actually generate SSE5 instructions

This checkin completes what is required to actually generate SSE5
instructions.  No support in the disassembler yet.

This checkin covers:

- Support for actually generating DREX prefixes.
- Support for matching operand "operand X must match Y"

16 years agoInitial support for generating DREX suffixes
H. Peter Anvin [Mon, 17 Sep 2007 23:55:04 +0000 (16:55 -0700)]
Initial support for generating DREX suffixes

Initial support for generating DREX suffixes.  Not used yet.  No
disassembler support yet, and no support for "operand X must match
operand Y."

16 years agoFix a few instances of missing renumbers
H. Peter Anvin [Mon, 17 Sep 2007 23:31:33 +0000 (16:31 -0700)]
Fix a few instances of missing renumbers

parser.c: change hard-coded argument count 3 to MAX_ARGUMENTS
assemble.c: change a few missed code renumbers

16 years agoEnable IF_AR3
H. Peter Anvin [Mon, 17 Sep 2007 23:20:45 +0000 (16:20 -0700)]
Enable IF_AR3

Enable IF_AR3, which was incorrectly disabled in a previous checkin.

16 years agoMerge commit 'origin/master' into sse5
H. Peter Anvin [Mon, 17 Sep 2007 22:49:53 +0000 (15:49 -0700)]
Merge commit 'origin/master' into sse5

16 years agoInitial support for four arguments per instruction
H. Peter Anvin [Mon, 17 Sep 2007 22:49:30 +0000 (15:49 -0700)]
Initial support for four arguments per instruction

For SSE5, we will need to support four arguments per instruction.

16 years agoCLFLUSH: Neither an x64 instruction nor AMD
H. Peter Anvin [Mon, 17 Sep 2007 22:48:32 +0000 (15:48 -0700)]
CLFLUSH: Neither an x64 instruction nor AMD

CLFLUSH was introduced at least in Katmai, if not sooner.  It's
available in all modes.

16 years agoSort dependency lists
H. Peter Anvin [Mon, 17 Sep 2007 20:56:26 +0000 (13:56 -0700)]
Sort dependency lists

Sort the dependency lists generated by "mkdep.pl", to make sure that
re-running "make alldeps" doesn't change anything unless there has
been real dependency changes.  The previous version could produce
different output between runs and across platforms.

16 years agoCleaner way to handle MSVC's _snprintf() underscore damage
H. Peter Anvin [Mon, 17 Sep 2007 20:53:14 +0000 (13:53 -0700)]
Cleaner way to handle MSVC's _snprintf() underscore damage

Some versions of MSVC have snprintf() and vsnprintf() only with a
leading underscore.  Handle that a bit more cleanly.

16 years agotest/r13.asm: test special-casing of rbp and r13 in 64-bit mode
H. Peter Anvin [Mon, 17 Sep 2007 20:19:25 +0000 (13:19 -0700)]
test/r13.asm: test special-casing of rbp and r13 in 64-bit mode

Test that we correctly special-case the modr/m generation for r13 in
64-bit mode.

16 years agoAdditional documentation for 64-bit programming
H. Peter Anvin [Mon, 17 Sep 2007 20:03:33 +0000 (13:03 -0700)]
Additional documentation for 64-bit programming

Flesh out the documentation for 64-bit programming a little bit; in
particular, include links to the ABI documentation for various
platforms.

16 years agoINSTALL: MSVC++ compilation instructions
H. Peter Anvin [Mon, 17 Sep 2007 05:27:07 +0000 (22:27 -0700)]
INSTALL: MSVC++ compilation instructions

Update compilation instructions for MSVC++, and point out that it's
not just Unix systems which can use the GNU instructions -- it also
applies to MacOS X and Windows with either Cygwin or MinGW.

16 years agomake alldeps: change Mkfiles/Makefile.* to Mkfiles/*.mak
H. Peter Anvin [Mon, 17 Sep 2007 05:17:29 +0000 (22:17 -0700)]
make alldeps: change Mkfiles/Makefile.* to Mkfiles/*.mak

The previous checkin switched to the naming scheme *.mak to be able to
be more descriptive.  Thus, change "make alldeps" accordingly.

16 years agoFix Makefile for MSVC++ 2005, delete obsolete Makefiles
H. Peter Anvin [Mon, 17 Sep 2007 05:16:24 +0000 (22:16 -0700)]
Fix Makefile for MSVC++ 2005, delete obsolete Makefiles

New Makefile for MSVC++ 2005, delete old unmaintained Makefiles.

16 years agoMinor fixes needed to compile with MSVC++ 2005
H. Peter Anvin [Mon, 17 Sep 2007 05:14:50 +0000 (22:14 -0700)]
Minor fixes needed to compile with MSVC++ 2005

Minor fixes to make it possible to compile with MS Visual C++ 2005.
Unfortunately, MSVC++ is not fully C99 compliant; in particular, it
doesn't handle interspersed declarations and other code.  Furthermore,
it chokes on some expressions in outelf64.c, which fortunately can be
easily substituted with simpler expressions.

16 years agoRun "make alldeps"
H. Peter Anvin [Mon, 17 Sep 2007 01:35:02 +0000 (18:35 -0700)]
Run "make alldeps"

16 years agoSwitch the preprocessor over to using the hash table library
H. Peter Anvin [Mon, 17 Sep 2007 00:57:25 +0000 (17:57 -0700)]
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.

16 years agoFix the handling of local labels
H. Peter Anvin [Mon, 17 Sep 2007 00:53:17 +0000 (17:53 -0700)]
Fix the handling of local labels

In converting the label system over to the new hash table library,
accidentally broke local labels by prepending the prefix twice.  Fix.

16 years agopreproc.c: remove unnecessary int64_t
H. Peter Anvin [Sat, 15 Sep 2007 01:36:01 +0000 (18:36 -0700)]
preproc.c: remove unnecessary int64_t

We hardly need to support more than 2^31 arguments to a macro.

16 years agoUse the new hash table function library to store labels
H. Peter Anvin [Sat, 15 Sep 2007 01:03:29 +0000 (18:03 -0700)]
Use the new hash table function library to store labels

Use the new hash table function library to store labels.  When
compiling on my 64-bit system, it reduces the assembly time for the
output of test/perf/label.pl from 73 to 7 seconds.

16 years agoDefine a proper hash table library
H. Peter Anvin [Fri, 14 Sep 2007 06:34:21 +0000 (23:34 -0700)]
Define a proper hash table library

Define a proper hash table library, instead of the current ad hoc stuff
used for both labels and macros.  This only implements the actual
library; it is not yet used.

We use a CRC64 as a prehash.  This is almost certainly overkill,
although it is rather efficient (except, arguably, the table lookup)
on 64-bit platforms, and not all that bad on 32-bit platforms.  All we
really need is a function which produces two independent 32-bit
results which are used as the primary and secondary hash
respectively.  Either way, the prehash function is easily replacable
if/when we have a quicker alternative.

16 years agoSimple performance benchmarks: label, macro and token lookups
H. Peter Anvin [Fri, 14 Sep 2007 01:13:20 +0000 (18:13 -0700)]
Simple performance benchmarks: label, macro and token lookups

Simple scripts to generate performance benchmarks for label,
macro and token lookups.  The label and macro lookups are simple
numerical sequences; it may be desirable to add some more
sophisticated algorithms for producing tokens in case we want to
compare different hash functions against each other.

16 years agorelease script: fix final cleanup
H. Peter Anvin [Thu, 13 Sep 2007 19:25:32 +0000 (12:25 -0700)]
release script: fix final cleanup

Make sure we're in the right place for the final cleanup.

16 years agoModify release script for a git-centric world
H. Peter Anvin [Thu, 13 Sep 2007 19:22:00 +0000 (12:22 -0700)]
Modify release script for a git-centric world

Change the release script to use git rather than CVS.
THE BEHAVIOR OF THE SCRIPT HAS CHANGED -- make sure to look at it
before use.

16 years agopptok.c: don't insist on C99 compiler behaviour
H. Peter Anvin [Thu, 13 Sep 2007 18:06:42 +0000 (11:06 -0700)]
pptok.c: don't insist on C99 compiler behaviour

Declarations that are not at the head is C99 behaviour, but it's
rather pointless for this little piece of code.  Fix to work with
older compilers.

16 years agoFix literal F2 and F3 prefixes
H. Peter Anvin [Thu, 13 Sep 2007 05:02:06 +0000 (22:02 -0700)]
Fix literal F2 and F3 prefixes

Correct literal F2 and F3 prefixes and instead use \332 and \333.
Otherwise we get the REX prefixes in the wrong place.

16 years agoAdd (untested!) SSSE3, SSE4.1, SSE4.2 instructions
H. Peter Anvin [Thu, 13 Sep 2007 04:58:51 +0000 (21:58 -0700)]
Add (untested!) SSSE3, SSE4.1, SSE4.2 instructions

Add the SSSE3, SSE4.1 and SSE4.2 instruction sets.  Change \332 to be
a literal 0xF2 prefix, by analog with \333 for 0xF3 prefix (the
previous \332 flag changed to \335).  This is necessary to get the REX
prefix in the right place for instructions that use it.

We are going to have to go in and change existing instruction patterns
which use these, as well.

16 years agoAdd support for Tejas New Instructions (SSSE3)
H. Peter Anvin [Thu, 13 Sep 2007 04:02:30 +0000 (21:02 -0700)]
Add support for Tejas New Instructions (SSSE3)

Add the SSSE3 instruction set.

16 years agoRemove $Id$ tags (useless with git)
H. Peter Anvin [Thu, 13 Sep 2007 03:41:58 +0000 (20:41 -0700)]
Remove $Id$ tags (useless with git)

Remove CVS $Id$ tags, since git doesn't use them.

16 years agoUse rm32 operands for VMREAD/VMWRITE
H. Peter Anvin [Thu, 13 Sep 2007 03:38:21 +0000 (20:38 -0700)]
Use rm32 operands for VMREAD/VMWRITE

Use rm32 instead of coding reg32 and mem32 separately.

16 years agoMacros for SSSE3/SSE4 instruction sets
H. Peter Anvin [Thu, 13 Sep 2007 03:37:32 +0000 (20:37 -0700)]
Macros for SSSE3/SSE4 instruction sets

Add instruction set flags for the SSSE3, SSE4.1 and SSE4.2 instruction
subsets.

16 years agoSupport r/m operands for non-integer types
H. Peter Anvin [Thu, 13 Sep 2007 03:32:39 +0000 (20:32 -0700)]
Support r/m operands for non-integer types

Support r/m operands for non-integer operands types, i.e. mmx or xmm
operands.  This allows mmx and xmm operands to be written more
compactly, speeding up the assembler.

16 years agoUse enumerations where practical to ease debugging
H. Peter Anvin [Thu, 13 Sep 2007 03:27:41 +0000 (20:27 -0700)]
Use enumerations where practical to ease debugging

We have a lot of enumerations; by declaring fields as such, we make it
easier when debugging, since the debugger can display the enumerations
in cleartext.  However, make sure exceptional values (like -1) are
included in the enumeration, since the compiler otherwise may not
include it in the valid range of the enumeration.

16 years agopptok.c: quick-and-dirty downcasing during prehashing
H. Peter Anvin [Wed, 12 Sep 2007 17:02:55 +0000 (17:02 +0000)]
pptok.c: quick-and-dirty downcasing during prehashing

Speed up pptok.c by just doing |= 0x20 instead of calling tolower() for
every character during prehashing.  This is good enough for our needs,
since we don't have any tokens containing the characters @ [ \ ] _ nor
any high-bit characters (in which case we'd have to worry about multibyte
anyway.)

16 years agophash: Tell the user when the graph is OK
H. Peter Anvin [Wed, 12 Sep 2007 16:55:57 +0000 (16:55 +0000)]
phash: Tell the user when the graph is OK

Tell the user when the graph is OK, so that we don't get quite so much of
"a list of errors followed by a long pause."

16 years agopptok.c: handle holes in the pp_directives array
H. Peter Anvin [Wed, 12 Sep 2007 05:18:20 +0000 (05:18 +0000)]
pptok.c: handle holes in the pp_directives array

We need to fail if we land in a hole in the pp_directives array, since
we have a noncontiguous enum preproc_token now.

16 years agopreproc.c: adjust whitespace
H. Peter Anvin [Wed, 12 Sep 2007 04:20:08 +0000 (04:20 +0000)]
preproc.c: adjust whitespace

Be consistent about whitespace.

16 years agoMore automation in the preprocessor conditionals handling
H. Peter Anvin [Wed, 12 Sep 2007 04:18:37 +0000 (04:18 +0000)]
More automation in the preprocessor conditionals handling

Further automate the production of preprocessor conditionals.  Now the
code automatically folds if/elif and the negatives.

16 years agopptok.c: fix spacing
H. Peter Anvin [Wed, 12 Sep 2007 02:13:39 +0000 (02:13 +0000)]
pptok.c: fix spacing

16 years agoGenerate automatically correct tests for %if and %elif
H. Peter Anvin [Wed, 12 Sep 2007 02:12:07 +0000 (02:12 +0000)]
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.

16 years agoRun "make alldeps"; add dependencies missing from the previous checkin
H. Peter Anvin [Wed, 12 Sep 2007 01:34:19 +0000 (01:34 +0000)]
Run "make alldeps"; add dependencies missing from the previous checkin

It helps to run "make alldeps" when the changes are actually complete...

16 years agoUse a perfect hash to look up preprocessor directives
H. Peter Anvin [Wed, 12 Sep 2007 01:29:43 +0000 (01:29 +0000)]
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.

16 years agophash: Be a bit more aggressive about trying to make a small hash
H. Peter Anvin [Wed, 12 Sep 2007 01:27:53 +0000 (01:27 +0000)]
phash: Be a bit more aggressive about trying to make a small hash

Change the threshold to 0.7 instead of 0.8.

16 years agoAdd RCXZ as a known preprocessor condition
H. Peter Anvin [Wed, 12 Sep 2007 00:22:29 +0000 (00:22 +0000)]
Add RCXZ as a known preprocessor condition

16 years agodoc: add some cross-references
H. Peter Anvin [Tue, 11 Sep 2007 23:57:23 +0000 (23:57 +0000)]
doc: add some cross-references

16 years agoFeeble attempt at updating the documentation; remove Appendix B
H. Peter Anvin [Tue, 11 Sep 2007 23:52:01 +0000 (23:52 +0000)]
Feeble attempt at updating the documentation; remove Appendix B

Feeble attempt to document 64-bit support.  Also, remove Appendix B since
we have been utterly useless at keeping it up to date, and it's redundant
with the processor manufacturer's documentation anyway.

16 years agoHandle instructions which can have both REX.W and OSP
H. Peter Anvin [Tue, 11 Sep 2007 22:44:03 +0000 (22:44 +0000)]
Handle instructions which can have both REX.W and OSP

16 years agoUse enums to make debugging easier
H. Peter Anvin [Tue, 11 Sep 2007 22:14:18 +0000 (22:14 +0000)]
Use enums to make debugging easier

When we're dealing with a field which is guaranteed to have an enum type,
then declare it as such so it shows up in debuggers.

16 years agondisasm: handle \366 codes, prefer unprefixed instructions
H. Peter Anvin [Tue, 11 Sep 2007 22:13:17 +0000 (22:13 +0000)]
ndisasm: handle \366 codes, prefer unprefixed instructions

- Implement \366 codes in ndisasm
- Prefer instruction patterns without loose prefixes if possible
- Fix improper initialization of operands in ndisasm

16 years agoSimplify tokens.dat slightly
H. Peter Anvin [Tue, 11 Sep 2007 22:00:34 +0000 (22:00 +0000)]
Simplify tokens.dat slightly

16 years agoQuiet gcc warning about uninitialized variables
H. Peter Anvin [Tue, 11 Sep 2007 04:26:44 +0000 (04:26 +0000)]
Quiet gcc warning about uninitialized variables

16 years agoMake the big instruction arrays "const"
H. Peter Anvin [Tue, 11 Sep 2007 04:16:57 +0000 (04:16 +0000)]
Make the big instruction arrays "const"

Make the big instruction arrays "const", so they end up in readonly
storage.  While we're at it, move their prototypes into insns.h.

16 years agoUse an actual enum for the opcode
H. Peter Anvin [Mon, 10 Sep 2007 23:32:05 +0000 (23:32 +0000)]
Use an actual enum for the opcode

Use an actual named enum for the opcode, that way it shows up in
cleartext while debugging.

16 years agoFix order of token arguments
H. Peter Anvin [Mon, 10 Sep 2007 23:30:21 +0000 (23:30 +0000)]
Fix order of token arguments

Order of token arguments was reversed, but tokens.dat wasn't updated
accordingly.  Fix.

16 years agoassemble.c: correct special handing of ESP/RSP
H. Peter Anvin [Mon, 10 Sep 2007 18:59:26 +0000 (18:59 +0000)]
assemble.c: correct special handing of ESP/RSP

Correct the special handling of ESP/RSP (must be in the base register
slot, but requires SIB.)

16 years agotokhash: correct duplicate-token test
H. Peter Anvin [Mon, 10 Sep 2007 18:59:01 +0000 (18:59 +0000)]
tokhash: correct duplicate-token test

16 years agotokhash: adjust table types to reduce size
H. Peter Anvin [Mon, 10 Sep 2007 18:58:40 +0000 (18:58 +0000)]
tokhash: adjust table types to reduce size

Adjust the sizes of data types to reduce the total size of the tokhash
data structure.

16 years agoFix the MMXREG and XMMREG flags definitions.
H. Peter Anvin [Mon, 10 Sep 2007 18:55:52 +0000 (18:55 +0000)]
Fix the MMXREG and XMMREG flags definitions.

16 years agonasm.spec.in: Copyright -> License
H. Peter Anvin [Wed, 5 Sep 2007 06:48:38 +0000 (06:48 +0000)]
nasm.spec.in: Copyright -> License

16 years agoFix "make tar"; useful for RPM testing
H. Peter Anvin [Wed, 5 Sep 2007 06:40:51 +0000 (06:40 +0000)]
Fix "make tar"; useful for RPM testing

16 years agoRemove obsolete Serial: construct; we shouldn't need it anyway.
H. Peter Anvin [Wed, 5 Sep 2007 06:24:43 +0000 (06:24 +0000)]
Remove obsolete Serial: construct; we shouldn't need it anyway.