Commit Graph

45 Commits

Author SHA1 Message Date
H. Peter Anvin
cb583b9435 Clean up stealth whitespace
Remove stealth whitespace
2007-10-28 22:04:42 -07:00
H. Peter Anvin
de4b89bb3e 64-bit addressing and prefix handling changes
Revamp the address- and prefix-handling code to make more sense in
64-bit mode.  We are now a lot closer to where we want to be, but
we're not quite there yet.

ndisasm may very well have problems, or give counterintuitive output.
However, checking it in so we can make forward progress.
2007-10-28 22:04:00 -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
12e46510bc Change cloc_t to struct location, and reorder the members
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.
2007-10-03 21:30:57 -07:00
H. Peter Anvin
bfc1712137 BR 1352920: change loc_t -> cloc_t
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.
2007-10-03 21:24:51 -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
cfbe7c3cc2 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.
2007-09-18 17:49:09 -07:00
H. Peter Anvin
141d7cf68d Support 16-bit IEEE floating point; used in SSE5
SSE5 supports standard IEEE 16-bit floating point, so we should
support that too.
2007-09-18 16:39:03 -07:00
H. Peter Anvin
41c9f6fde0 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.
2007-09-18 13:01:32 -07:00
H. Peter Anvin
8f94f988f0 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
2007-09-17 16:31:33 -07:00
H. Peter Anvin
0da6b580eb 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.
2007-09-12 21:04:39 -07:00
H. Peter Anvin
16b0a33cea 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.
2007-09-12 20:27:41 -07:00
H. Peter Anvin
74cc5e569c Finishing touches on perfect hash tokenizer; actually turn the thing on
Finish the perfect hash tokenizer, and actually enable it.

Move stdscan() et al to a separate file, since it's not needed in any
of the clients of nasmlib other than nasm itself.

Run make alldeps.
2007-08-30 22:35:34 +00:00
H. Peter Anvin
490bbcd047 Correct the logic for recording fs: and gs: overrides. 2007-08-29 20:30:31 +00:00
H. Peter Anvin
62b24d7e2f Add [default] directive
Add the [default {abs|rel}] directive, and clean up directive parsing.
2007-08-29 16:38:05 +00:00
H. Peter Anvin
150e20db50 Suppress IP-relative only for fs: and gs: overrides
AMD has (undocumented) segment limits even in 64-bit mode, so people
may want to use cs/ds/es/ss overrides.  Since there are no bases, however,
IP-relative still applies.

See:
http://www.amd.com.hk/us-en/assets/content_type/DownloadableAssets/dwamd_kernel_summit_08_RB.pdf
2007-08-29 15:19:19 +00:00
H. Peter Anvin
99c4ecd18f Implement REL/ABS modifiers
Implement "REL" and "ABS" modifiers for offsets in 64-bit mode.  This
replaces "rip+XXX" type addressing.  The infrastructure to set the default
mode is there, but there is nothing to throw the switch just yet.
2007-08-28 23:06:00 +00:00
Keith Kanios
7a68f30dd7 Fixed 64-bit offset generation. 2007-04-16 04:56:06 +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
H. Peter Anvin
c9f57c24d0 Fixes from Bart Oldeman 2002-09-19 04:27:01 +00:00
H. Peter Anvin
1fd2fa70b0 Fix missing test for e->type being set. 2002-09-13 00:17:56 +00:00
H. Peter Anvin
24cfef4f8f Clean up unnecessary dependencies. 2002-09-12 16:34:06 +00:00
H. Peter Anvin
232badbbbc This is the "megapatch":
a) Automatically generate dependencies for all Makefiles;
b) Move register definitions to a separate .dat file;
c) Add support for "unimplemented but there in theory" registers.
2002-06-06 02:41:20 +00:00
Debbie Wiles
63b53f7325 Added code to prevent FAR from being used with a register 2002-06-04 19:31:24 +00:00
H. Peter Anvin
d0e365d523 Make "ABSOLUTE <label>" work again; code based on 0.97. 2002-05-26 18:19:19 +00:00
H. Peter Anvin
8c1da7b3ce Fix the handling of the STRICT keyword 2002-05-22 20:45:09 +00:00
H. Peter Anvin
01377d8d7c Implement new "strict" keyword to inhibit optimization. 2002-05-21 03:16:33 +00:00
H. Peter Anvin
310b3e165f Code cleanup fixes from Ed Beroset 2002-05-14 22:38:55 +00:00
H. Peter Anvin
8ac364139a NASM 0.98.30 2002-04-30 21:09:12 +00:00
H. Peter Anvin
09f6acbb75 NASM 0.98.21 2002-04-30 21:05:55 +00:00
H. Peter Anvin
788e6c10e1 NASM 0.98.12 2002-04-30 21:02:01 +00:00
H. Peter Anvin
4cf1748e68 NASM 0.98.11 2002-04-30 21:01:38 +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
4836e3374e NASM 0.98p3.5 2002-04-30 20:56:43 +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
H. Peter Anvin
ea8382740d NASM 0.93 2002-04-30 20:51:53 +00:00
H. Peter Anvin
ea6e34db64 NASM 0.91 2002-04-30 20:51:32 +00:00