Commit Graph

59 Commits

Author SHA1 Message Date
Michael McLoughlin
d84f103398 all: upgrade to golangci-lint v1.55.2 (#416)
Upgrade `golangci-lint` to address a bug triggered since Go 1.21.5.

See: golangci/golangci-lint#3718
See: golang/go#64592
2024-01-07 12:56:20 -08:00
Michael McLoughlin
577048e7d7 script: update tool dependencies (#380) 2023-03-05 20:39:41 -08:00
Michael McLoughlin
1bba0bed7f ci: bump to go 1.20 (#375)
* Update CI Go version to 1.20/1.19
* Update `golangci-lint` to v1.51.2
* Update coverage collection to use new Go 1.20 tools
* Update coverage job to only run on latest Go version

Fixes #367
2023-03-05 14:22:23 -08:00
Michael McLoughlin
881df56d21 ci: remove "Configure Go Environment" step (#376)
No longer required given updates to `actions/setup-go`.
2023-03-05 12:32:52 -08:00
Michael McLoughlin
1efb0cb7c9 Revert "script: fix golangci-lint install (#368)" (#369)
This reverts commit b2ed9c77ec.

It seems Github fixed the underlying issue:

https://github.com/orgs/community/discussions/45590#discussioncomment-4802887
2023-01-28 11:51:30 -08:00
Michael McLoughlin
b2ed9c77ec script: fix golangci-lint install (#368)
Updates golangci-lint install to incorporate the fix for
golangci/golangci-lint#3509, which was affecting CI tests, for example:

https://github.com/mmcloughlin/avo/actions/runs/4030013813
2023-01-27 21:50:45 -08:00
Michael McLoughlin
429cf3cdbf ci: bump to go 1.19 (#330)
* Bump CI to Go 1.19
* Update golang/go edwards25519 test
* Apply formatting to printer stubs output (to get correct comment formatting)
* Bump gofumpt version
2022-09-05 22:15:01 -07:00
Michael McLoughlin
e788b7675f all: upgrade to golangci-lint v1.49.0 (#329)
Fixes #242
2022-09-05 17:25:03 -07:00
Michael McLoughlin
62c71109a4 tests/thirdparty: use Suite type for configuration (#285) 2022-05-08 16:55:51 -07:00
Michael McLoughlin
5e6971cc7a script: metadata update (#283) 2022-05-08 16:10:23 -07:00
Michael McLoughlin
bc4d885a6d script: upgrade asmfmt to v1.3.2 (#265) 2022-04-27 22:42:36 -07:00
Michael McLoughlin
84071ae4f9 tests/thirdparty: multiple packages per project (#262) 2022-04-24 20:20:11 -07:00
Michael McLoughlin
96c4d85995 script: yaml formatting (#261) 2022-04-24 12:54:07 -07:00
Michael McLoughlin
1cbd35f134 doc: Adopters page (#254)
Adds page with full list of `avo` adopters. Linked to from README.

Updates #101
2022-04-17 23:57:05 -07:00
Michael McLoughlin
57ea8119b7 doc: Adopters list in README (#252)
Adds a list of most popular projects using avo, based on Github Stars.

Auto-generated from the third-party packages list using docgen.

Updates #101
2022-04-17 22:38:54 -07:00
Michael McLoughlin
9fee3b0ead doc: generate README with docgen tool (#251)
Introduces a docgen tool for templated documentation generation, and uses it
to generate the README.

At the moment this change makes minimal difference to generating it with
embedmd. The difference is that docgen opens up the possibility to generate
documentation with more elaborate templating. The specific use case currently
in mind is including an adopters list that's kept in sync with the third-party
packages file.

Updates #101
2022-04-17 19:41:29 -07:00
Michael McLoughlin
b0c64b2e52 ci: bump to go 1.18 (#239) 2022-04-10 21:03:05 -07:00
Michael McLoughlin
72b8db9c80 all: upgrade golangci-lint and formatters (#240) 2022-03-27 15:31:26 -07: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
c48d61faf6 script: switch to go install for tools (#210) 2021-10-29 01:26:54 -07:00
Michael McLoughlin
9c70781236 all: go 1.17 (#197)
Bump CI Go versions to 1.16 and 1.17.
Update build tags with `go:build` equivalents.
Upgrade asmfmt tool for new `go:build` support.

Updates #183
2021-10-29 01:18:34 -07:00
Michael McLoughlin
a5480393fc script: pin golangci-lint install script (#205) 2021-10-27 23:18:45 -07:00
Michael McLoughlin
9a44e522f4 script: switch to install.sh from golangci-lint repo (#203)
The goreleaser script has been deprecated:

goreleaser/godownloader#207
2021-10-27 23:07:44 -07:00
Michael McLoughlin
f295bde84c pass: ensure frame pointer register is saved (#174)
Currently `avo` uses `BP` as a standard general-purpose register. However, `BP` is used for the frame pointer and should be callee-save. Under some circumstances, the Go assembler will do this automatically, but not always. At the moment `avo` can produce code that clobbers the `BP` register. Since Go 1.16 this code will also fail a new `go vet` check.

This PR provides a (currently sub-optimal) fix for the issue. It introduces an `EnsureBasePointerCalleeSaved` pass which will check if the base pointer is written to by a function, and if so will artificially ensure that the function has a non-zero frame size. This will trigger the Go assembler to automatically save and restore the BP register.

In addition, we update the `asmdecl` tool to `asmvet`, which includes the `framepointer` vet check.

Updates #156
2021-04-18 18:37:56 -07:00
Michael McLoughlin
e5c9b4e5a6 script: use tools.mod for bootstrap (#175)
Replaces gobin with the preferred tools.mod solution for pinning tool dependencies.

Updates #166
2021-04-10 21:10:42 -07:00
Michael McLoughlin
fa88270b07 script: pin tool dependencies
An update to gofumpt caused the lint job to start failing:

https://github.com/mmcloughlin/avo/runs/638734114?check_suite_focus=true#step:7:688

The underlying issue is that the "join parameters" rule added to gofumpt
disagrees with output from go/types. It's possible to fix, but I don't
think it's important enough to deal with right now. Instead I'll pin the
gofumpt dependency to a version before that rule was added.

Pinning tool dependencies is a good idea anyway.
2020-05-03 22:38:06 -07:00
Michael McLoughlin
f891fe8d97 ci: test on go 1.14 (#138)
Add go 1.14 to CI testing. Upgrade golang.org/x/tools dependency to resolve golang/go#37617.
2020-04-25 01:27:57 -07:00
Michael McLoughlin
3426f8bd2d ci: github actions (#107)
Github actions workflow for CI.

Updates #106
2020-01-03 17:32:09 -08:00
Michael McLoughlin
0bcbe82731 ci: fix build for go 1.13 (#96)
Updates modules handling so build passes in Go 1.13. Bypasses modules for tools install in bootstrap. Upgrades golangci-lint version to avoid bug with v1.17.1 under Go 1.13.

Fixes #95
2019-09-15 14:43:44 -07:00
Michael McLoughlin
bb615f61ce all: formatting (#93)
Enforce stricter formatting and import grouping with gofumports.
2019-07-30 18:40:47 -07:00
Michael McLoughlin
cad456ebde lint: bump golangci-lint to v1.17.1 (#88) 2019-06-13 11:44:24 -07:00
Michael McLoughlin
e4cc632b47 lint: bump golangci-lint to 1.15.0
Updates #64
2019-03-04 21:33:46 -08:00
Michael McLoughlin
9c913ee847 lint: linter for package docstrings (#59)
Fixes #38
2019-01-22 21:14:59 -08:00
Michael McLoughlin
54ee3a8b77 lint: run asmdecl
Updates #24
2019-01-13 12:02:06 -08:00
Michael McLoughlin
a23fe8ee57 internal/cmd/asmdecl: standalone asmdecl checker
Updates #24
2019-01-13 11:40:47 -08:00
Michael McLoughlin
4aa8656eb0 lint: fix issues in examples (#49) 2019-01-13 10:12:52 -08:00
Michael McLoughlin
999da5143a script: fix asmtfmt install command (#8) 2019-01-10 21:48:26 -08:00
Michael McLoughlin
7a22924b14 lint: ensure conformity with asmfmt
Run asmfmt suring linting and confirm git repository isn't dirty.
This introduces a developer tools dependency on asmfmt, but not a
runtime dependency.

Updates #8
2019-01-10 21:31:04 -08:00
Michael McLoughlin
2caf9a2c35 ci: fix ref to unit.coverprofile 2019-01-09 21:58:14 -08:00
Michael McLoughlin
61e2c9dd38 ci: flag integration tests and unit tests 2019-01-09 21:51:20 -08:00
Michael McLoughlin
64026d252c ci: do not use go modules
Attempt to fix a stream of CI failures that started on the addition of
Go modules.

I wonder if we are falling foul of this warning in the wiki
https://github.com/golang/go/wiki/Modules.

"The module cache in Go 1.11 can sometimes cause various errors,
primarily if there were previously network issues or multiple go
commands executing in parallel (see #26794, which is addressed for Go
1.12). As a troubleshooting step, you can copy $GOPATH/pkg/mod to a
backup directory (in case further investigation is warranted later), run
go clean -modcache, and then see whether the original problem persists."

Updates #21
2019-01-06 20:35:58 -08:00
Michael McLoughlin
e7a6e2cb2a script: use -x in coverage script
Hope to get some insight into why CI builds are failing.
2019-01-06 20:28:46 -08:00
Michael McLoughlin
80a1adc4bb meta: initialize go modules
Updates #21
2019-01-06 18:58:30 -08:00
Michael McLoughlin
d92a147644 testing: coverage script
Updates #27
2019-01-02 20:41:59 -08:00
Michael McLoughlin
cf76c56dfc testing: script to measure coverage of a binary
Updates #27
2019-01-02 20:04:45 -08:00
Michael McLoughlin
4550badf58 doc: scripts to run embedmd on markdown files
This will help keep READMEs in sync with code.

Also adds a README for the add example.

Updates #14
2018-12-31 20:25:29 -08:00
Michael McLoughlin
6d6ff3cfc1 legal: include LICENSEs for data files
We depend upon data files from golang arch sub-repo and the Opcodes XML
database (behind PeachPy). This change includes their LICENSE files.

Updates #22
2018-12-31 16:17:44 -08:00
Michael McLoughlin
18cdf50d7c reg: support for register casting
Adds methods for referencing sub- or super-registers. For example, for
general purpose registers you can now reference As8(), As16(), ... and
for vector AsX(), AsY(), AsZ().

Closes #1
2018-12-30 18:40:45 -08:00
Michael McLoughlin
1033aa4f9c add golang.org/x/tools dependency 2018-12-17 21:13:00 -08:00
Michael McLoughlin
79bdb92163 fix ordering of generate script 2018-12-11 22:31:19 -08:00