nasm/output
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
..
codeview.c Fix some typos 2022-01-09 17:34:35 +01:00
dwarf.h Fix some typos 2022-01-09 17:34:35 +01:00
elf.h Fix some typos 2022-01-09 17:34:35 +01:00
legacy.c Major changes to a number of subsystems to improve matching 2024-08-07 17:13:44 -07:00
macho.h output: macho -- Move constants into the header 2018-10-24 22:31:07 +03:00
nulldbg.c debug: feed single-line macro definitions and include hierachy to dfmt 2020-08-25 15:52:05 -07:00
nullout.c Clean up the handling of various passes 2018-12-18 11:14:59 -08:00
outaout.c stdscan: abstract out the saving/restoring of parser state 2024-07-24 14:15:35 -07:00
outaout.mac preproc: standard macros now C-safe, %aliases off, fix %? recursion 2019-08-27 16:42:41 -07:00
outas86.c Clean up backend format names 2019-08-10 02:28:17 -07:00
outas86.mac preproc: standard macros now C-safe, %aliases off, fix %? recursion 2019-08-27 16:42:41 -07:00
outbin.c stdscan: abstract out the saving/restoring of parser state 2024-07-24 14:15:35 -07:00
outbin.mac preproc: standard macros now C-safe, %aliases off, fix %? recursion 2019-08-27 16:42:41 -07:00
outcoff.c Merge remote-tracking branch 'johannkoenig/master' 2022-11-07 12:54:22 -08:00
outcoff.mac preproc: standard macros now C-safe, %aliases off, fix %? recursion 2019-08-27 16:42:41 -07:00
outdbg.c Major changes to a number of subsystems to improve matching 2024-08-07 17:13:44 -07:00
outdbg.mac outdbg: add macro to emulate .bin format ORG directive 2020-08-25 15:50:11 -07:00
outelf.c stdscan: abstract out the saving/restoring of parser state 2024-07-24 14:15:35 -07:00
outelf.h Fix some typos 2022-01-09 17:34:35 +01:00
outelf.mac preproc: standard macros now C-safe, %aliases off, fix %? recursion 2019-08-27 16:42:41 -07:00
outform.c Clean up backend format names 2019-08-10 02:28:17 -07:00
outform.h rdoff: kill it off 2022-11-07 16:49:13 -08:00
outieee.c outieee: fix segfault on empty input 2022-12-07 10:24:14 -08:00
outlib.c outlib: Make ol_add_sym_to being static 2020-07-03 11:01:40 +03:00
outlib.h outlib: fix infinite recursion due to incorrect wrapping 2020-07-02 20:48:43 -07:00
outmacho.c Major changes to a number of subsystems to improve matching 2024-08-07 17:13:44 -07:00
outmacho.mac preproc: standard macros now C-safe, %aliases off, fix %? recursion 2019-08-27 16:42:41 -07:00
outobj.c stdscan: abstract out the saving/restoring of parser state 2024-07-24 14:15:35 -07:00
outobj.mac preproc: standard macros now C-safe, %aliases off, fix %? recursion 2019-08-27 16:42:41 -07:00
pecoff.h output/coff: Support for COMDAT sections 2021-12-17 23:45:25 +03:00
stabs.h Replace <ctype.h> includes with "nctype.h" 2018-12-27 12:37:25 -08:00