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

98 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
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
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
4acc3dbccc Fix more license headers 2025-10-01 12:05:34 -07:00
H. Peter Anvin
6c105cea3b Improve misc/omfdump, add misc/Makefile, use -std=c23 if possible
- Add improvements to omfdump from Bernd Böckmann.

- Add misc/Makefile with option to install omfdump and auxiliary NASM
  data files.

- Use compiler.h and friends in the misc directory.

- Use -std=c23 if the C compiler supports it.

Cc: Bernd Boeckmann <bernd-github@boeckmann.io>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2025-09-03 10:05:21 -07:00
8dcc
8545d631d6 emacstbl.pl: Add proper header and footer 2025-03-20 18:54:12 +01:00
H. Peter Anvin
a7b1f26057 misc/omfdump: #include <string.h>
Add missing <string.h> include.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2023-10-16 16:53:35 -07:00
H. Peter Anvin
4d9c102e44 Nindent: modernize (greatly simplify) and move to tools/ 2023-10-12 14:28:58 -07:00
H. Peter Anvin
2d5cf17130 misc/emacstbl.pl: add NASM version to output, add to Makefile
Include the version number in the output (misc/nasmtok.el) and add a
rule for generating it to the Makefiles.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-11-17 12:52:52 -08:00
H. Peter Anvin
b58771d827 misc/emacstbl.el: script to produce token lists for an emacs mode
Add a simple script to auto-generate token lists for an emacs major
mode, e.g. https://github.com/skeeto/nasm-mode

It is recommended to use "require" this file separately from the main
code, so it can be automatically kept up to date.

If this ends up being used, I will include the generated result in the
NASM release distribution.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-11-17 11:50:03 -08:00
H. Peter Anvin
b18e870d90 Merge remote-tracking branch 'ElyesH/typos' 2022-11-07 12:39:44 -08:00
Elyes HAOUAS
529b4be7b8 Remove duplicated "idefine Yes"
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
2022-01-09 17:45:53 +01: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
H. Peter Anvin
2e53f27e9d Move <string.h> inclusion to compiler.h
There is absolutely no reason not to include <string.h> globally, and
with the inline function for mempcpy() we need it there anyway.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2018-12-26 06:32:37 -08:00
Cyrill Gorcunov
7a6e2550fc misc: Nindent -- Drop expand tabs with space option
Currently out code is rather a mix of space/tabs
with sometime different indent level. Mostly because
some of developers are came from kernel space. Lets
shift to kernel coding standart with small steps,
file by file. It really helps when you're sitting
in front of laptop more than 10 hours long.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-28 23:51:25 +03:00
H. Peter Anvin
cf53dfbac4 misc/omfdump.c: expand dDEPFILE COMENT records
Expand dDEPFILE COMENT records.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-08-16 15:23:01 -07:00
H. Peter Anvin
a771be85f4 outobj: emit file dependency information
Some OMF toolchain can make use of file dependency information
embedded in the object files.  As implemented here, we don't try to
absolutize the filenames, as that prevents moving around trees and is
OS-dependent.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-08-16 15:00:38 -07:00
H. Peter Anvin
e1f985c167 Reorganize the source code into subdirectories
Make the source code easier to understand and keep track of by
organizing it into subdirectories depending on the function.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2016-05-25 12:06:29 -07:00
H. Peter Anvin
1ac2c2f55f misc/tag-release: default to --no-push
--no-push is by far the safer default.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2016-02-21 21:07:11 -08:00
H. Peter Anvin
021b10ca14 misc/tag-release: die on unknown options
If someone specifies an unknown option, they proabably typoed
something.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2016-02-21 21:05:16 -08:00
Cyrill Gorcunov
07f0a8dbc9 debug: Drop LOGALLOC usage
There are special tools (like valgrind and etc)
to track memory leaks, no need for own trivial
tracker.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2014-05-09 22:22:34 +04:00
H. Peter Anvin
478f2dafff misc/release: Generate manpages
asciidoc/xmlto are not tools we require every users to have, so each
tarball should contain them.  That means the release script needs to
know about them.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2013-12-11 12:10:27 -08:00
H. Peter Anvin
78d59e370d misc/release: do xz compression with -9e
Use the -9e compression level when doing xz compression.  It only
saves a few kilobytes, but since our files are pretty small it doesn't
really take all that much time.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2012-02-25 22:49:25 -08:00
H. Peter Anvin
c5473121af tag-release: actually push data out unless --no-push is given
Rather than just printing a list of commands, do them, unless
--no-push is given...

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2012-02-25 22:02:08 -08:00
H. Peter Anvin
74d23af7b8 release: create .xz files; remove empty subdirectories
Create .xz files as well as .gz and .bz2; remove empty subdirectories
from the xdoc archives.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2012-02-25 21:30:33 -08:00
Cyrill Gorcunov
e635491941 misc: Enhance tag-release
It remains backward compatible

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-21 19:19:29 +03:00
Cyrill Gorcunov
d3034cb13b Get rid of misc/altreg.inc
It's the same as macros/altreg.mac which is already included.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-07-28 18:00:06 +04:00
Cyrill Gorcunov
27fb3703a5 misc/tag-release: Make it usable for remote repos
In case if the commiter has a main repo configured as remote
one and also has various tags (and don't want to push every
tag he has out to the main repo) he may use misc/tag-release
new functionality.

