Commit Graph

1060 Commits

Author SHA1 Message Date
H. Peter Anvin
ee7fc29a30 Add support for ymm0 in instructions
Make it possible to use ymm0 as a fixed operand in instructions
2008-05-20 16:47:12 -07:00
H. Peter Anvin
711b0c1e39 phash: cut random vector set down a bit
Reduce the size of the random vector set somewhat
2008-05-20 16:46:36 -07:00
H. Peter Anvin
3be5d85913 No 32-byte floating point format: fix error for DY
Output a more legible error message for floating-point with "DY".
2008-05-20 14:49:32 -07:00
H. Peter Anvin
0c648204e2 openwcom.mak: wmake uses & for continuation, not \ (sigh)
wmake uses & for continuation, since \ is used for pathname
separators.
2008-05-20 14:42:53 -07:00
H. Peter Anvin
d1dab0f720 Readability improvements for regdis.c 2008-05-20 14:39:36 -07:00
H. Peter Anvin
f176537c1b netware.mak: correct dependencies
The Makefile uses VPATH and stripped directory names for files, so
generate the dependencies accordingly.
2008-05-20 14:35:34 -07:00
H. Peter Anvin
9726b1e971 rdx: Add cast avoid warning from gcc
Avoid a warning from gcc about casting an integer of different size to
a pointer.
2008-05-20 14:25:36 -07:00
H. Peter Anvin
a4835d466c Avoid #including .c files; instead compile as separate units
Don't #include .c files, even if they are auto-generated; instead
compile them as separate compilation units and let the linker do its
job.
2008-05-20 14:21:29 -07:00
H. Peter Anvin
73252a92ae PTEST is SSE4.1; although AMD says it's SSE5.
Fix this when we have proper support for feature sets, or forget about
the concept entirely.
2008-05-20 13:07:09 -07:00
H. Peter Anvin
b726b04813 insns.pl: don't require whitespace before / or \
Use Perl's context-sensitive regular expressions to tell split that a
slash or backslash begins a new operator.
2008-05-20 13:03:39 -07:00
H. Peter Anvin
930d655916 nasm.h: remove obsolete IP_REG definitions 2008-05-20 11:47:01 -07:00
H. Peter Anvin
dfb918047b Add DY, YWORD, and the SY instruction flag
Add the DY instruction, YWORD keyword, and an SY marker for
instruction sizes.  Add a few more AVX sample instructions.
2008-05-20 11:43:53 -07:00
H. Peter Anvin
70a13f5a37 insns.pl: support operands that serve double duty
Sometimes assembly syntax wants to permit a single operand to serve
multiple functions; allow this.

