Commit Graph

241 Commits

Author SHA1 Message Date
Cyrill Gorcunov
f77ec1c803 nasm-t: no need to strip json files
The json library can handle newlines by self.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-09-18 00:49:11 +03:00
H. Peter Anvin (Intel)
ed63993519 Merge remote-tracking branch 'github/nasm-2.15.xx'
No conflicts.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2020-09-11 18:27:06 -07:00
Cyrill Gorcunov
61265ecd15 travis: add br3392442
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-09-07 09:57:00 +03:00
Cyrill Gorcunov
08996ec2e5 travis: add br3392707
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-09-06 20:12:01 +03:00
Cyrill Gorcunov
463600ac22 travis: nasm-t -- fix --error option
Write "expected" or "over" if requested.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-09-06 20:02:53 +03:00
Cyrill Gorcunov
ff96ae3ffb travis: warnstack -- fix spaces
We use tabs in json so make it consistent.
No functional change.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-09-06 19:57:11 +03:00
H. Peter Anvin (Intel)
cc64861a61 Merge tag 'nasm-2.15.05'
NASM 2.15.05

Resolved Conflicts:
	asm/preproc.c
	version

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2020-08-31 12:23:36 -07:00
H. Peter Anvin (Intel)
bf79786e89 Add option to create reproducible output
We need the ability to produce consistent output for our own tests,
anyway, so make this a user-accessible feature. This was requested in
BR 3392635.

This obsoletes the NASM_TEST_RUN environment variable; simply use the
normal NASMENV environment variable instead.

The .obj tests in travis needed to be updated in order to remove the
rather pointless suffix " CONST" from the NASM signatures.

Reported-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2020-08-27 13:06:08 -07:00
H. Peter Anvin (Intel)
7497737aa2 travis: fix "warnstack" test
The "warnstack" test is supposed to test the warning stack, but the
[warning] directive is never seen in preprocess-only mode, so run it
in -f bin mode.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2020-08-27 12:22:09 -07:00
H. Peter Anvin (Intel)
2b4886afdd BR 3392715: fix %ifid with $ and $$
%ifid $ and %ifid $$ has traditionally been false, revert to that
behavior.

Reported-by: Mike Hommey <mh+anfz@glandium.org>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2020-08-27 11:43:08 -07:00
H. Peter Anvin (Intel)
cc843efa38 Merge tag 'nasm-2.15.04'
NASM 2.15.04

Conflicts:
	asm/listing.h
	asm/pptok.pl
	asm/preproc.c
	version

This doesn't pass travis test 3392711, which is using an extremely odd
construct of %?? in the middle of an argument sequence for an smacro
while not being in a macro itself, and expecting it to expand to the
macro name. This seems to *really* confuse the master branch.

