H. Peter Anvin
a162092532
nasmlib/ver.[ch]: add "compiler.h"
...
We should use "compiler.h", not just include <stdlib.h> explicitly.
Signed-off-by: H. Peter Anvin <hpa@zytor.com >
2018-12-26 06:37:25 -08:00
H. Peter Anvin
2e53f27e9d
Move <string.h> inclusion to compiler.h
...
There is absolutely no reason not to include <string.h> globally, and
with the inline function for mempcpy() we need it there anyway.
Signed-off-by: H. Peter Anvin <hpa@zytor.com >
2018-12-26 06:32:37 -08:00
H. Peter Anvin
0a2b1c3498
Mkfiles: run "make cleandist"
...
Run "make cleandist" to update the file lists.
Signed-off-by: H. Peter Anvin <hpa@zytor.com >
2018-12-26 06:31:54 -08:00
H. Peter Anvin
06f72bb968
Test for the mempcpy() function and add alternative if missing
...
If memcpy() doesn't exist, then add an inline alternative using
memcpy().
Signed-off-by: H. Peter Anvin <hpa@zytor.com >
2018-12-26 06:22:47 -08:00
H. Peter Anvin
77703ae4a4
nasm.spec.in: remove obsolete files
...
README and TODO are deleted and CHANGES is meaningless.
2018-12-26 06:13:06 -08:00
H. Peter Anvin
2e9a6e870f
TODO: delete completely obsolete file
2018-12-26 06:12:13 -08:00
H. Peter Anvin
72f2acc595
nasm.spec.in: we need *automake*; autoheader is in autoconf
...
We need the automake package for autogen.sh; the autoheader program is
in the autoconf package.
Signed-off-by: H. Peter Anvin <hpa@zytor.com >
2018-12-26 06:06:02 -08:00
H. Peter Anvin
33ce149330
nasm.spec.in: need autoheader, use autogen.sh
...
We need to use our new autogen.sh, which in turn needs autoheader.
Signed-off-by: H. Peter Anvin <hpa@zytor.com >
2018-12-26 06:03:57 -08:00
Cyrill Gorcunov
74246c499e
NASM 2.14.02
nasm-2.14.02
2018-12-26 16:41:15 +03:00
H. Peter Anvin
b3f7c8eb2b
tools/release: handle new binary files
...
With the travis tests, we have a lot more binary files to worry about.
Signed-off-by: H. Peter Anvin <hpa@zytor.com >
2018-12-26 05:11:26 -08:00
H. Peter Anvin
6b8765fb0c
changes.src: document fix for listing module crash
...
Signed-off-by: H. Peter Anvin <hpa@zytor.com >
2018-12-26 04:42:01 -08:00
Cyrill Gorcunov
532d9f9dcb
listing: list_emit -- Don't forget to zap listerr_head
...
In list_emit we walk over listerr_head freeing the list,
but the head pointer remain carrying old value. Need
to clean it up once traverse is done to not access
already freed memory later.
https://bugzilla.nasm.us/show_bug.cgi?id=3392538
Reported-by: russvz@comcast.net
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com >
2018-12-25 13:11:55 +03:00
H. Peter Anvin
11599f49da
Factor out size tokens and annotate with the corresponding size
...
There is space in the token table to explicitly encode the size
corresponding to a size token. We might as well do so...
Signed-off-by: H. Peter Anvin <hpa@zytor.com >
2018-12-24 12:45:58 -08:00
H. Peter Anvin
5079ea0b01
BR 3392538: test case for double free in listing module
...
Test case from bug 3392538 for double free in the listing module.
This is the test case only, not a fix.
Reported-by: <russyz@comcast.net >
Signed-off-by: H. Peter Anvin <hpa@zytor.com >
2018-12-24 12:41:57 -08:00
H. Peter Anvin
e7c75e5521
elf.h: add relocation numbers for segmented support
...
Add relocation numbers reserved/intended for segmented support in
ELF32.
Signed-off-by: H. Peter Anvin <hpa@zytor.com >
2018-12-24 12:18:59 -08:00
H. Peter Anvin
9acfdb26da
Makefile: make doc depend on warnings.src
...
warnings.src needs to exist for make doc to work.
Signed-off-by: H. Peter Anvin <hpa@zytor.com >
2018-12-24 12:18:59 -08:00
Cyrill Gorcunov
ad2fab7778
test: nasm-t -- Use plain stderr extension for error stream
...
Just to unify with other tests
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com >
2018-12-23 18:12:37 +03:00
Cyrill Gorcunov
929aa65385
test: nasm-t -- Add clzero case
...
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com >
2018-12-23 17:22:44 +03:00
Cyrill Gorcunov
8274623093
build: Add missing PA_ADD_LDFLAGS helper
...
Fixes b0121dc312
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com >
2018-12-23 17:22:44 +03:00
H. Peter Anvin
26191f845a
Merge tag 'nasm-2.14.01'
...
NASM 2.14.01
Resolved Conflicts:
version
Signed-off-by: H. Peter Anvin <hpa@zytor.com >
2018-12-22 18:53:17 -08:00
H. Peter Anvin
54d5078c11
autogen.sh: add code to re-run configure afterwards
...
Add code to autogen.sh to (re-)run configure, with preserved
configuration.
Signed-off-by: H. Peter Anvin <hpa@zytor.com >
2018-12-22 18:51:59 -08:00
H. Peter Anvin
b0121dc312
autoconf: use librarized autoconf setup
...
I have been setting up a cross-project librarized autoconf setup; use
it for NASM as well.
Signed-off-by: H. Peter Anvin <hpa@zytor.com >
2018-12-22 18:17:16 -08:00
H. Peter Anvin
ca810ecbaf
NASM 2.14.01
nasm-2.14.01
2018-12-22 17:55:11 -08:00
H. Peter Anvin
7f688841ce
insns.dat: accept explicit ax/eax/rax operand to CLZERO
...
AMD documents this instruction with an rax operand. The error behavior
implies this is an address-size-sensitive instruction. Add support for
specifying the explicit operand, but consistent with normal ndisasm
behavior, don't disassemble the implicit operand.
Signed-off-by: H. Peter Anvin <hpa@zytor.com >
2018-12-22 17:52:27 -08:00
Cyrill Gorcunov
3c0b924c9d
test: nasm-t -- Add more details into README
...
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com >
2018-12-20 14:28:31 +03:00
H. Peter Anvin
2965154684
assemble_file(): break up this gigantic mess
...
Break up this gigantic mess which touches way too many layers.
Signed-off-by: H. Peter Anvin <hpa@zytor.com >
2018-12-18 19:14:40 -08:00
H. Peter Anvin
5307832cd1
Makefile.in: add target for running travis
...
Just like "make test", add "make travis".
Signed-off-by: H. Peter Anvin <hpa@zytor.com >
2018-12-18 18:57:00 -08:00
H. Peter Anvin
5358b98405
Don't convert the various RESx instructions to RESB
...
All it does is complicate things; instead leave the opcode where it
is.
Signed-off-by: H. Peter Anvin <hpa@zytor.com >
2018-12-18 18:06:26 -08:00
H. Peter Anvin (Intel)
5df6ca712d
With buffered warnings, change the handling of error passes
...
With buffered warnings, most warnings *must* be issued on every pass,
so ERR_PASS1 is simply wrong in most cases.
ERR_PASS1 now means "force this warning to be output even in
pass_first(). This is to be used for the case where the warning is
only executed in pass_first() code; this is highly discouraged as it
means the warnings will not appear in the list file and subsequent
passes may make the warning suddenly vanish.
ERR_PASS2 just as before suppresses an error or warning unless we are
in pass_final().
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com >
2018-12-18 12:25:11 -08:00
H. Peter Anvin (Intel)
21da8ae8e5
Merge remote-tracking branch 'origin/nasm-2.14.xx'
2018-12-18 11:25:11 -08:00
H. Peter Anvin (Intel)
e7f4e0e229
test/Makefile: add .aout target
...
We had no target for generating an aout format file.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com >
2018-12-18 11:24:29 -08:00
H. Peter Anvin (Intel)
e55d03dd47
Clean up the handling of various passes
...
The use of pass0, pass1, pass2, and "pass" passed as an argument is
really confusing and already caused a severe bug in the 2.14.01
release cycle. Clean them up and be far more explicit about what
various passes mean.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com >
2018-12-18 11:14:59 -08:00
Cyrill Gorcunov
8c17bb2fc4
test: nasm-t -- Update tests
...
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com >
2018-12-16 01:25:03 +03:00
Cyrill Gorcunov
35d047632b
nasm: Fix condition in skip_this_pass
...
We should not match both condition.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com >
2018-12-16 01:21:13 +03:00
Cyrill Gorcunov
988cc1222c
asm/nasm.c: Drop tabs
...
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com >
2018-12-15 23:44:46 +03:00
Cyrill Gorcunov
33b5d21fbd
test: nasm-t -- Make read buffer up to 4M
...
Need to implement read on demand but later.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com >
2018-12-15 22:56:18 +03:00
Cyrill Gorcunov
7d23d8d26f
compier: Zap __builtin_constant_p on gcc 4.x series
...
It is been discovered that on gcc-4.8.4 compiler can't
properly evaluate __builtin_constant_p.
| gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
|
| In file included from asm/nasm.c:38:0:
| asm/nasm.c: In function ‘assemble_file’:
| ./include/compiler.h:377:27: error: first argument to ‘__builtin_choose_expr’ not a constant
| # define if_constant(x,y) __builtin_choose_expr(is_constant(x),(x),(y))
| ^
| ./include/nasmlib.h:145:23: note: in expansion of macro ‘if_constant’
| static_assert(if_constant(x, 1), #x); \
| ^
| ./include/nasmlib.h:167:9: note: in expansion of macro ‘nasm_try_static_assert’
| nasm_try_static_assert(x); \
| ^
| asm/nasm.c:1544:17: note: in expansion of macro ‘nasm_assert’
| nasm_assert(output_ins.times >= 0);
|
Zap it for 4.x series so we could run our tests.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com >
2018-12-15 20:33:25 +03:00
Cyrill Gorcunov
6f33dbb087
build: aclocal.m4 -- Provide arguments to main
...
Which will allow to address these args inside test if needed.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com >
2018-12-15 18:14:50 +03:00
Cyrill Gorcunov
dd83b26e57
nasmlib: Fix space/tabs mess
...
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com >
2018-12-15 18:14:50 +03:00
Cyrill Gorcunov
3f11ddab41
compiler: Brace __builtin_constant_p argument
...
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com >
2018-12-15 18:14:50 +03:00
Cyrill Gorcunov
82cc2fbef0
test: nasm-t -- Update multisection
...
We start printing [-w+other]
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com >
2018-12-15 15:39:56 +03:00
Cyrill Gorcunov
bbc0c01055
test: nasm-t -- Update riprel
...
We provide [-w+other] in output.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com >
2018-12-15 15:39:56 +03:00
Cyrill Gorcunov
3999dcf2d4
test: nasm-t -- Update prefix66
...
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com >
2018-12-15 15:39:56 +03:00
Cyrill Gorcunov
29fab74251
test: nasm-t -- Update multisection
...
Now we provide -w-other in output.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com >
2018-12-15 15:39:56 +03:00
Cyrill Gorcunov
dbdc1a06c4
test: nasm-t -- Update mout
...
We start printing space after file name.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com >
2018-12-15 15:39:56 +03:00
Cyrill Gorcunov
705472100a
test: nasm-t -- Fix typo
...
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com >
2018-12-15 15:39:51 +03:00
Cyrill Gorcunov
405556ff69
test: nasm-t -- Update floatb test
...
We start reporting overflow in float-points
which we previously missed.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com >
2018-12-15 12:31:56 +03:00
Cyrill Gorcunov
dfb164b73c
test: nasm-t -- Update bcd test
...
We start printing [-w+other] in warning report.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com >
2018-12-15 12:08:02 +03:00
Cyrill Gorcunov
e7da0b5455
test: nasm-t -- Reverse the comparision order
...
Comparing new and old data is inconvenient since
it rathe shows the reverse diff. Use straight
direction instead.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com >
2018-12-15 12:02:37 +03:00
Cyrill Gorcunov
763cad619d
test: nasm-t -- Move data reading out of cmp_std
...
Since the only purpose of cmp_std
is to compare outputs.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com >
2018-12-15 12:00:16 +03:00