Commit Graph

803 Commits

Author SHA1 Message Date
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
H. Peter Anvin
083f0c32e7 readnum(): handle prefix-suffix collision like "0h"
Suffixed versions of zero will look like both a prefix and a suffix.
Reject the prefixed version as being too short to decode.
2007-10-26 21:38:02 -07:00
H. Peter Anvin
c13d31a907 Better handling of platforms which hide "extended" functionality
Some platforms apparently feel -std=c99, which defines
__STRICT_ANSI__, should also hide a bunch of function prototypes.
This rather sucks.  At least try to deal with it.

MinGW and DJGPP both have this problem, in particular.
2007-10-26 18:49:29 -07:00
Charles Crayne
31600d6988 Merge branch 'master' of /home/chuck/development/gitnasm/ 2007-10-24 15:51:40 -07:00
Charles Crayne
650dc9d004 Update sections about debug info formats 2007-10-24 15:30:17 -07:00
H. Peter Anvin
c2df282092 Fix the handling of floating-point tokens in the preprocessor
Correct the handling of floating-point tokens in the preprocessor.
The preprocessor scanner and the main scanner really are painfully
divergent for no good reason.
2007-10-24 15:29:51 -07:00
Charles Crayne
f6816b25bf Fix bugs item #1817677 2007-10-23 19:28:39 -07:00
H. Peter Anvin
30b795fd10 Slightly simplify the radix-detection code
(pradix && pradix > sradix) etc. is unnecessary since pradix and
sradix cannot be negative, so zero is always the smallest value.

Put in a comment explaining why making the default radix == 10 doesn't
need any additional error checking.
2007-10-23 00:08:58 -07:00
H. Peter Anvin
50620f4a3f Unbreak particularly tricky hex constants
Unbreak hex constants which contain 'b' or 'd' in potentially tricky
places.
2007-10-22 19:48:06 -07:00
H. Peter Anvin
f41aef273b Decimal floating point can also start with 0. 0e 0E
A floating point number starting with 0. 0e or 0E is still decimal.
Make it easier by falling back to the standard decimal conversion
routine for anything not recognized as a radix prefix.
2007-10-22 19:37:36 -07:00
H. Peter Anvin
c65a2f634b Support binary and octal floating-point
For consistency, support binary and octal floating-point, and accept
a "0d" or "0t" prefix for decimal floating-point.  However, we do not
accept a binary exponent (p) for a decimal mantissa, or vice versa.
2007-10-22 17:34:10 -07:00
H. Peter Anvin
bea0bbb62c More consistent handling of radix letters
Allow any radix letter from the set [bydtoqhx] to be used either
"Intel-style" (0...x) or "C-style" (0x...).  In Intel style, the
leading 0 remains optional as long as the first digit is in the range
0-9.

As a consequence, allow the prefix "0h" for hexadecimal floating
point.
2007-10-22 16:53:48 -07:00
H. Peter Anvin
3b2ad1bc37 float.c: correct exponent capping
Actually enforce the exponent capping, as opposed to only enforcing it
to within a factor of 10.  Furthermore, continue to scan the string in
order to check for invalid characters.

Finally, 16384 is too tight of a bound for a binary exponent: it's a
tight bound, but the shift added due to the digit string can move the
cap into the active region (±16383).  Thus, change it to 20000 to be
on the safe side.
2007-10-21 15:33:01 -07:00
Charles Crayne
b0e1d423dd Clean up elf symbol table section 2007-10-21 14:21:43 -07:00
H. Peter Anvin
449e04b330 Allow $-prefixed hexadecimal FP as an alternative to 0x
Since we allow the prefix $ instead of 0x for integer constants, do
the same for floating point.  No suffix support at this time; we may
want to consider if that would be appropriate.
2007-10-19 18:33:57 -07:00
H. Peter Anvin
2d25ce4555 Scripts to remove stealth whitespace
Scripts to remove stealth whitespace from files and patches,
respectively.
2007-10-19 14:43:22 -07:00
H. Peter Anvin
7065309739 Formatting: kill off "stealth whitespace"
"Stealth whitespace" makes it harder to read diffs, and just generally
cause unwanted weirdness.  Do a source-wide pass to get rid of it.
2007-10-19 14:42:29 -07:00
H. Peter Anvin
31420e76d1 test/floatx.asm: fix test case
"dq" should have been "dt"
2007-10-19 14:26:52 -07:00
H. Peter Anvin
513e3c1bd2 uscore.asm: Fix test case
"$1e+16" was missing, instead "$1e16" was duplicated
2007-10-19 14:19:52 -07:00
H. Peter Anvin
3514ad0e6c float.c: mark read_exponent() static
read_exponent() is not used outside float.c; mark static
2007-10-19 14:17:51 -07:00
H. Peter Anvin
37d88e4125 Don't confuse suffixed hexadecimal with floating-point
1e30 is a floating-point constant, but 1e30h is not.  The scanner
won't know that until it sees the "h", so make sure we keep enough
state to be able to distinguish "1e30" (a possible hex constant) from
"1.e30", "1e+30" or "1.0" (unabiguously floating-point.)
2007-10-19 14:10:35 -07:00
H. Peter Anvin
f5f3d70d6d Anchor filename locations in .gitignore
In particular, "Makefile" matched "test/Makefile" without the anchor.
2007-10-19 13:17:24 -07:00
H. Peter Anvin
487a087066 test/Makefile: Use -Ox instead of -O999 2007-10-19 13:16:51 -07:00