Commit Graph

825 Commits

Author SHA1 Message Date
H. Peter Anvin
4b3390eb47 BR 1828866: fix handling of LAR/LSL
Fix handling of LAR/LSL with various sized operands
2007-11-12 22:05:31 -08:00
H. Peter Anvin
e8cdcdcc37 Better (but not *good!*) handling of 64-bit addressing in ndisasm
More correct -- but not fully correct -- handing of 64-bit addressing
in ndisasm.  In particular, we need to generate "a32" versus "dword"
where applicable.
2007-11-12 21:57:00 -08:00
H. Peter Anvin
2344010d26 Fix disassembly of XCHG
"REX.B 90" in 64-bit mode is "xchg eax,r8d" not "nop"; equivalent
situation for "REX.WB 90" (xchg rax,r8).
2007-11-12 21:02:33 -08:00
H. Peter Anvin
f72151f43e Test of XCHG
Test for XCHG
2007-11-12 20:18:33 -08:00
H. Peter Anvin
aff9c93aa4 Fix handling of XCHG in 64-bit mode
The handling of XCHG in 64-bit mode somewhat broken.  Add a register
flag for "not accumulator", so we can generate all the appropriate
modes.
2007-11-12 20:18:05 -08:00
H. Peter Anvin
ce6c8a7929 More \321 -> \324 bug fixes
Additional \321 flags (o32) that should be \324 (o64).
2007-11-12 19:36:13 -08:00
H. Peter Anvin
136dcdbd42 float.c: all warnings and errors are pass 1 only
None of the floating-point errors or warnings are anything but pass 1
only; use the ERR_PASS1 flag to capture that.
2007-11-12 18:26:31 -08:00
Charles Crayne
c22ae5cb12 Update documentation for stack relative directives.
Bring a few other sections up to date.
2007-11-10 21:55:19 -08:00
Charles Crayne
2321d930ec Clean up a few more 32-bit bottlenecks 2007-11-10 17:52:23 -08:00
Charles Crayne
9fb030f8cd Update documantation for stack relative directives 2007-11-09 16:37:41 -08:00
Charles Crayne
0872deddd0 Merge branch 'master' of /home/chuck/development/gitnasm/ 2007-11-09 16:33:54 -08:00
Charles Crayne
102cdadb6f Update documentation for stack relative directives 2007-11-09 16:25:43 -08:00
H. Peter Anvin
34f6fb0a65 Don't combine type and size into a single argument
Don't combine type and size into a single argument; *every* backend
immediately breaks them apart, so it's really just a huge waste of
effort.  Additionally, it avoids using short immediates in the
resulting code, which is a bad thing.
2007-11-09 14:44:02 -08:00
Charles Crayne
7eaf919a22 Add flat64 to %stacksize choices 2007-11-08 22:11:14 -08:00
H. Peter Anvin
44d7dcf87b Fix building under OpenWatcom
OpenWatcom doesn't like 64-bit switch arguments; the change to 64-bit
type arguments caused that to happen in outmacho.c.  Hack around it
for now; however, realistically speaking the whole bit stealing thing
is probably a bad idea, especially since virtually all CPUs handle
short immediates better than long ones.
2007-11-08 20:43:22 -08:00
H. Peter Anvin
88602aa53a ps2pdf: remove -dOptimize=true
Remove -dOptimize=true; it actually generates larger output, since the
optimization performed is "network optimization".
2007-11-08 20:29:37 -08:00
H. Peter Anvin
ec4dc4e04b No binary files left in the source distro; unbreak release script
There are no more binary files in the source distro; this broke the
build robot.  Comment out the binary file zipping.
2007-11-08 20:21:41 -08:00
H. Peter Anvin
8781cb0d00 BR 1828103: Fix %arg and %local
Correct the implementation of %arg and %local.