The disassembler could really use to be smarter about those.
2008-05-20 11:23:18 -07:00
H. Peter Anvin
d82dd4f1a3 insns.dat: no subheader for "must be last" 2008-05-20 11:05:59 -07:00
H. Peter Anvin
1e5203872d insns.dat: make even wider to make space for AVX
The AVX instructions take more space, so add a few tab stops across
the entire file.
2008-05-20 11:04:26 -07:00
H. Peter Anvin
8597e6900c insns.dat: use compiler-generated bytecodes for AVX
Use compiler-generated bytecodes for the AVX instruction demos.  This
should make it a lot easier for other people (HINT, HINT) to add the
instruction table.
2008-05-20 11:01:28 -07:00
H. Peter Anvin
0fc86cca1f insns.pl: fix regex subgroup of /is4= codes
The argument is now $1, not $2...
2008-05-20 10:48:22 -07:00
H. Peter Anvin
8491986e69 insns.pl: fix splitting of bracketted operations 2008-05-20 10:39:15 -07:00
H. Peter Anvin
0686131bbe Opcode listing notation is /is4, consistently 2008-05-20 10:29:11 -07:00
H. Peter Anvin
2812ff5181 Use the \360..\363 annotations for SSE prefixes 2008-05-20 10:21:57 -07:00
H. Peter Anvin
fff5a47e65 Same some space by introducing shorthand byte codes for SSE prefixes
Properly done, all SSE instructions which has the 66/F2/F3 opcode
multiplex need two prefixes: one to control the use of OSP and one to
control the use of REP.  However, it's a four-way select: np/66/F2/F3;
so introduce shorthand bytecodes for that purpose.
2008-05-20 09:46:24 -07:00
H. Peter Anvin
24860b0f0e Allow explicit immediate syntax for imz2 as well as is4
imz2 is just an alias for is4 as far as we are concerned...
2008-05-20 09:36:41 -07:00
H. Peter Anvin
e6fb38b9f2 insns.pl: escape literal special character in regex
In Perl code, it is good practice to escape special characters
intended to be literal.
2008-05-19 21:10:14 -07:00
H. Peter Anvin
7a4928f484 Bytecode compiler: add support for is4/imz2 operands 2008-05-19 21:07:48 -07:00
H. Peter Anvin
dfa2a842bd More work on bytecode compiler (not finished yet...)
More work on the bytecode compiler.  Not all useful bytecodes are
implemented yet, however.
2008-05-19 19:08:03 -07:00
H. Peter Anvin
4f0a3e64ee insns.pl: first steps toward a "smart" bytecode compiler
First steps toward a smart(er) bytecode compiler, using a syntax that
can be more directly taken from the manuals.
2008-05-19 18:19:42 -07:00
H. Peter Anvin
2c94c44f35 Make insnsb.c an actual compilation unit
"make alldeps" doesn't really like it when included files end in *.c.
Instead of renaming insnsb.c to insnsb.h, make it an actual
compilation unit, since there really isn't any reason for it not to
be.
2008-05-13 14:29:47 -07:00
H. Peter Anvin
0a4d23219e insnsb.c: use 5 digits for index, not 4
We already have indexes up to 9500, so use 5 digits instead of 4.
2008-05-12 15:28:33 -07:00
H. Peter Anvin
ff3b57c253 Make MAX_OPERANDS a parameter in insns.pl as well
MAX_OPERANDS is present in insns.pl as well (although proper C
compilers shouldn't need this kind of zero padding.)  Make sure it's
clear to everyone.
2008-05-12 11:36:24 -07:00
H. Peter Anvin
aaa088fbf3 Remove special hacks to avoid zero bytecodes
We can now have zero bytecodes with impunity, so remove any special
hacks we had to avoid zeroes in the bytecode.
2008-05-12 11:13:41 -07:00
H. Peter Anvin
3720f7beae Generate a byte array instead of using strings for the byte codes
Generate a byte array instead of using C compiler strings for the byte
codes.  This has a few advantages:

- No need to special-case zero due to broken C compilers.
- Only insns.pl only ever reads the string, so we can invent our own
  syntax.
- Compaction.
- We can give it the proper, unsigned type.
2008-05-12 11:00:50 -07:00
H. Peter Anvin
387c1c2714 Factor out string decoder in insns.pl
Factor out the string decoder into its own subroutine.  This will be
useful shortly ;)
2008-05-12 10:17:27 -07:00
H. Peter Anvin
d58656f797 Add support for register-number immediates with fixed 4-bit values
Add support for imm8 bytes which has a register value in the top four
bits and an arbitrary fixed value in the bottom four bits.
2008-05-06 20:11:14 -07:00
H. Peter Anvin
e303936391 Fix encoding of VPERMIL2PS instructions 2008-05-06 20:06:14 -07:00
H. Peter Anvin
4e0fd9fb63 Actually spell "Sandy Bridge" correctly 2008-05-06 19:58:52 -07:00
H. Peter Anvin
42a8caecb5 Sandy Bridge, not Sandy Banks; add Westmere 2008-05-06 19:54:28 -07:00
H. Peter Anvin
7334e3ac23 Initial NDISASM support for AVX instructions/VEX prefixes
Initial NDISASM support for AVX instructions and VEX prefixes.  It
doesn't mean it's correct, but it seems to match my current
understanding.  It can disassemble *some*, but not *all*, of the AVX
test cases (which are known to be at least partially incorrect...)
2008-05-05 18:47:27 -07:00
H. Peter Anvin
4d2c38ce75 The AVX R,X,B, and V fields (but not W) are inverted.
The AVX test cases are still not generated correctly, though.
2008-05-04 23:15:13 -07:00
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
7117e80702 Initial support for YMM (AVX) registers
Add support for ymm0..15 registers, and the "ymmreg" qualifier.
No support yet for "yword" or "dy".
2008-04-21 22:44:55 -04:00
Charles Crayne
a762ca544b Avoid long line warning when generating nasm docs
rdsrc.pl limits lines to 68 characters for some formats
2008-04-12 13:35:43 -07:00
Bo Borgerson
7d4d2c3cc9 Avoid some warnings in rdoff/rdf2bin.c
I received some warnings when running make on the head revision of
nasm from git:

----
rdf2bin.c: In function 'main':
rdf2bin.c:122: warning: comparison between signed and unsigned
rdf2bin.c:123: warning: comparison between signed and unsigned
rdf2bin.c:124: warning: comparison between signed and unsigned
----

I think these warnings are innocuous and should be safely avoidable
with simple casts (please see attached patch).

* rdoff/rdf2bin.c
(main): cast to size_t for comparison with fwrite return value

Signed-off-by: Bo Borgerson <gigabo@gmail.com>
2008-04-12 11:12:14 -07:00
H. Peter Anvin
72ec0e4144 Temporaries in macros need a unique prefix; WSAA*() macros to header
When using temporaries in macros, given them a unique prefix to avoid
namespace collisions when using one macro inside another.

Move the WSAA*() macros from outelf32/outelf64 to a separate header
file.
2008-04-10 14:56:09 -07:00
H. Peter Anvin
2746b624fb autogen.sh: remove config.status
Remove config.status when rebuilding the autoconf files.
2008-04-10 14:54:02 -07:00
Charles Crayne
8ca31b48af Document avaiabily of DWARF for ELF32 and ELF64 2008-04-07 14:26:29 -07:00
Charles Crayne
6f15b9884e Correctly identify dwarf support for elf32
Change architecture tag to i386.
2008-04-07 13:15:53 -07:00
H. Peter Anvin
32cd4c2a62 Correctly identify SBYTE in the optimizer
Correctly identify SBYTE in the optimizer, *HOWEVER*, this change will
cause nuisance warnings to be issued; that will have to be fixed.
2008-04-04 13:34:53 -07:00
Charles Crayne
5a7976c925 Restore critical expression checking when optimizer enabled
In the prior code, enabling optimization effectively diabled
critical expression checking, because the optimization passes
took place before checking was enabled.
2008-03-26 17:20:21 -07:00
Charles Crayne
bd45c46cb9 Merge branch 'master' of git+ssh://ccrayne@repo.or.cz/srv/git/nasm 2008-03-22 20:08:20 -07:00
Charles Crayne
fa93735742 Remove KATMAI support for CLFLUSH
Minimal cpu level is WILLAMETTE,SSE2
2008-03-22 20:07:08 -07:00