Resolve this later...
2020-08-25 16:16:09 -07:00
Cyrill Gorcunov
0b7244fcd6 trevis: unify tmap descriptor
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-25 19:53:26 +03:00
Cyrill Gorcunov
2cc71a59b1 travis: add lwp
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-25 19:42:29 +03:00
Cyrill Gorcunov
312b7c667c travis: enable winalign test
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-25 19:21:17 +03:00
Cyrill Gorcunov
4debfe8c8f travis: add br3392411
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-25 19:19:33 +03:00
Cyrill Gorcunov
512c93dc42 travis: nasm-t -- add ability to specify error
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-25 19:11:52 +03:00
Cyrill Gorcunov
09f819dc6f travis: add br3392363
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-25 19:02:55 +03:00
Cyrill Gorcunov
50131db098 travis: add br3392396
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-25 19:01:17 +03:00
Cyrill Gorcunov
296cf9bebc travis: add br3392392
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-25 18:59:06 +03:00
Cyrill Gorcunov
6691653710 travis: add v4
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-25 18:12:09 +03:00
Cyrill Gorcunov
40650a357a travis: add sreg
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-25 18:08:33 +03:00
Cyrill Gorcunov
91d0980bfa travis: add ret
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-25 18:05:33 +03:00
Cyrill Gorcunov
f2854471ac travis: add vaesenc
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-25 16:36:10 +03:00
Cyrill Gorcunov
852e80b011 travis: add vex
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-25 16:36:10 +03:00
Cyrill Gorcunov
70eb4a0885 travis: add vgather
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-25 16:36:10 +03:00
Cyrill Gorcunov
186c28395f travis: add warnstack
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-25 16:36:10 +03:00
Cyrill Gorcunov
e2917fd775 travis: add vpcmp
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-25 16:36:10 +03:00
Cyrill Gorcunov
8142ab699d travis: add winalign
It is disabled by now -- we need to teach nasm-t to
skip some parts of output (due to format specifics).

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-25 16:36:10 +03:00
Cyrill Gorcunov
4b3ac4eefd travis: nasm-t -- add ability to disable test
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-25 16:36:10 +03:00
Cyrill Gorcunov
d9eed2bec7 travis: add xdefine test
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-25 16:36:10 +03:00
Cyrill Gorcunov
7f3cfafbd9 travis: add br3392275
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-25 16:36:10 +03:00
Cyrill Gorcunov
63ccbf4f5f travis: nasm-t -- add ability to generate new tests
Just to not fill descriptor by hands every time.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-25 16:36:06 +03:00
Cyrill Gorcunov
d2e3bd850f travis: add xpaste test
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-24 18:03:32 +03:00
Cyrill Gorcunov
b2fb88596e travis: add avx2
Initial conversion by nasm64developer.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-24 16:23:53 +03:00
Cyrill Gorcunov
62bae12eed travis: add br3104312
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-24 15:24:32 +03:00
Cyrill Gorcunov
355d8bf40c travis: add amx test
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-24 15:24:32 +03:00
Cyrill Gorcunov
3d1f5ce8e7 travis: update absolute
To match test/ instance.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-24 15:24:22 +03:00
Cyrill Gorcunov
f0b0155280 travis: add a64 test
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-24 13:48:31 +03:00
H. Peter Anvin
fb95a2ef7a br3392643: update travis test
The warning output by obj symbol truncation has been changed, update
the travis reference accordingly.

Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2020-08-18 12:37:35 -07:00
Cyrill Gorcunov
51e23ac72a travis: add br3392643 test
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-18 21:05:56 +03:00
Cyrill Gorcunov
57e0b3e56a travis: add br3392711 test
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-08-18 13:59:12 +03:00
Cyrill Gorcunov
f1cf95480d travis: weirdpaste -- add nil dereference test
To address BR 3392696

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-07-12 06:01:51 -07:00
Cyrill Gorcunov
80e1774b90 travis: weirdpaste -- add nil dereference test
To address BR 3392696

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-07-12 14:06:54 +03:00
H. Peter Anvin
f293842b8a Merge remote-tracking branch 'github/nasm-2.15.xx' 2020-07-05 15:34:46 -07:00
H. Peter Anvin
a6fd383126 travis: weirdpaste.i now has better line directives
The %line directives in weirdpaste.i now better reflect the actual
lines of the source code, just as we would have for debugging
output. Update the reference version of weirdpaste.i accordingly.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2020-07-05 15:31:36 -07:00
Cyrill Gorcunov
37c0942409 travis/test: Update version test
Just to eliminate warning, nothing serious.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-07-03 11:04:42 +03:00
H. Peter Anvin (Intel)
b292748d9f preproc, srcfile: much saner handling of %line directives
%line directives really need to be preprocessed early, before normal
directive processing. In particular, they are *not* affected by such
thing as smacro expansion, or deferred into an mmacro expansion.

The %line directive is special because it is explicitly indented to be
inserted by an external preprocessor, which can happen at any point.

For mmacro and rep expansions, store the current file and line for
each expansion line. Similarly, let each istk entry contain such
information.

Don't emit empty lines in preprocessing-only mode when we are
already required to issue a %line directive anyway. This cuts down on
clutter a fair bit.

Quote filenames in %line directives (and accept quoted filenames in
%line directives) if and only if it is necessary for
disambiguation. This is required if:

1. The filename contains control characters;
2. The filename begins or ends with whitespace or a quotation mark;
3. The filename is empty.

Otherwise issue the filename as-is, for backwards compatibility.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2020-06-14 20:09:11 -07:00
H. Peter Anvin (Intel)
30dda0b4bb travis: utf-error.stderr: remove unnecessary error message
The error message "comma expected after operand 2" no longer
occurs in this program, this is an acceptable divergence, however.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2020-06-05 13:22:32 -07:00
H. Peter Anvin (Intel)
cc27f60fb0 travis: test avx512f should now pass
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2020-06-05 13:19:04 -07:00
H. Peter Anvin
02d68d3da0 travis utf-error test: update error messages
Update error messages to match the new __?*?__ namespace.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2019-09-12 18:36:18 -07:00
H. Peter Anvin (Intel)
6ecc25c13e travis: update warning output
Update warning formatting after verifying that the new output is
indeed still correct.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2019-08-09 16:18:51 -07:00
H. Peter Anvin (Intel)
41bb8a8114 Warn if trying to assemble obsolete instructions
Print a warning if one tries to assemble an obsolete instruction,
unless there is an exact match for the CPU directive.

