mirror of
https://github.com/netwide-assembler/nasm
synced 2026-08-26 16:23:04 -04:00
No description
Add register-number-focused coverage for every operand-class token that has a hireg (r8-r15 / xmm-zmm8-15) or apxreg (r16-r31 / xmm-zmm16-31) tier: registers 8+ only exist in 64-bit mode (they need a REX prefix, or REX2/EVEX register-extension bits for 16-31), so this coverage is 64-bit-only regardless of the base token's own size. Per template with at least one such token, generate one extra all-hireg and one extra all-apxreg instruction line (once per template, not once per --variants instance). Since NASM's own template-matching engine transparently selects an alternate (e.g. APX/EVEX-encoded) pattern when the operand syntax calls for it, the generator doesn't need to special- case APX/EVEX iflags to decide whether extended registers are legal for a given mnemonic -- it can simply try assembling and keep whichever combination works. A staged-fallback probe (try hireg+apxreg, then hireg alone, then apxreg alone, then neither) avoids letting one genuinely-incompatible extra line (e.g. NOAPX/NOLONG-only mnemonics) cost the whole mnemonic its pre-existing 64-bit coverage; the probe checks --bits 16/32 too whenever a mnemonic's *only* templates need 64-bit registers regardless of number (e.g. URDMSR/UWRMSR), since in that case the generated 'full' file is reused for every bit width. Also fixes a latent bug: xmmreg/ymmreg/zmmreg previously drew uniformly from registers 0-15, but 8-15 needs 64-bit mode just like the GPR case -- so a template could non-deterministically lose its 16/32-bit coverage whenever the RNG happened to land on 8-15 (e.g. ADDPD was missing bin16/bin32 goldens before this fix). Register pools are now split into explicit low (0-7)/hireg (8-15)/apxreg (16-31) tiers per register class, threaded through gen_operand() via a new parameter (defaulting to the existing 'low' behavior at all pre- existing call sites). Regenerated travis/insns/ (2606 mnemonics, 16 dropped -- unchanged counts). Full suite validated via make -j32 travis: all tests PASS in ~27s. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|---|---|---|
| .github/workflows | ||
| asm | ||
| autoconf | ||
| common | ||
| config | ||
| contrib | ||
| disasm | ||
| doc | ||
| editors | ||
| include | ||
| macros | ||
| misc | ||
| Mkfiles | ||
| nasmlib | ||
| nsis | ||
| output | ||
| perllib | ||
| stdlib | ||
| templates | ||
| test | ||
| tools | ||
| travis | ||
| win | ||
| x86 | ||
| zlib | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .travis.yml | ||
| AUTHORS | ||
| autogen.sh | ||
| ChangeLog | ||
| CHANGES | ||
| configure.ac | ||
| INSTALL | ||
| LICENSE | ||
| Makefile.in | ||
| nasm.spec.in | ||
| nasm.spec.sed | ||
| nasm.txt | ||
| ndisasm.txt | ||
| README.md | ||
| SubmittingPatches | ||
| travis.mk.in | ||
| version | ||
| version.pl | ||
NASM, the Netwide Assembler
Many many developers all over the net respect NASM for what it is: a widespread (thus netwide), portable (thus netwide!), very flexible and mature assembler tool with support for many output formats (thus netwide!!).
Now we have good news for you: NASM is licensed under the "simplified" (2-clause) BSD license. This means its development is open to even wider society of programmers wishing to improve their lovely assembler.
Visit our nasm.us website for more details.
With best regards, the NASM crew.