For example I have NASM remote repo as well known

	git://repo.or.cz/nasm.git

and a number of my own local tags/branches which I
would like to not sprinkle into a master repo.

So to make a release (say 2.08) I may just type

	misc/tag-release 2.08 git+ssh://xxx@repo.or.cz/srv/git/nasm.git master

and this command will push master branch into main repo with "nasm-2.08" tag.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-03-03 22:41:45 +03:00
H. Peter Anvin
5f3bd5dbf0 misc/release: *.ico are binary files
Zip needs to know which files to treat as binary, so tell it *.ico are
binary files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-09-23 09:54:10 -07:00
H. Peter Anvin
fc81021fcf xcrcgen: tool to create a "generalized CRC" hash table
A so-called "generalized CRC" is a form of hash function based on a
table similar to the conventional bytewise software implementation of
CRC.  For each byte in each data set, it contains a random
byte permutation table.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-16 10:43:38 -04:00
H. Peter Anvin
02d66b182c crcgen: clean up whitespace
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-16 10:23:26 -04:00
H. Peter Anvin
395d381114 crcgen: utility program to generate CRC tables
Small utility program to generate CRC tables in both C and Perl
formats.  Note: we don't actually need a true CRC, which is what this
generates.  We may want to consider going to a "generalized CRC",
meaning a randomly generated set of 8 bytewise permutations.  These
have the advantage of not being linear, while having the same software
implementation as a true CRC.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-16 10:20:14 -04:00
H. Peter Anvin
5a11f59a82 Beginnings of a crude utility to dump the contents of an OMF file
Beginnings of a crude utility to dump the contents of an OMF (obj)
file.  At this point all it does it breaks it down into the individual
records and dumps those, but it is still easier to read than a pure
hexdump.

See http://www.azillionmonkeys.com/qed/Omfg.pdf for the format spec.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-01 23:11:15 -07:00
H. Peter Anvin
d15bb009f6 Intel FMA: drop relaxed forms
The Intel FMA instructions are destructive, so relaxed forms are not
appropriate.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-06-24 21:45:27 -07:00
H. Peter Anvin
57fd9c2142 Nindent: add back the -nut option
NASM is developed under a bunch on environments, to tabs aren't the
best choice.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-05-25 21:57:27 -07:00
H. Peter Anvin
8bb4c6dafa Nindent: update with the -npro and -il0 options
Update with the -npro and, if recent enough, the -il0 options.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-05-25 21:40:06 -07:00
H. Peter Anvin
74eed4a9b3 BR 2690688: Fix opcodes for FMA instructions
Two bugs with respect to the FMA instructions:
- the variant increment is supposed to be 0x10, not 0x01.
- the base opcode for scalar VFNMADD is 0x9d, not 0x9c
2009-03-17 18:26:47 -07:00
H. Peter Anvin
ef72b03fb4 BR 2690688: add missing VFM instructions
The Perl script which auto-generated the VFM instructions had
incorrectly conflated the VEX.W and VEX.L bits, with the result that
only half the valid instructions were generated.
2009-03-17 16:16:39 -07:00
H. Peter Anvin
40d37eef81 genfma: fix spelling of the VFNM instructions
Fix the spelling of the scalar VFNM instruction in genfma.pl, too,
just in case we need to pull this script out again...
2009-03-16 11:51:07 -07:00
H. Peter Anvin
d8e47f6da9 FMA instructions won't be in Sandy Bridge
The FMA instructions aren't scheduled for Sandy Bridge after all.
They will be "in a future processor", so create a placeholder for now.
2009-02-21 16:43:48 -08:00
H. Peter Anvin
0662203978 Perl script used to generate FMA instruction patterns
Small perl script used to generate the FMA instruction patterns.  May
come in useful if the spec changes again.
2009-02-18 14:13:45 -08:00
H. Peter Anvin
3f5ec289e7 Remove obsolete tagrelease script (duplicate of tag-release) 2008-09-03 15:22:23 -07:00
H. Peter Anvin
ea2832c7f3 fmtinsns.pl: handle compiler fields; do some case mangling
Handle compiler-generated fields, and at least try to do some case
mangling.
2008-05-23 16:59:59 -07:00
H. Peter Anvin
1e5203872d insns.dat: make even wider to make space for AVX
The AVX instructions take more space, so add a few tab stops across
the entire file.
2008-05-20 11:04:26 -07:00
H. Peter Anvin
8271db6f1f misc/findleak.pl: make executable
misc/findleak.pl: no text change, but mark file executable.
2008-01-21 16:26:32 -08:00
Charles Crayne
c17a0eb31b Add autogenerated instruction list to NASM documentation
1. Allow included files in rdsrc.pl
2. New program inslist.pl to generate instruction list from insns.dat
3. Mark certain comments in insns.dat as documentation subheaders
4. Add Instruction List appendix to nasmdoc.src
5. Update build process to invoke inslist.pl
2008-01-20 16:27:03 -08:00
H. Peter Anvin
bebf220ba9 Complete the altreg set with "r0h".."r3h". 2007-12-10 15:36:39 -08:00
H. Peter Anvin
e55c836b5a Document naming of registers in 64-bit mode
Intel's docs diverge from AMD's docs (MASM follow AMD's docs);
formally document what we're doing and include a file of macros in
case someone wants to use alternate names.
2007-12-10 15:35:28 -08:00