For example:

	CPU 386
	POP CS		; Warning - obsolete instruction

	CPU 8086
	POP CS		; No warning

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2019-08-06 22:56:51 -07:00
H. Peter Anvin
fdeb3b0d01 Add group aliases for all prefixed warnings.
For example, -w+float will now enable all warnings with names staring
with float-*.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2019-06-06 20:53:17 -07:00
H. Peter Anvin
236f4a832b strfunc: better error messages if a string transform fails
Let the user know what string transform actually failed on them.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2019-06-06 17:17:16 -07:00
H. Peter Anvin (Intel)
38ddb19977 Warnings: move zeroing reserved space to a separate warning class
Zeroing reserved space in a progbits section really should be a
separate warning class, so it can be controlled independently.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2019-01-11 12:27:02 -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
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
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
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
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
Cyrill Gorcunov
f7ce7e85bc test: nasm-t -- Update floatb
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-12-01 11:38:28 +03:00
Cyrill Gorcunov
fffc005281 test: nasm-t -- Update macro-defaults
We started printing macro name in 1722fcf81c

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-29 12:51:40 +03:00
Cyrill Gorcunov
85261a2b57 test: Use NASM_TEST_RUN environment
To placate false positives in outputs which
writes nasm comment an signature into binary
form.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-24 17:06:57 +03:00
Cyrill Gorcunov
afd8d2f11a test: nasm-t -- Test for sigsegv on multiple outputs
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-24 12:12:15 +03:00
Cyrill Gorcunov
69f77d5c34 test: nasm-t -- Add br3392528
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-14 10:26:26 +03:00
Cyrill Gorcunov
fcc85aeef7 test: nasm-t -- Extend inctest
To address https://bugzilla.nasm.us/show_bug.cgi?id=3392527

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-12 23:28:18 +03:00
Cyrill Gorcunov
7373a8e606 test: nasm-t -- Add br560575
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-11 21:43:46 +03:00
Cyrill Gorcunov
9354f72a41 test: nasm-t -- Add br978756
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-11 21:43:46 +03:00
Cyrill Gorcunov
634b0e405b test: nasm-t -- Add br3392259
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-11 21:43:46 +03:00
Cyrill Gorcunov
f9e3e8168b test: nasm-t -- Add br3392252
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-11 21:43:46 +03:00
Cyrill Gorcunov
6fcb91cbc1 test: nasm-t -- Add br3200749
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-11 21:43:46 +03:00
Cyrill Gorcunov
3d5195704d test: nasm-t -- Add br3385573
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-11 21:43:46 +03:00
Cyrill Gorcunov
e8d773c578 test: nasm-t -- Add br3189064
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-11 21:43:46 +03:00
Cyrill Gorcunov
679a470aa7 test: nasm-t -- Add br3187743
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-11 21:43:46 +03:00
Cyrill Gorcunov
f4c33801a2 test: nasm-t -- Add br3174983
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-11 21:43:46 +03:00
Cyrill Gorcunov
a138610100 test: nasm-t -- Add br3109604
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-11 21:43:46 +03:00
Cyrill Gorcunov
323f5ae765 test: nasm-t -- Add br3066383
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-11 21:43:46 +03:00
Cyrill Gorcunov
27fe12d46e test: nasm-t -- Add br3058845
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-11 21:43:46 +03:00
Cyrill Gorcunov
3402778330 test: nasm-t -- Add br3041451
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-11 21:43:46 +03:00
Cyrill Gorcunov
0feb41b087 test: nasm-t -- Add br3028880
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-11 21:43:46 +03:00
Cyrill Gorcunov
0f26c1ec54 test: nasm-t -- Add ability to pass environ variables to test
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-11 21:43:46 +03:00
Cyrill Gorcunov
292d728974 test: nasm-t -- Add br3026808
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-11 21:43:46 +03:00
Cyrill Gorcunov
7c37fae21d test: nasm-t -- Add br890790
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-11 21:43:46 +03:00
Cyrill Gorcunov
6ad457d6f8 test: nasm-t -- Add br2222615
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-11 21:43:46 +03:00
Cyrill Gorcunov
c51934e40f test: nasm-t -- Add nasmformat
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-11 21:43:46 +03:00
Cyrill Gorcunov
7af13e0466 test: nasm-t -- Add multisection
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-11 21:43:46 +03:00
Cyrill Gorcunov
7fd2389637 test: nasm-t -- Add macro-defaults
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-11 21:43:46 +03:00
Cyrill Gorcunov
fa747e71a8 test: nasm-t -- Add lnxhello
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-11 21:43:46 +03:00
Cyrill Gorcunov
88ef14eed8 test: nasm-t -- Add ifelse
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-11 21:43:46 +03:00
Cyrill Gorcunov
b93462b8f7 test: nasm-t -- Add expimp
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-11-11 21:43:46 +03:00