Commit Graph

347 Commits

Author SHA1 Message Date
Michael McLoughlin
f955ddf82a .github: workflow to update metadata (#257)
Provides a Github Actions Workflow which creates a PR to update third-party package metadata.

PR is created with a new "cadobot" Github App.
2022-04-30 15:14:49 -07:00
cadobot[bot]
b38c305466 tests/thirdparty: update package metadata (#266) 2022-04-30 15:12:39 -07:00
Michael McLoughlin
bc4d885a6d script: upgrade asmfmt to v1.3.2 (#265) 2022-04-27 22:42:36 -07:00
Michael McLoughlin
6a6b0bd11d tests/thirdparty: add cloudflare/circl (#264) 2022-04-24 22:18:26 -07:00
Michael McLoughlin
3e9461adf1 tests/thirdparty: add klauspost/compress/zstd (#263)
Upgrade test version of klauspost/compress. Fix s2 test and add zstd package.
2022-04-24 21:54:57 -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
f1f7d93959 tests/thirdparty: standard library crypto/ed25519 (#225)
Fixes #226
2022-04-23 21:58:06 -07:00
Michael McLoughlin
b758297525 .github: upgrade setup-go action (#259)
Upgrade to v3.0.0. Set check-latest option.
2022-04-23 21:01:50 -07:00
Michael McLoughlin
3d25f4574c doc: rounded avatars (#256)
Use weserv service to format avatars with circle masks. Make size configurable.

Tweak readme and adopters pages.

Updates #101
2022-04-18 00:49:52 -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
956d98e549 .github: configure dependabot (#253) 2022-04-17 21:39:58 -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
3066c12247 go.mod: require go 1.16 (#250) 2022-04-17 19:18:59 -07:00
Michael McLoughlin
77ce540158 tests/thirdparty: add mmcloughlin/md4 (#249) 2022-04-17 14:08:30 -07:00
Michael McLoughlin
a25e011a06 tests/thirdparty: add oasisprotocol/deoxysii (#247)
Fixes #246
2022-04-16 21:25:22 -07:00
Michael McLoughlin
ed62fe0a03 tests/thirdparty: update packages metadata 2022-04-10 23:05:26 -07:00
Michael McLoughlin
a1840163c8 all: upgrade direct dependencies (#244) 2022-04-10 22:45:00 -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
553930530f doc: update link to Filippo's live coding session
Fixes #236
2022-02-21 11:21:01 -08:00
Michael McLoughlin
af3e578ab4 tests/thirdparty: re-enable segmentio/asm (#232)
Fixes #229
2021-11-13 13:36:54 -08:00
Michael McLoughlin
68350e4e08 tests/thirdparty: add lukechampine/blake3 (#231)
Fixes #164
2021-11-12 22:22:50 -08: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
2867bd7e01 tests/thirdparty: add skip option (#228)
Add the ability to skip third-party tests by specifying a known issue.
2021-11-10 18:44:28 -08:00
Michael McLoughlin
6c0ed1c4e8 tests/thirdparty: add filippo.io/edwards25519 (#227)
Updates #226
2021-11-07 18:29:47 -08:00
Michael McLoughlin
1de006d741 tests/thirdparty: use shallow clone (#224)
When trying to add a test case from the standard library, cloning golang/go
was taking forever. This PR switches to a shallow clone.
2021-11-07 16:30:50 -08:00
Michael McLoughlin
f355d27b13 tests/thirdparty: package metadata (#223)
Fetches third-party package metadata from Github.
2021-11-07 16:13:33 -08:00
Michael McLoughlin
afe2d539b8 tests/thirdparty: golang.org/x/crypto/curve25519 (#222) 2021-11-07 01:39:03 -07:00
Michael McLoughlin
14c87c7da2 tests/thirdparty: add oasisprotocol/curve25519-voi (#220)
Fixes #202
2021-11-06 22:42:31 -07:00
Michael McLoughlin
2ca6e5e9f6 tests/thirdparty: add ericlagergren/lwcrypto (#219)
Fixes #188
2021-11-06 22:30:43 -07:00
Michael McLoughlin
6acd6a048d tests: test functions with random signatures (#216)
Adds a test for function signature memory layout by generating functions with
random signatures. This confirms that the size and offsets computed by
`gotypes` agree with `asmdecl`.

Updates #191 #195
2021-10-30 18:22:24 -07:00
Michael McLoughlin
bcbebd5674 build: global Function() and SignatureExpr() (#215)
Exposes a few functions on Context that are not available globally. This
oversight suggests that #33 or #133 would be reasonable. `Signature()` is
currently excluded because it causes a conflict for users who have
dot-imported both `build` and `gotypes`. For example:

18af27c3ce/build/base64/decode_asm.go (L13-L14)
a88a5ae268/asm/asm.go (L6-L7)
2021-10-30 15:05:19 -07:00
Michael McLoughlin
4f7179b08e gotypes,tests: test case for issue #195 (#214)
Adds test cases for the bug in #195, similar to #212.

Updates #195
Updates #191
2021-10-30 13:47:55 -07:00
Michael McLoughlin
7de02518a2 gotypes: fix argument size for signatures without return types (#212)
This fixes a bug in argument size calculation in the case where the function
has no return values. Previously it was padding the argument struct to max
alignment, but this only happens if there are return values following.

Updates #191
2021-10-30 13:32:25 -07:00
Michael McLoughlin
e70c62b254 all: upgrade direct dependencies (#213) 2021-10-30 12:07:23 -07:00
Michael McLoughlin
1d235fb56e buildtags: Format only go:build lines for go 1.18+ (#211)
```
$ ./tmp/testgo161718.sh ./buildtags/ ./printer/
+ go1.16.8 test ./buildtags/ ./printer/
ok  	github.com/mmcloughlin/avo/buildtags	0.001s
ok  	github.com/mmcloughlin/avo/printer	0.002s
+ go1.17.2 test ./buildtags/ ./printer/
ok  	github.com/mmcloughlin/avo/buildtags	0.001s
ok  	github.com/mmcloughlin/avo/printer	0.002s
+ gotip test ./buildtags/ ./printer/
ok  	github.com/mmcloughlin/avo/buildtags	0.001s
ok  	github.com/mmcloughlin/avo/printer	0.002s
```

Updates #183
2021-10-30 00:10:16 -07: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
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
55d98ccf77 buildtags: go:build support (#208)
Implements formatting of constraints according to the current Go version
supported syntax. This is achieved by delegating to go/format and extracting
out the resulting comments.

Also provides functions to query for constraint syntax support, which are
mainly intended for writing version-dependent tests.

Updates #183
2021-10-29 00:43:49 -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
9c815a0581 tests/thirdparty: fix phoreproject-bls (#204)
This started failing under Go 1.17.2 due to a missing go mod tidy in the
root of the respository.
2021-10-27 23:03:23 -07:00
Michael McLoughlin
5e686673b2 tests/thirdparty: add segmentio/asm (#201)
Adds third-party test for https://github.com/segmentio/asm.

Fixes #200
2021-09-15 23:49:08 -07:00
Michael McLoughlin
8ff8e3b751 tests/thirdparty: fix and run as github workflow (#198)
As part of fixing failing third-party tests, this PR significantly
rearchitects their specification and execution.

Third-party tests are now specified in a much more flexible format allowing
more customization on a per-package level. In addition, third-party tests are
now used to auto-generate a Github Actions workflow to perform the tests in
parallel. This not only gives faster feedback on PRs, but will also allow us
to more quickly narrow down on which packages are failing. An additional
workflow also confirms that local execution of third-party tests is consistent
with the Github Actions version. This workflow only runs when tests/thirdparty
itself is changed.
2021-09-15 23:25:51 -07:00
Michael McLoughlin
b935256fa5 ci: upgrade codecov action (#196)
Upgrades codecov-action in order to fix codecov errors CI, for example:

https://github.com/mmcloughlin/avo/runs/3389170262?check_suite_focus=true#step:10:11

See codecov/codecov-action#322.
2021-08-21 14:56:26 -07:00
Michael McLoughlin
3a219c8d3a ci: github actions hardening (#190)
Restrict permissions of github token. Pin action versions.

Following advice in briansmith/untrusted#50.
2021-04-27 21:42:09 -07:00
Michael McLoughlin
ec9535c905 doc: link to Filippo's live stream in README (#187)
Link to Filippo's live stream of rewriting the filippo.io/edwards25519 assembly with avo.

Reformat the "learn more" links in a list.
2021-04-21 22:03:43 -07:00