0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-10-10 00:25:06 -04:00
Commit Graph

5391 Commits

Author SHA1 Message Date
H. Peter Anvin
01e40a9aeb Move editor help files to editors/, add NASM version number
Move the editor help files (currently nasmtok.el) to the editors/
subdirectory in anticipation of having more such files.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-02 13:49:43 -07:00
H. Peter Anvin
959644a017 msvc.mak: make sure perl is only run if it exists
Only try to run a Perl interpreter if the system actually has one
available. Because timestamps on Windows are apparently not preserved
on archive extraction, otherwise it might happen that nmake will try
to rebuild files even through they already exist.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-01 19:36:22 -07:00
H. Peter Anvin
03391e61ec nasmtok.el: include builtin macros and macro functions
Use a really hacky way to run the NASM binary and extract automatic
builtin macros. As this is not something normally supported during the
NASM build process, the output is canned and will need to be run
manually.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-01 16:06:40 -07:00
H. Peter Anvin
094cc54cd3 emacstbl.pl: extract build-in macro names
Extract builtin macro names into emacstbl.pl, and avoid duplicated
tokens.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-01 15:11:40 -07:00
H. Peter Anvin
869935edfd Merge remote-tracking branch 'emacstbl/emacstbl-footer'
Resolved Conflicts:
	misc/emacstbl.pl

This also reverts the token names to the version without the -token-
infix.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-01 14:35:14 -07:00
H. Peter Anvin
d021e86def NASM 3.00rc18 nasm-3.00rc18 2025-10-01 14:25:54 -07:00
H. Peter Anvin
72118a9ff6 emacstbl.pl: a few minor tweaks to the emacs token table generator
Hopefully this will be useful to someone.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-01 14:25:04 -07:00
H. Peter Anvin
0b3c971f5b portability: "const macros_t" is redundant
Some C compilers don't like that...

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-01 13:55:38 -07:00
H. Peter Anvin
dfacf9a3d7 Makefiles: remove warnings generation from auxiliary Makefiles
The .time trick doesn't seem to work in general, and auxiliary
Makefiles aren't guaranteed to build modified sources anyway.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-01 13:55:33 -07:00
H. Peter Anvin
205512f3c0 Makefile: a few more portability improvements
Define macros for generating an empty file and for a dummy (side
effect) target.

Tweak MSVC compiler options.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-01 13:55:07 -07:00
H. Peter Anvin
a54a902f4e Makefile: unbreak msvc.mak
With these changes msvc.mak works on Visual Studio 2022.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-01 13:54:04 -07:00
H. Peter Anvin
80cea0baa3 mkdep.pl: don't get confused by messed up line endings
Just strip any whitespace at the end of a line.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-01 13:53:20 -07:00
H. Peter Anvin
37d8ee5768 nasmlib/rlimit.c: fix broken comment
A comment that apparently was mangled during SPDX conversion.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-01 13:53:05 -07:00
H. Peter Anvin
4acc3dbccc Fix more license headers 2025-10-01 12:05:34 -07:00
H. Peter Anvin
85a8d85174 tools/spdx.pl: use the same format SPDX header ;)
The tool that fixes the files wasn't fixed...

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-01 11:49:23 -07:00
H. Peter Anvin
c811a80700 tools: sync the "cleanfile" and "cleanpatch" with Linux
Sync the "cleanfile" and "cleanpatch" scripts with the versions from
the Linux kernel.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-01 11:46:06 -07:00
H. Peter Anvin
23ce05f906 treewide: replace verbose copyright headers with SPDX tags
SPDX is an international standard for documenting software license
requirements. Remove the existing headers and replace with a brief
SPDX preamble.

See: https://spdx.dev/use/specifications/

The script used to convert the files is added to "tools", and the
file header templates in headers/ are updated.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-01 11:45:31 -07:00
H. Peter Anvin
ee85248e85 version.pl: strip ALL whitespace
Strip all whitespace from version.pl input, in case combinations of
tools causes stray \r or other whitespace characters (which has been
observed.)

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-01 11:20:05 -07:00
H. Peter Anvin
f8680b2b45 NASM 3.00rc17 nasm-3.00rc17 2025-09-30 15:20:48 -07:00
H. Peter Anvin
aa1306c308 ffmpegtest: save the results in a file
Save the result output to a file.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-30 15:19:56 -07:00
H. Peter Anvin
981740c7a1 ffmpegtest: don't redo the whole compile every time
Don't redo the whole clone and compile if one wants to re-run the
test. Only rebuild the NASM files.

Minor script cleanups.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-30 14:30:04 -07:00
H. Peter Anvin
48f7170772 insns.pl: sanity-check that instruction encodings match operands
Error out if an encoding position is invalid, like an "r" operand
matches an "xmmrm" operand.

Document the instruction encoding symbols; there are too many of them
by now.

Add symbols 'n' and 'w' meaning immediates that are supposed to be
encoded as if they were 'm' memory addresses and 'v' register numbers,
respectively; this is necessary to indicate a validation exception.

Remove broken ARPL "memory-like" encoding. It probably never worked
anyway.

This verification caught two bugs already:

