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

5488 Commits

Author SHA1 Message Date
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
yjh-styx
ad0a206964 Merge branch 'netwide-assembler:master' into master 2025-10-01 23:04:07 +03: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
Iouri Kharon
eb4e4470cc Absent command 'BTS' (typo?) 2025-10-01 11:08:18 +03: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
Maciej Wieczor-Retman
7db0df3a2d doc: Call/Jump subchapter and far call syntax
Start the subchapter on jmp and call syntax summary. Move the far call
syntax paragraph from language chapter to the syntax chapter.

Add a couple of paragraphs about possible syntaxes of the jump/call
instructions.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
2025-09-29 15:08:04 +02:00
Maciej Wieczor-Retman
6cf6693fda doc: Add subchapter on NDS/NDD compact syntax
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
2025-09-29 15:07:35 +02:00
Maciej Wieczor-Retman
9abbc4aa41 doc: 64 bit moffs in the syntax chapter
Mention 64 bit moffs and link to the section in the 64-bit chapter.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
2025-09-29 15:05:42 +02:00
Maciej Wieczor-Retman
1653419dde doc: Move the split EA note to the syntax chapter
Add a split EA subchapter to the syntax chapter end remove it from the
language chapter, leaving a hyperlink to the new location.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
2025-09-29 15:03:46 +02:00
Maciej Wieczor-Retman
b48741a833 doc: Add note on lack of syntax for the ternary logic instruction
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
2025-09-29 14:59:57 +02:00
Yongjie Sheng
1838e46786 add ffmpeg test 2025-09-28 21:47:44 +08:00
Maciej Wieczor-Retman
9eb39f7ff6 doc: Move APX doc to the syntax doc
The syntax chapter is supposed to be about concepts or instructions that
either have a lot of different syntaxes or new/odd ones.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
2025-09-26 22:12:40 +02:00