nasm/include
H. Peter Anvin bff94fbd39 Major changes to a number of subsystems to improve matching
Work through a number of changes toward making matching a lot saner,
both to reduce the number of patterns to generate for APX but also to
make a number of code patterns simpler.

This replaces a fair number of byte codes.

Improve a number of error messages, especially related to overflows.

Move process_insn() from nasm.c to assemble.c, as it really is the
primary entry point to the assembler module.

Reorder some prefixes. In particular, F2/F3 override 66 when used as a
mandatory prefix, so it makes more sense for them to be closer to the
opcode.

Move a lot more information into struct insn. It is better to have it
in one place; memory consumption is not an issue because struct insn
is transient information.

Get rid of "optimization levels" and replace it with a mask of
flags. That was already halfway done; complete the job.

Replace seg:offset in struct out_data with a struct location. It would
be better to extend this to more places, too.

The ARx and SMx flags are now explicit bitmasks, instead of having a
couple of hard-coded ranges.

Add __func__ to assert or panic messages.

Because of prefix and message changes, a number of travis tests had to
be audited and updated.

Fix a number of instruction patterns which had .128 when they ought to
be .lig. This is no longer a minor issue with the disassembler: for
AVX10, the pattern vector length determines how SAE/RC are encoded,
and there is no valid 128-bit encoding. However, with .lig the 512-bit
encoding can be used.

Separate "o64nw" into two pieces: opsize 64 and "nw" = "REX.w not necessary". The
latter can be included in non-64-bit patterns. "o64" still set REX.W
since that is still the common thing.

New "osz" bytecode: emit an OSP *or* REX.W depending on the current
mode and operand size. Useful for special cases like "nop" where "o64
nop" probably wants to be encoded as "48 90".

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-08-07 17:13:44 -07:00
..
bytesex.h bytesex.h: more simplifications and add const 2017-11-29 17:19:27 -08:00
compiler.h Major changes to a number of subsystems to improve matching 2024-08-07 17:13:44 -07:00
dbginfo.h debug: collect macro information for the debug backend 2020-07-08 09:28:44 -07:00
disp8.h Tidy up handling of modr/m and compressed immediates 2024-08-03 16:24:49 -07:00
error.h Major changes to a number of subsystems to improve matching 2024-08-07 17:13:44 -07:00
hashtbl.h output/coff: Support for COMDAT sections 2021-12-17 23:45:25 +03:00
iflag.h Major changes to a number of subsystems to improve matching 2024-08-07 17:13:44 -07:00
ilog2.h Remove #includes already provided by "compiler.h" 2018-12-27 12:45:44 -08:00
insns.h insns.h: update the prototype for the disassembly root table 2024-08-04 16:13:14 -07:00
labels.h Change LBL_NONE to LBL_none 2019-09-12 20:26:23 -04:00
md5.h Reorganize the source code into subdirectories 2016-05-25 12:06:29 -07:00
nasm.h Major changes to a number of subsystems to improve matching 2024-08-07 17:13:44 -07:00
nasmint.h nasmint.h: change header guards to NASM_NASMINT_H 2016-10-04 18:11:57 -07:00
nasmlib.h Major changes to a number of subsystems to improve matching 2024-08-07 17:13:44 -07:00
nctype.h Restore the ability to have ? in identifiers, except ? itself 2018-12-14 00:57:05 -08:00
opflags.h apx: smarter determination of REX2 prefix eligibility 2024-07-31 16:18:17 -07:00
perfhash.h Add generic perfect string hashes, use for directives 2017-04-03 00:27:07 -07:00
raa.h RAA: make pointer vs integer RAAs type safe 2018-06-18 17:11:54 -07:00
rbtree.h rbtree: add rb_search_exact() 2020-07-08 09:51:30 -07:00
rdoff.h rdoff: use nasm-provided safe memory allocation and I/O 2017-04-17 13:56:50 -07:00
saa.h saa, raa: saa_init() and raa_init() will never return NULL 2017-04-23 23:37:11 -07:00
strlist.h Add [v]printf_func() attributes where appropriate 2020-07-30 17:30:20 -07:00
tables.h macros: can't use the __USE_*__ macro string anymore; fix comment stripping 2019-08-15 11:53:19 -07:00
ver.h Add option to create reproducible output 2020-08-27 13:06:08 -07:00