Commit Graph

18 Commits

Author SHA1 Message Date
33208a2356 update 2026-03-06 20:14:02 +00:00
Michael McLoughlin
b76e849b5c all: AVX-512 (#217)
Extends avo to support most AVX-512 instruction sets.

The instruction type is extended to support suffixes. The K family of opmask
registers is added to the register package, and the operand package is updated
to support the new operand types. Move instruction deduction in `Load` and
`Store` is extended to support KMOV* and VMOV* forms.

Internal code generation packages were overhauled. Instruction database loading
required various messy changes to account for the additional complexities of the
AVX-512 instruction sets. The internal/api package was added to introduce a
separation between instruction forms in the database, and the functions avo
provides to create them. This was required since with instruction suffixes there
is no longer a one-to-one mapping between instruction constructors and opcodes.

AVX-512 bloated generated source code size substantially, initially increasing
compilation and CI test times to an unacceptable level. Two changes were made to
address this:

1.  Instruction constructors in the `x86` package moved to an optab-based
    approach. This compiles substantially faster than the verbose code
    generation we had before.

2.  The most verbose code-generated tests are moved under build tags and
    limited to a stress test mode. Stress test builds are run on
    schedule but not in regular CI.

An example of AVX-512 accelerated 16-lane MD5 is provided to demonstrate and
test the new functionality.

Updates #20 #163 #229

Co-authored-by: Vaughn Iverson <vsivsi@yahoo.com>
2021-11-12 19:02:39 -08:00
Michael McLoughlin
79bee1a316 printer: constraints formatting (#209)
Uses `buildtag.Format` to format constraints in the assembly and stub file
printers. This will ensure `// + build` and `//go:build` syntax are used
consistent with the current Go version.

Updates #183
2021-10-29 01:08:02 -07:00
Michael McLoughlin
e089a6c93c tests/fixedbugs: regression test for issue 100 (#129)
Adds a regression test based on klauspost/compress#186. This necessitated some related changes:

* Mark "RET" as a terminal instruction
* printer refactor to maintain compatibility with asmfmt
* Tweaks to other regression tests to ensure they are run correctly in CI

Updates #100 #65 #8
2020-01-27 21:05:33 -08:00
Michael McLoughlin
cde7e9483b pass,printer: display required ISA features (#120)
Fixes #119
2020-01-19 16:45:09 -08:00
Michael McLoughlin
284ee13ada build: support comments in functions (#41) 2019-01-11 10:33:41 -08:00
Michael McLoughlin
f77a2e3b9e printer: use tabwriter to align instructions (#8) 2019-01-10 21:21:41 -08:00
Michael McLoughlin
0f63e0906d ast: move "ast" types from root to ir sub-package
Closes #32
2019-01-06 14:21:10 -08:00
Michael McLoughlin
88eff53893 printer: doc for exported symbols
Updates #9
2019-01-04 19:03:05 -08:00
Michael McLoughlin
6202c2c9aa ast,build: add build constraints to File
Updates #3
2019-01-02 21:35:17 -08:00
Michael McLoughlin
4aaf6bc7ed ast,printer: add Includes field to File
Updates #12
2018-12-31 00:08:54 -08:00
Michael McLoughlin
e364d6398e ast,build: add Attributes fields to Function and Global
Updates #2
2018-12-30 23:35:54 -08:00
Michael McLoughlin
5dea46407c printer: shorten text size when argsize is zero 2018-12-27 13:48:31 -08:00
Michael McLoughlin
9243d299e6 first pass at DATA sections 2018-12-27 11:57:46 -08:00
Michael McLoughlin
d29c6340d7 ast: change file to have a list of sections 2018-12-26 18:58:12 -08:00
Michael McLoughlin
ca5c7e7454 printer: add generated code warnings 2018-12-18 22:57:26 -08:00
Michael McLoughlin
213d65e481 printer: cleaner output 2018-12-18 21:05:05 -08:00
Michael McLoughlin
c882e52510 printing: commit some refactors (probably broken) 2018-12-11 00:18:22 -08:00