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
H. Peter Anvin
361584882e
Test of underscored constants
2007-10-19 13:14:06 -07:00
H. Peter Anvin
2ef4aac272
Allow underscores in numbers; better detection of FP
...
- Allow underscores as group separators in numbers, for example:
0x1234_5678 is now a legal number. The underscore is just ignored,
it adds no meaning.
- Recognize dotless floating-point numbers, such as "1e30". This
entails distinguishing hexadecimal numbers in the scanner, since
e.g. 0x1e30 is a perfectly legitimate hex constant.
2007-10-19 13:10:46 -07:00
H. Peter Anvin
a8eace2b79
Modernize nasm.spec.in and make it closer to the Fedora version
2007-10-19 10:52:31 -07:00
Charles Crayne
f3eea3d539
Suppress datarootdir warnings from configure
2007-10-18 23:33:06 -07:00
Charles Crayne
46b31b0f08
Suppress signedness warnings in disassembler
2007-10-18 21:17:20 -07:00
H. Peter Anvin
26573020d8
Cleaner solution for MinGW handling of __STRICT_ANSI__
...
If MinGW is detected, undefine __STRICT_ANSI__ in compiler.h instead.
2007-10-18 19:14:08 -07:00
H. Peter Anvin
8088815922
configure: Undefine __STRICT_ANSI__ for mingw's benefit
...
mingw makes a bunch of prototypes unavailable if __STRICT_ANSI__ is
defined. However, they are still detected by configure, which causes
us pain.
2007-10-18 19:14:08 -07:00
H. Peter Anvin
684f98b636
Fix invocation of readnum()
...
readnum() takes a boolean for error.
2007-10-18 19:14:07 -07:00
Charles Crayne
192d5b5e9c
Suppress a few signedness warnings
2007-10-18 19:02:42 -07:00
root
2674b04d88
Avoid unnecessary warning on redefinition of section (bug 801180)
2007-10-18 17:04:10 -07:00
Charles Crayne
f23a5b042c
Generate stabs entries for any executable section
2007-10-17 17:55:45 -07:00
H. Peter Anvin
e911708790
NASM 0.99.05
2007-10-16 22:59:09 -07:00
H. Peter Anvin
a366cac2a6
Tests of obscenely large exponents
2007-10-16 15:46:04 -07:00
H. Peter Anvin
9563910747
Comma-separate contents of __FLOAT__
2007-10-16 14:42:32 -07:00
H. Peter Anvin
f6c9e65d4f
Implement floating-point option control directive
...
New directive [FLOAT] with associated standard macros; allows the
setting to be saved and restored.
2007-10-16 14:40:27 -07:00
H. Peter Anvin
fab3a6c9de
Floating-point warning fixes; fix round-to-overflow
...
Actually generate the appropriate floating-point warnings, and only
one per assembly, pretty please.
Correct the round-to-overflow condition; as written all numbers with a
positive exponent were considered overflows!
2007-10-16 11:48:07 -07:00
H. Peter Anvin
125c878e96
Handle rounding of denorms correctly; make fp overflow a warning
...
- Handle rounding of denorms correctly
- Make fp overflow a warning, not an error (produces Inf)
- Make fp warnings controllable
2007-10-16 11:32:58 -07:00
H. Peter Anvin
630b52013a
Additional entries for .gitignore
2007-10-16 10:35:02 -07:00
H. Peter Anvin
4da5b8c2dd
Refactor floating-point formatting code; fix 80-bit denorms
...
Refactor the floating-point formatting code so that the 80-bit format
can be supported with common code. This fixes 80-bit denorms as a
side effect; the shift value in 80-bit denorms was completely wrong.
2007-10-16 10:32:57 -07:00
H. Peter Anvin
61872221ad
Add 1.5 as a test case: representative of an exact fraction
...
1.5 is an exactly representable fraction, useful for test.
2007-10-16 10:31:16 -07:00
H. Peter Anvin
b2f6fef421
Recognize 'd', 't' and 'y' as radix suffixes
...
'd', 't' and 'y' now recognized as radix suffixes.
2007-10-15 20:06:06 -07:00
H. Peter Anvin
826ffa9c8e
Fix FISTTP opcodes (BR 689695)
2007-10-15 19:53:10 -07:00
H. Peter Anvin
214f549c5c
New floating-point conversion routines
...
Substitute in nasm64developer's "acfloat4" routine. This
floating-point conversion routine is not perfect (it gets a fair
number of LSB errors), but the old NASM code was just plain broken.
nasm64developer's code at least gets within ±1 LSB.
2007-10-15 19:46:32 -07:00
H. Peter Anvin
32f21f16fc
Add testnos3 from the gdtoa package (floating-point test)
2007-10-15 17:48:43 -07:00
H. Peter Anvin
cc94919aa3
.gitignore file doesn't need to be in the release file
2007-10-13 23:19:21 -07:00
H. Peter Anvin
3abe3c51a6
Add .gitignore file so "git status" produces something sane
...
Add .gitignore file to tell git about files that don't need to be
tracked.
2007-10-13 23:17:41 -07:00
H. Peter Anvin
70a5d14b89
autoconf: drop AC_USE_SYSTEM_EXTENSIONS to support autoconf 2.59
...
AC_USE_SYSTEM_EXTENSIONS requires autoconf 2.61, which is still a
little too new, apparently. Unless we have a specific reason to
include it, don't.
2007-10-13 23:12:46 -07:00
Keith Kanios
a5fc6467ab
Fix 32-bit types in preproc.c and eval.c
...
Fix 32-bit types in preproc.c and eval.c that should have been 64-bit
types. This allows %assign to work correctly with 64-bit integers.
2007-10-13 07:09:22 -07:00
Charles Crayne
b263b504bc
Must define types before using them
2007-10-11 20:32:33 -07:00
H. Peter Anvin
4db5a16128
preproc.c: move smacro define/undef to separate functions
...
Instead of tons of replicated code, move smacro define/undef into
separate static functions.
2007-10-11 13:42:09 -07:00
H. Peter Anvin
95e7f957f2
preproc.c: PP_DEFINE and PP_XDEFINE are case-sensitive
...
The statement for case-sensitivity had PP_DEFINE and PP_IXDEFINE,
rather than PP_XDEFINE.
2007-10-11 13:38:38 -07:00
H. Peter Anvin
4bc9f1de73
preproc.c: normalize the handling of case sensitivity
...
Fix a bug relating to case sensitivity, and make remaining code more
similar.
2007-10-11 12:52:03 -07:00
H. Peter Anvin
687b363477
Define macros necessary for <inttypes.h> on C++
...
NASM currently doesn't compile with a C++ compiler, but the error
messages are sometimes useful. Define macros necessary for
<inttypes.h> to work with a C++ compiler.
2007-10-11 12:51:06 -07:00
H. Peter Anvin
51cbf4a1fa
More "bool" fixes
...
A few more variables passed as pointers which are now defined as bool *.
2007-10-11 10:12:58 -07:00
H. Peter Anvin
f8ba53eb2a
preproc.c: allow 64-bit repeat counts
...
Allow the count of %rep to exceed 2^31.
2007-10-11 10:11:57 -07:00
H. Peter Anvin
16ed438e71
preproc.c: For an SMacro, in_progress really is a boolean (no %rep)
2007-10-11 10:06:19 -07:00
H. Peter Anvin
70055964fc
Additional uses of bool and enum
...
Proper use of bool and enum makes code easier to debug. Do more of
it. In particular, we really should stomp out any residual uses of
magic constants that aren't enums or, in some cases, even #defines.
2007-10-11 00:05:57 -07:00
H. Peter Anvin
54901e1785
preproc.c: MMacro.in_progress is not a boolean
...
Per the comment:
* In a MMacro describing a `%rep' block, the `in_progress' field
* isn't merely boolean, but gives the number of repeats left to
* run.
This fixes the "global" directive not getting recognized, since it
repeats over all its arguments.
2007-10-11 00:05:57 -07:00
H. Peter Anvin
d119ce6f9a
saa_fread/fwrite: when seeking, must set [rw]ptr as well
...
[rw]ptr represent the global position and need to be kept in sync with
[rw]pos:[rw]blk at all times. Failed to do that while seeking, with
obviously bad results.
2007-10-10 18:07:51 -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
be1b83d24a
owlinux.mak: don't clean things we won't be able to
...
There won't be a Makefile in rdoff in particular, so trying to run
"make clean" there is pointless.
2007-10-10 14:55:14 -07:00
H. Peter Anvin
38a1b8ae9f
configure.in: looks like we need autoconf 2.61 :(
...
AC_USE_SYSTEM_EXTENSIONS is really, *really* useful, but apparently
requires autoconf 2.61...
2007-10-10 14:29:53 -07:00
H. Peter Anvin
fd7dd11345
Create option -Ox to tell NASM to do unlimited passes
...
Add option -Ox to tell NASM to do as many passes as it needs, instead
of imposing a fixed number.
2007-10-10 14:06:59 -07:00
H. Peter Anvin
f57f55c9cb
Revert "floatb.asm: fix broken testcase"
...
This reverts commit d9e3116be1
.
0x513c1704 is 50.49e9, not 50.40e9
2007-10-08 19:26:57 -07:00
H. Peter Anvin
d9e3116be1
floatb.asm: fix broken testcase
...
50.40e9 as a 32-bit float is 0x513c1704
2007-10-08 18:39:24 -07:00
H. Peter Anvin
73ab71f905
saa_rstruct: fix overrun check
...
The direction of the overrun test in saa_rstruct was backwards.
2007-10-08 12:41:00 -07:00
H. Peter Anvin
36a8f95bd0
Add Frank's floattest.asm test file
2007-10-08 12:12:23 -07:00