Commit Graph

3453 Commits

Author SHA1 Message Date
H. Peter Anvin
92ae33b1b3 nsis: use /solid compression for smaller size
Use /solid compression for smaller size.  By default nsis compresses
one file at a time (like .zip default), as opposed to the whole data
block (.tar.gz).  The latter gives significantly better compression,
so use it.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-07 11:05:09 -07:00
H. Peter Anvin
bdbaaa207c doc: clean up the instruction list in the documentation slightly
Compactify the instruction list in the documentation to have fewer
margin violations, and fix some of the headings (;#).

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-07 09:51:24 -07:00
H. Peter Anvin
9d045cd787 NASM 2.13rc16 2017-04-06 23:44:49 -07:00
H. Peter Anvin
717695f440 Makefile.in: add $(X) to the list of suffixes
If $(X) is not empty, it needs to be added as a suffix, otherwise the
rule .$(O)$(X) won't do anything at all.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-06 23:33:42 -07:00
H. Peter Anvin
910ae64b31 Makefile.in: more fixes to rdoff commands
The rdoff command links are cantankeous.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-06 23:18:36 -07:00
H. Peter Anvin
844bf15e77 NASM 2.13rc15 2017-04-06 22:49:17 -07:00
H. Peter Anvin
28b9f7a9c2 Makefile.in: fix install_rdf some more...
Apparently I have a hard time getting this right today.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-06 22:48:42 -07:00
H. Peter Anvin
60e86870f4 NASM 2.13rc14 2017-04-06 22:43:45 -07:00
H. Peter Anvin
3a864c1670 Makefile.in: missing \ broke "make install_rdf"
A missing backslash broke "make install_rdf", and therefore broke the
build robot.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-06 22:42:44 -07:00
H. Peter Anvin
bc3b010954 NASM 2.13rc13 2017-04-06 22:37:24 -07:00
H. Peter Anvin
69c10c9692 nsis: show a warning message if we are not privileged
Apparently with newer versions of Windows, a program cannot
be forced-run as administrator without being signed.  Instead,
if we aren't administrator, show a message box rather than confusing
the user.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-06 22:33:04 -07:00
H. Peter Anvin
3d823faeea nsis: finally figure out how to get the proper install directory stuff...
I had fixed MultiUser.nsh, but it turns out that the builtin version
has higher priority, so we kept picking that one up...

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-06 21:17:13 -07:00
H. Peter Anvin
704d9b151d NASM 2.13rc12 2017-04-06 20:39:34 -07:00
H. Peter Anvin
cb52d49a45 doc: complete removal of unnecessary moves
Make the tool write the output (especially HTML) in a specified
subdirectory directly, and make the tool create the subdirectory if it
doesn't already exists.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-06 20:33:39 -07:00
H. Peter Anvin
77f4395247 msvc: finally make it possible to build the full Windows package
Finally make it possible to build the full Windows install package
with MSVC tools.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-06 20:20:04 -07:00
H. Peter Anvin
d31a86e5b1 doc: don't bother using autoconf to search for pdf tools
We have separate invocations for the various PDF tools anyway.  It
generates a slightly annoying error message, but makes some other
things a little easier.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-06 19:38:38 -07:00
H. Peter Anvin
c5b2916884 changes.src: bring up to date
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-06 19:10:57 -07:00
H. Peter Anvin
c3ec2e3881 NASM 2.13rc11 2017-04-06 18:53:23 -07:00
H. Peter Anvin
e83311c73d BR 3392396: fix EVEX compressed displacements
The fvm: annotation to generate the correct EVEX compressed
displacements had inadvertently gotten dropped from a handful of
instructions in checkin c33d95fde9:

BR 3392370: {z} decorator allowed on MOVDQ* memory operands

Put them back, and verify they work.

Reported-by: Henrik <henrik@gramner.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-06 18:52:08 -07:00
H. Peter Anvin
dd26697412 Makefile.in: fix dumb mistakes
Fix a few dumb but serious mistables in Makefile.in that prevented
anything from actually getting linked.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-06 18:42:39 -07:00
H. Peter Anvin
d7642a4a26 msvc.mak: finally make work with shared rdoff rules
We can finally make the shared rdoff rules work.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-06 18:18:11 -07:00
H. Peter Anvin
f05413eb61 Makefile.in: make rules for rdoff only define dependencies
MSVC command-line syntax doesn't allow us to share these rules if
explicit.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-06 18:10:29 -07:00
H. Peter Anvin
070508a5ae Makefile.in: make rules for rdoff only define dependencies
MSVC command-line syntax doesn't allow us to share these rules if
explicit.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-06 18:08:43 -07:00
H. Peter Anvin
5d2e42e621 Merge branch 'master' of ssh://repo.or.cz/nasm 2017-04-06 17:25:35 -07:00
H. Peter Anvin
9a714c98a2 rdoff: move rdoff build into main Makefile to make it build on Windows
NSIS packages rdoff, and we really want to be able to build the full
NSIS package on an MSVC platform.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-06 17:24:03 -07:00
H. Peter Anvin
cb8094a954 nsis: error out if getpearch.pl can't figure out what we need
Error out instead of failing silently in getpearch.pl

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-06 17:14:10 -07:00
H. Peter Anvin
63f68f5ea3 Merge branch 'master' of ssh://repo.or.cz/nasm 2017-04-06 16:31:39 -07:00
H. Peter Anvin
79570527b3 nsis: newer versions of NSIS uses \ for paths even on Unix
It seems that we have to use \ for paths on native Windows, and it
works on Unix as well, so just change all the paths accordingly.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-06 16:28:59 -07:00
H. Peter Anvin
c822585e77 getpearch.pl: the PE header offset may be > 255
The PE header offset field is not a byte; assume it is a long.  The
specification doesn't actually say...

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-06 16:20:50 -07:00
H. Peter Anvin
913394d52f Merge branch 'master' of ssh://repo.or.cz/nasm 2017-04-06 15:57:21 -07:00
H. Peter Anvin
3118429089 Windows: clean up the handling of stat on Windows
[f]stat on Windows is messy: we need to use _stati64 for maximum
compatibility, but because there is a bunch of stuff wrapped in
macros, autoconf sometimes gets the wrong answers.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-06 15:48:51 -07:00
H. Peter Anvin
0da1549b73 autoconf: fix handling of --enable/--disable options, WINE fix
AC_ARG_ENABLE() doesn't really work the way you expect: one argument
is called on *any* invocation.  Create simple helper wrappers to get
the effect we really want for boolean options.

Define WINELOADER=/dev/null to prevent autoconf from inadvertently
running Wine and think we are not cross-compiling even if we are.  It
is at the very best slow and buys us absolutely nothing.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-06 15:48:45 -07:00
H. Peter Anvin
c01af0967e msvc: define no_return
The syntax for no_return on MSVC is "__declspec(noreturn) void".

Signed-off-by: H. Peter Anvin <h.peter.anvin@intel.com>
2017-04-06 13:51:32 -07:00
H. Peter Anvin
3646e7dde0 BR 3392399: float: get rid of bogus exponent calculation
It turns out that the calculation of "twopwr" in ieee_flconvert_bin()
was more complex than necessary, and wrong in the case of a pure
fraction.

Reported-by: Roel <roelsuidgeest@zonnet.nl>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-05 21:47:20 -07:00
H. Peter Anvin
90cc4154ae BR 3392397: WMAKE uses a nonstandard syntax for phony targets
The standard syntax for a phony target in Make is:

target: <dependencies>

.PHONY: target

... however, Watcom WMAKE seems to use

target: <dependencies> .SYMBOLIC

and furthermore, seems to *require* it.  Therefore, remove the
"perlreq" target from the automatically distributed region and move it
into the specific region; it should not need to change anyway since
the PERLREQ list itself is still synced.

If it was only a matter of the .SYMBOLIC versus .PHONY token it would
be easy enough to change that in syncfiles.pl, but this syntax change
is big enough that it doesn't make enough sense to worry about.

Reported-by: sezero <sezero@users.sourceforge.net>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-05 21:24:55 -07:00
H. Peter Anvin
675e7b7d79 MSVC compatibility: clean up the handling of _stati64/_fstati64
On Windows we need to use _stati64/_fstati64 in order to handle large
file sizes, but the handling was broken in the canned MSVC++
configuration.  Clean it up and fix it.

This addresses BR 3392398.

Reported-by: Nikolai Saoukh <nms@otdel-1.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-05 21:19:03 -07:00
Nikolai Saoukh
9546507861 BR 3392395: unbreak msvc.mak build due to a stray backslash
Extra backslash had eaten one innocent line, thus compiler flags
(ALL_CFLAGS) are gone.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-05 20:58:42 -07:00
H. Peter Anvin
6c48b42466 Mkfiles: harmonize how perl and (if available) makensis is run
Use the same macros to run Perl and makensis across all Makefiles.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-03 11:23:31 -07:00
H. Peter Anvin
14858d7343 Makefiles: distribute file generation rules via syncfiles.pl
Distribute the file generation rules to auxiliary Makefiles via
syncfiles.pl.  These rules are OS- and Make-dialect-generic enough
that our mangling script handles them well enough.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-03 11:13:29 -07:00
H. Peter Anvin
1ebc83bd41 Mkfiles: remove unsupported Mkfiles/netware.mak
If someone really, really care about building NASM for Netware(!)
anymore, then they probably can use the autoconf-driven build script.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-03 11:12:20 -07:00
H. Peter Anvin
2956abbbf9 syncfiles.pl: allow for multiple synced sections
Allow for multiple sections of Makefiles to be synchronized; the
intent is to use this to synchronize the Perl file generation rules.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-03 11:10:31 -07:00
H. Peter Anvin
526a6c7390 Rename insns-iflags.pl -> insns-iflags.ph, add missing dependency
insns-iflags.ph is included from another Perl script, so rename it .ph
(Perl header).  Add missing dependency to the main Makefile.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-03 10:33:12 -07:00
H. Peter Anvin
5253f58c36 Add generic perfect string hashes, use for directives
Add a generic facility for generating perfect string hashes, where all
that is needed is an enum and a string table.  The existing mechanism
using a custom Perl script wrapped around a module continues to be
available for any use case where this particular approach isn't
sophisticated enough.

Much of this patch comes from renaming "enum directives" to "enum
directive" as a result of the string hash generator expecting a set of
uniform naming conventions.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-03 00:27:07 -07:00
H. Peter Anvin
b1a5b26477 doc/changes.src: document AVX-512 fixes, Perl version requirement
It has been time to move on to new versions of Perl for a long time.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-02 19:45:35 -07:00
H. Peter Anvin
841d904f88 perl: change to the new, safer 3-operand form of open()
The 2-operand form was inherently unsafe.  Use the 3-operand form
instead, which guarantees that arbitrary filenames are supported.

This also means we can remove a few instances of sysopen() which was
used for exactly this reason, however, at least in theory sysopen()
isn't portable.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-02 19:36:41 -07:00
H. Peter Anvin
dd535a6d19 NASM 2.13rc10 2017-04-02 19:12:25 -07:00
H. Peter Anvin
aac01ff479 Always remove a stale list file
Remove the list file before running the first pass, so in case we
die before running pass 2 then there won't be a stale list file
sitting around.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-02 19:11:40 -07:00
H. Peter Anvin
8f62246560 Further improve error messages for confused decorators
Try to generate more sensible error messages for bogus combinations
of decorators.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-02 19:02:29 -07:00
H. Peter Anvin
8e37ff4ea1 BR3392392: fix broadcast decorators and improve error messages
Checkin c33d95fde9:
    BR 3392370: {z} decorator allowed on MOVDQ* memory operands

... inadvertently broke broadcast operations, which only apply to
memory operands and therefore were only handled in one of the two
brace-parser implementations.  Fix that.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-02 18:38:58 -07:00
H. Peter Anvin
e886c0e968 Change nasm_zero() to pass an object, not a pointer
Passing an object to nasm_zero() allows us to use it on arrays.
Otherwise the array will decay to a pointer and silently clear only
the first member of the array!

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-03-31 14:56:17 -07:00