- VPMASKMOV[DQ] cannot omit the second operand.

- Incorrect operand encoding order for VREDUCESH.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-30 12:06:11 -07:00
H. Peter Anvin
54547eba35 Merge remote-tracking branch 'yongjie/master' 2025-09-30 09:47:53 -07:00
H. Peter Anvin
595afc6f4b portability: add missing PRI* constants, signed 1 in bitfield hack
Add missing uses of PRI constants.

Create a PRI constant for size_t, since %z isn't available on all
platforms. Notably, the legacy Windows runtime needs %I instead of %z.
Use that on UCRT as well, since there doesn't seem to be a way to
determine if you are compiling for MSVCRT or UCRT.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-30 09:41:03 -07:00
Yongjie Sheng
95095b325c add few more avx10.2 convert instructions 2025-09-30 23:29:30 +08:00
Yongjie2017
3095ce61f8 Merge pull request #2 from Yongjie2018/master
Update vmovd and vmovw operand sequence
2025-09-30 14:37:13 +08:00
Sheng, Yongjie
f350ad1f4b Update vmovd and vmovw operand sequence 2025-09-30 15:34:08 +01:00
Sheng, Yongjie
4e7fdc1d62 update travis test for vextract instruction family 2025-09-30 14:47:10 +01:00
Yongjie2017
f513a44f27 Merge pull request #1 from Yongjie2018/master
update travis test for vextract instruction family
2025-09-30 13:49:37 +08:00
Yongjie2017
24557c4128 Merge branch 'netwide-assembler:master' into master 2025-09-30 13:47:51 +08:00
H. Peter Anvin
1185c1f118 Document the [LIST] directive and add -LF option to suppress it
- Document the [LIST] directive
- Add an option -LF to ignore the [LIST] directive
- Fix [LIST -] suppressing output on a following pass
- Minor other documentation fixes

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-29 21:48:43 -07:00
Yongjie2017
e6d7fcc62a Merge branch 'netwide-assembler:master' into master 2025-09-30 11:54:39 +08:00
H. Peter Anvin
df4bb50e23 changes.src: add %use vtern to the release notes
One more thing for the release notes...

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-29 20:51:45 -07:00
H. Peter Anvin
f7e91f7868 doc: document %use vtern, minor tidying of the syntax chapter
Document the "vtern" macro package, and do some quite minor tidying of
the syntax chapter.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-29 20:47:18 -07:00
H. Peter Anvin
ca0ceeb546 doc: switch from Adobe Source to Google Roboto
The NASM webpage is already using Roboto, and looks more legible in
the end.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-29 18:52:01 -07:00
Yongjie2017
c33fd34969 Correct operands sequence for VEXTRACT instruction family 2025-09-30 09:34:07 +08:00
Yongjie2017
9f4e8b95c4 Merge branch 'netwide-assembler:master' into master 2025-09-30 08:50:02 +08:00
H. Peter Anvin
36f4c324d0 doc: add more space after the section numbers in HTML
Use an &ensp; instead of a regular space, and add a period.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-29 17:36:04 -07:00
H. Peter Anvin
22cef23b34 macros: add st() macro to the masm macro package
A very easy way to improve portability.  Guarded with %ifndef just in
case...

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-29 17:31:42 -07:00
H. Peter Anvin
b80bec7435 doc: "MS-DOS" isn't a literal keyword, don't use \c{}
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-29 17:26:17 -07:00
H. Peter Anvin
cf538e23dd doc: tweak the HTML look of fixed text
Go for 90% rather than 80% size;
For inline (code) tags make font bold.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-29 17:22:56 -07:00
H. Peter Anvin
7582ebb22a doc: more HTML formatting hacks
Make the titles look nicer...

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-29 17:15:43 -07:00
H. Peter Anvin
6a8b135389 NASM 3.00rc16 nasm-3.00rc16 2025-09-29 16:34:41 -07:00
H. Peter Anvin
55b179ef37 doc: add a few more items to the clean target
Add a few more things that should be cleaned up when making the
documentation...

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-29 16:30:57 -07:00
H. Peter Anvin
12f6270124 asm: better error messages for missing instructions
The assembler can't know if something is a colonless label or a
misspelled instruction, so print both when complaining about a missing
instruction.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-29 16:09:04 -07:00
H. Peter Anvin
fec865e75e macros: add a %use vtern macro package for ternary logic
A very simple %use package to support the ternary logic
instructions.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-29 15:51:23 -07:00
H. Peter Anvin
33f309c886 Merge remote-tracking branch 'maciej/apx.wip.for-hpa' 2025-09-29 15:30:13 -07:00
H. Peter Anvin
c67b688f37 doc: more HTML compliance and prettification work 2025-09-29 14:31:24 -07:00
H. Peter Anvin
0e253844da doc: prettify the HTML documentation
- Improve the look of the TOC
- Add some highlight to code blocks

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-29 11:28:12 -07:00
Maciej Wieczor-Retman
c5f7fb183a insns: Move NOP and HINT_NOP at the end of the file
For disassembler to work correctly NOPs should be at the very end of the
database file.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
2025-09-29 17:17:39 +02:00