It's questionable how much they make sense for 64-bit mode; even in
32-bit mode one normally make references off the stack pointer instead
of the base pointer (frame pointer), but that requires keeping track
of the stack pointer offset.
2007-11-08 20:01:11 -08:00
H. Peter Anvin
52bd38b899 nasmlib.c: prefix_name(): use the elements() macro
Use the elements() macro to count the elements in a static array.
2007-11-08 19:34:01 -08:00
H. Peter Anvin
6a6eafdcee Move elements() to nasmlib.h
Move elements() to nasmlib.h; that is the best place for this kind of
utility macros.
2007-11-08 19:30:22 -08:00
H. Peter Anvin
c84f1b927b constipate the "str" argument to bsi() and bsii()
The string argument to bsi() and bsii() should be const.
2007-11-08 19:15:33 -08:00
Charles Crayne
5fbbc8c2e7 Upgrade RAA functions to hold 64-bit data. 2007-11-07 19:03:46 -08:00
Charles Crayne
8c7eca4936 Pass 64-bit instruction lengths to back-ends. 2007-11-06 21:48:12 -08:00
Charles Crayne
1f8bc4c9a9 Prepare for 64-bit instruction lengths 2007-11-06 18:27:23 -08:00
Charles Crayne
1b851dcd04 Disambiguate error messages 2007-11-05 21:49:49 -08:00
Charles Crayne
4e8563d5c4 Upgrade label functions to 64-bit 2007-11-05 17:19:32 -08:00
H. Peter Anvin
9c98769a33 Permit opcode names as labels as long as they are followed by a colon
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.
2007-11-04 21:10:42 -08:00
Charles Crayne
dd462c8f44 Make warning limit valid for both i386 and x86_64 2007-11-04 15:28:30 -08:00
Charles Crayne
7e97555f1c Warn on out of bounds EA displacements 2007-11-03 22:06:13 -07:00
H. Peter Anvin
f5c729203d Treat info files as binary when creating xdoc distro file
info files appear to contain embedded binary information and should
therefore be treated as binary when creating zipfiles.
2007-11-01 15:08:27 -07:00
H. Peter Anvin
b9218138b4 Remove obsolete binary files from the distribution
Remove a JPEG file and a long-unmaintained support file for an
editor.  These are the only binary files in the standard distribution.
2007-11-01 15:07:42 -07:00
H. Peter Anvin
e3917fc538 Move declarations before statements
C99 permits declarations and statements to be intermixed, so gcc don't
warn about them, but MSVC and OpenWatcom get unhappy about them.
2007-11-01 14:53:32 -07:00
H. Peter Anvin
7fec73d785 NASM 0.99.06 2007-10-31 23:37:35 -07:00
H. Peter Anvin
ce7aaf7b63 Script to tag the tree for release
Script to tag the tree for release.  Once this tag is pushed
(git push; git push --tags) the build robot will pick it up and
produce the builds.
2007-10-31 23:37:19 -07:00
H. Peter Anvin
1b9dd7d1e1 Even more "riprel" tests
Add a64 and a32 combinations.
2007-10-31 10:59:26 -07:00
H. Peter Anvin
a30acb52cd floatx.asm: add tests for "rounds up to smallest denorm"
Add tests for the case where we round upwards to reach the smallest
possible denorm, i.e. "saved from underflow by rounding."
2007-10-30 01:17:57 -07:00
H. Peter Anvin
23f1644ba9 Run "make alldeps" 2007-10-30 01:13:27 -07:00
H. Peter Anvin
4a63c20755 float.c: handle round-up-to-denorm correctly. 2007-10-30 01:13:09 -07:00
H. Peter Anvin
84b5d2c539 Exhaustive test for 8-bit floating point values 2007-10-30 00:59:27 -07:00
H. Peter Anvin
839eca23e4 Clean up the handing of operands in assemble.c
assemble.c was full of code containing ins->oprs[c - 0xxx] where 0xxx
was the base of the particular code block.  Verbose and error prone
when code is moved around.  Now we precompute opx = &ins->oprs[c & 3]
before dispatching, resulting in less code.
2007-10-29 23:12:47 -07:00
H. Peter Anvin
10e2727133 Don't warn for segmented references
Don't warn for overflow in segmented references; those are linker
references and it is up to the backend or the linker to warn if they
overflow their permitted size.
2007-10-29 22:56:08 -07:00
H. Peter Anvin
2ce0274303 Use a 32-bit floating-point limb size; support 8-bit float
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.)
2007-10-29 20:20:12 -07:00
Charles Crayne
052c0bd484 Reduce severity of redundant prefixes from error to warning. 2007-10-29 18:24:59 -07:00
H. Peter Anvin
6745d722f4 Test of some addressing modes in 64-bit mode. 2007-10-28 23:23:24 -07:00
H. Peter Anvin
b0c5462694 Fix bogus flagging of effective addresses as invalid
Ah, what a difference a single ~ makes... such as flagging invalid EAs
as valid and vice versa.
2007-10-28 23:21:46 -07:00
H. Peter Anvin
ff9e7e34a1 Actually shut up the warning in rdfload.c
Shut the warning in rdfload.c up properly...
2007-10-28 23:10:34 -07:00
H. Peter Anvin
cb583b9435 Clean up stealth whitespace
Remove stealth whitespace
2007-10-28 22:04:42 -07:00
H. Peter Anvin
577f247be4 Fix warning about cast to pointer in rdfload.c
Fix warning in rdfload.c about cast to pointer of different size when
compiling on 64 bits.  Of course, rdfload is probably useless on 64
bits, but it's pretty useless in the first place.
2007-10-28 22:04:00 -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
Charles Crayne
d1cf2de1c0 Adjust stabs symbol index to match symbol table.
Add data length info to symbol table when stabs is active.
2007-10-28 15:29:54 -07:00