Commit graph

719 commits

Author SHA1 Message Date
H. Peter Anvin
99d3342033 doc: make it clearer than -O0 and -O1 are almost never useful
-Ox is the default, and the preferred mode for almost all users.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-04-12 11:08:37 -07:00
H. Peter Anvin
6f44296adc doc: get rid of some unnecessarily wordy option descriptions
Some options had unnecessarily wordy titles. Also change Make ->
\c{make}.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-04-12 11:06:03 -07:00
H. Peter Anvin
1ad669bf06 nasmdoc.css: simplify some media queries
Some media queries were needlessly complicated and misinterpreted by
some browsers.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-04-04 15:15:05 -07:00
H. Peter Anvin
b11cd3a426 warnings: more improvements to warnings generation
Try to better sort out the necessary dependencies for warning
generation.

Fix regex for cleaning up nasmdoc markup: nasmdoc markup does not
nest, although it may include \} sequences.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-04-04 14:18:34 -07:00
H. Peter Anvin
33ef63669c doc: improve some formatting, mostly of the warning list
Fix some formatting markups, especially with regards to warnings.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-04-04 12:58:32 -07:00
H. Peter Anvin
e55c571af4 doc: release notes for 2.16.02
Release notes for 2.16.02 to prepare for imminent release.
2024-04-04 12:56:43 -07:00
H. Peter Anvin
9f83c383e4 preproc, %map(): require second colon, update documentation
Require the second colon before the grouped parameter count; otherwise
the syntax is ambiguous since an expression can start with (.

Update/complete the documentation and the examples.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2023-10-16 13:42:16 -07:00
H. Peter Anvin
34eefd3803 preproc: add %map() function and radix specifiers
Add the %map() function which can apply arguments to a macro from a
list.

Allow the user to specify the desired radix for an evaluated
parameter. It doesn't make any direct difference, but can be nice for
debugging or turning into strings.

As part of this, split expand_one_smacro() into two parts: parameter
parsing and macro expansion. This is a very straightforward splitting
of two mostly unrelated pieces of functionality.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2023-10-15 22:43:28 -07:00
H. Peter Anvin
bab37b3501 doc: %hex() is not a chapter!
%hex() is a subsection, not a chapter. Oops!

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2023-10-13 21:33:25 -07:00
H. Peter Anvin
94b053a59c doc: one instance of a __foo__ macro didn't get updated to __?foo?__
__USE_package__ should be __?USE_package?__.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2023-10-13 21:28:36 -07:00
H. Peter Anvin
432ea5b2b0 doc: editorial changes
Fix a few typos and poor grammar.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2023-10-13 21:25:48 -07:00
H. Peter Anvin
2a5c87362b doc: one more correction to the Dx syntax grammar
The commas in the lists are literal commas.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2023-10-13 21:15:25 -07:00
H. Peter Anvin
d7d51e39ce doc: correct a minor problem in the grammar for Dx statements
The production "value := type value" was not correct; should have been
"type atom", which can be merged with the "atom" production to "[type]
atom".

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2023-10-13 21:10:59 -07:00
H. Peter Anvin
dcac46d973 preproc: add options for a base prefix to %num(), add %hex()
Make it possible to add a base prefix to %num().

Add the %hex() function, producing hexadecimal values that are
nevertheless valid NASM numeric constants.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2023-10-13 17:50:55 -07:00
H. Peter Anvin
156b61b614 doc: correct %expr -> %eval
%expr() was a pre-release development name for this function, however,
the released name is %eval().

See BR 3392837.

Reported-by: Michael <mikar_gibbros@yahoo.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2023-10-13 17:14:11 -07:00
H. Peter Anvin
6198a2396c doc: slightly more wordsmithing
Tidy up the new text for the bin format a little more.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2023-10-13 17:09:25 -07:00
H. Peter Anvin
d31dca5860 doc: be more clear than .bin is simply a linker built into NASM
.bin really is nothing other than a linker built into NASM. Make that
very very clear to users.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2023-10-13 17:05:53 -07:00
H. Peter Anvin
8ce37daeea doc/changes.src: update to reflect current state
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2023-02-19 21:28:49 -08:00
H. Peter Anvin
7e80d6b834 Make: handle warning files while building in a directory
The dependency on the warning files breaks when we are building in a
directory *and* the files already exist from being shipped with the
distribution tarballs. The make VPATH simply isn't sophisticated
enough to deal with it, so let the C compiler handle it by #including
the generated file from a dummy C file.

Reported-by: Rudi Heitbaum <rudi@heitbaum.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2023-01-17 13:05:55 -08:00
H. Peter Anvin
8d5d663607 doc: html: add Chapter 1 to navbar in the TOC
Add Chapter 1 to the navbar for the table of contents, for ease of
sequentially reading the whole document.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-12-21 18:35:17 -08:00
H. Peter Anvin
b67d42380c doc: fix HTML table of contents generation
Fix the HTML table of contents being completely broken.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-12-21 18:23:27 -08:00
H. Peter Anvin
9607c6685f doc/changes.src: document obj segment fix
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-12-07 10:55:20 -08:00
H. Peter Anvin
55dc058356 Document CPU LATEVEX, add CPU EVEX and CPU VEX flags
Document CPU LATEVEX and the associated prefixes; add CPU EVEX and CPU
VEX flags to further control encodings.

Fix the error message for invalid encodings due to flags.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-12-07 10:11:21 -08:00
H. Peter Anvin
d3afc5c1d7 doc: bring doc/changes.src up to date
Bring doc/changes.src up to date with the current status of tree in
preparation for the 2.16 release.

Note that no 2.15.06 release ever was produced.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-11-23 14:35:04 -08:00
H. Peter Anvin
516fbba03e preproc: add conditional-string smacro parameters; simplify functions
Add the option of having strings only conditionally quoted (&&) -- do
not quote an already quoted string again -- as opposed to always
quoting a string.

This makes a lot of the string functions way simpler to implement, and
removes the need to share ad hoc parsing code with directives.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-11-21 10:54:19 -08:00
H. Peter Anvin
36cd305ade preproc: add %abs(), modify %num(), refactor
Add the %abs() function, to produce the absolute value as an
always-positive decimal constant.

Change the order of the arguments for %num().

Refactor the handling of optional arguments, to reduce the amount of
redundant code. This is currently only used for builtin functions, but
might be extended in the future.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-11-17 15:29:10 -08:00
H. Peter Anvin
e7dd0e8e3f doc: document the %num() function
Add documentation for the %num() preprocessor function.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-11-15 17:13:22 -08:00
H. Peter Anvin
664a79473d preproc: add %count() function
Add %count(), giving a count of the number of arguments.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-11-14 01:48:38 -08:00
H. Peter Anvin
02384ec6ac doc: add clarification to %sel()
Add clarification that %sel(), like %cond(), never expands
non-selected arguments.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-11-13 23:02:05 -08:00
H. Peter Anvin
d9b36e3c9c preproc: implement the %cond() and %sel() functions; fix memory leak
Implement the %cond() and %sel() functions that expand to a specific
one of the arguments. %cond(x,y,z) is basically a shorthand for
%sel(2-!(x),y,z) used when x is a boolean condition.

Fix a memory leak in %strcat and %strlen.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-11-13 22:59:16 -08:00
H. Peter Anvin
8de66e9a50 doc: replace %define with %xdefine in some preproc function examples
In some of the preprocessor function examples, actually enforce
equivalence by using %xdefine in the function examples so the
expansion is at definition time.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-11-13 21:11:11 -08:00
H. Peter Anvin
392b2b18a0 doc: document preprocessor functions
Add documentation for preprocessor functions, as well as the flow of
preprocessor expansion.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-11-11 20:25:49 -08:00
H. Peter Anvin
a5d0284634 doc: improve the HTML index readability
Make the HTML index more like what you would expect an index to look
like.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-11-09 21:37:16 -08:00
H. Peter Anvin
df243389e0 doc/changes.src: begin changes.src for 2.16
Once again, need to write these damned release notes.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-11-09 19:04:01 -08:00
H. Peter Anvin
5219d14e6f doc: don't include "chapter", "section" etc in the HTML index
The use of statements like "chapter", "section" and so on makes the
HTML index insanely verbose. Remove them; they don't add any
information.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-11-09 19:02:56 -08:00
H. Peter Anvin
f7163e343c doc: allow replicated index entries (\IR), make index sorting smarter
Allow a single index entry key to be defined with \IR more than once,
generating multiple entries in the index; this is really useful for
example to always generate "macros, single-line" and "single-line
macros" entries sorted at different places.

Be smarter about sorting the index: sort (nearly) all special
characters before alphanumerics, and (attempt to) sort numbers in
numerical order rather than alphabetical (so BITS8 sorts before
BITS16).

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-11-09 18:38:45 -08:00
H. Peter Anvin
7727fbb59a doc: move instruction list to the end
The web site currently assumes that the release history is always in
appendix C. Humor it for now, besides, it doesn't really make sense
for the huge machine-generated instruction list to be anywhere but the
end.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-11-08 18:40:11 -08:00
H. Peter Anvin
caffd140c0 asm: factor out more warnings into warning classes
Hopefully we'll eventually get rid of WARN_OTHER completely...

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-11-08 17:50:45 -08:00
H. Peter Anvin
a5fc643cb9 doc/genps.pl: handle large lists of index entries
If a list of index entries is so long that the whole list can't fit
onto a single page, we *have* to break it. Treat the hanging-comma
line as a potential widow, but allow column breaks elsewhere in the
list.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-11-08 15:24:24 -08:00
H. Peter Anvin
d77a86b666 psfonts.ph: add more font aliases
Add a bunch more aliases for various fonts. Apparently this really can
be in flux.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-11-08 15:12:31 -08:00
H. Peter Anvin
3f08242752 Merge remote-tracking branch 'chengzhycn/fix/fonts' 2022-11-07 16:52:02 -08:00
H. Peter Anvin
93548c2de2 rdoff: kill it off
RDOFF has been deprecated as it has unfixable problems, and has been
announced that it will be killed off in NASM 2.16.

This deletes it once and for all.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-11-07 16:49:13 -08:00
H. Peter Anvin
b18e870d90 Merge remote-tracking branch 'ElyesH/typos' 2022-11-07 12:39:44 -08:00
Kai Burghardt
d88660fc1e
document %imacro%unimacro (case-insensitive)
There is no documentation of the `%unimacro` directive.
This is particularly confusing when you’re trying to remove a macro
that has previously been defined with the `%imacro` directive.
2022-10-09 19:24:41 +00:00
chengzhycn
b972792938 fix/doc: correct SourceCodePro and SourceSansPro fonts' names
Signed-off-by: chengzhycn <chengzhycn@gmail.com>
2022-02-15 17:40:20 +08:00
Elyes HAOUAS
cdf7ad02c2 Fix some typos
while on it, remove unneeded white spaces.

Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
2022-01-09 17:34:35 +01:00
Igor Glucksmann
3f9fc2a3a7 docs: Update comdat section attribute
Signed-off-by: "Glücksmann, Igor" <igor.glucksmann@avast.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2021-12-17 23:45:51 +03:00
Cyrill Gorcunov
e7c2f0e51c doc/changes: Document rdf header fix
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-10-10 13:36:54 +03:00
H. Peter Anvin (Intel)
52848e8aba doc: improve documentation of %ifid et al
Clarify some of the semantics of %ifid, %ifnum, and %ifstr.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2020-09-11 16:28:57 -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