Repository navigation
fix(deps): update module github.com/go-asmgen/asmgen to v0.8.0 - #3
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v0.5.0→v0.8.0Release Notes
go-asmgen/asmgen (github.com/go-asmgen/asmgen)
v0.8.0: — indexany4 + base64_decode, no new emit opsCompare Source
Two new wasm-SIMD kernels, both assembled entirely from ops the tree already exposes. Additive-only bump; every existing consumer continues to work unchanged.
New kernels
`indexany4` — the twelfth kernel. A fixed 4-needle variant of `bytes.IndexAny`: given a buffer and four search bytes n1..n4, return the offset of the first byte in the buffer that equals any of the four, or -1 if none match. Callers duplicate entries in n1..n4 when they have fewer than four distinct needles; consumers with more either loop the kernel per set of four or fall back to scalar. Same shape as memchr but with four broadcast-key vectors and four compares OR-ed together. 10/10 wazero cases match `bytes.IndexAny` byte-for-byte, including whitespace-set search, 4-distinct-needle search, and zero-byte needles.
`base64_decode` — the thirteenth kernel and companion of base64_encode. 16 input chars → 12 output bytes per iteration, matching StdEncoding decode. A direct byte-level inverse of the encoder's Lemire dance:
9/9 wazero cases round-trip through the reference encoder + kernel decode = original input, on sizes from 12 bytes to 1200 bytes (100 blocks).
No new emit-surface ops
Both kernels compose entirely from what v0.7.0 already exposed:
This is the cleanest demonstration in the series so far that the emit surface scales additively — the last two additions grew the kernel catalogue from 11 to 13 without one line of new emit code.
Compatibility
Additive only. Every method on `Function`, every value type, every module/import shape from v0.7.0 continues to work unchanged.
To pin the new kernels use `@v0.8.0`:
```go
//go:generate sh -c "go run github.com/go-asmgen/asmgen/examples/wasm/indexany4@v0.8.0 > indexany4.wat"
//go:generate sh -c "go run github.com/go-asmgen/asmgen/examples/wasm/base64_decode@v0.8.0 > base64_decode.wat"
```
CI + docs
Shipped kernel catalogue (13 total)
What's next
Genuinely open items (neither started this cycle):
License
BSD-3-Clause.
v0.7.0: — adler32 + base64_encode, 8 new emit opsCompare Source
Two new wasm-SIMD kernels + eight new emit-surface ops. Additive-only bump; every existing consumer continues to work unchanged.
New kernels
`adler32` — the `hash/adler32` rolling checksum. Per 16-byte block, the weighted-byte-sum step uses `i16x8.extmul_low/high_i8x16_u` to widen and multiply against the coefficient vector [16,15,14,...,1] in one op each; max product 255×16=4080 fits in u16 so intermediate products stay exact. Kernel keeps `a` and `b` scalar, reads/writes them via caller pointers, no modulo in the loop (caller batches 5552-byte NMAX segments). 8/8 wazero cases match `hash/adler32.Checksum` byte-for-byte.
`base64_encode` — Lemire's SSE algorithm (arXiv:1704.00605) ported to wasm-SIMD. Per 12-byte block → 16 output chars. PMULHUW (no direct wasm-SIMD equivalent) is emulated via `i32x4.extmul_low/high_i16x8_u` + `i32x4.shr_u` by 16 + `i16x8.narrow_i32x4_u`. 6-bit indexes → ASCII via range-add offset pattern. 9/9 wazero cases match `encoding/base64.StdEncoding` byte-for-byte. Real bug caught during development by the verifier: `/` correction was -16 instead of -12; without the wazero cross-check, this would have landed idx=63 at '+' silently.
New emit-surface ops (8)
Compatibility
Additive only — every method on `Function`, every value type, every module/import shape from v0.6.0 continues to work unchanged. Consumers pinning `@v0.6.0` are unaffected.
To pin the new kernels use `@v0.7.0`:
```go
//go:generate sh -c "go run github.com/go-asmgen/asmgen/examples/wasm/adler32@v0.7.0 > adler32.wat"
//go:generate sh -c "go run github.com/go-asmgen/asmgen/examples/wasm/base64_encode@v0.7.0 > base64_encode.wat"
```
CI + docs
Shipped kernel catalogue (11 total)
What's next
License
BSD-3-Clause.
v0.6.0: — wasm/ peer package + 9 wasm-SIMD kernelsCompare Source
Additive-only bump: adds the wasm-SIMD (v128) emitter as a seventh peer alongside the six existing Plan 9 asm packages. Everything from v0.5.0 continues to work unchanged.
What's new
wasm/— WAT text emitter package (peer ofamd64/arm64/riscv64/loong64/ppc64/s390x). Programmatic emission of well-formed WebAssembly text modules for//go:wasmimportconsumption.examples/wasm/{matchlen, hex, hex_decode, popcount, toupper, memchr, isascii, utf8len, json_clean}/— nine kernel generators, one per shipped kernel. Each has:main_test.gocovering the generator's happy path and error branches.examples/wasm/verify/against a Go stdlib reference.CI:
wasm-e2ejob regenerates every kernel, drift-gates against the committed golden,wat2wasm-compiles, and runs the wazero verifier.libjob's 100% coverage gate now covers./wasm/....Shipped kernels (9 total)
matchlenbytes.Equalv128.load,i8x16.eq,i8x16.all_truehexencoding/hexi8x16.shr_u,i8x16.swizzle,i8x16.shufflehex_decodeencoding/hex.DecodeStringi8x16.ge_s/le_s,i8x16.shl,v128.store64_lanepopcountmath/bitsi8x16.popcnt,extadd_pairwisechaintoupperstrings.ToUpper(ASCII)i8x16.ge_s,i8x16.le_s,i8x16.submemchrbytes.IndexBytei8x16.splat,i8x16.bitmask,i32.ctzisasciii8x16.bitmaskutf8lenutf8.RuneCounti8x16.bitmask+i32.popcntjson_cleani8x16.eq+ AND/zero-eqOrigin — folded from
go-asmgen/wasmPreviously shipped as a standalone
github.com/go-asmgen/wasmmodule (tagsv0.1.0,v0.2.0,v0.3.0, all still valid). Folded in as a peer here as of commit95f9b4c.Existing consumers pinning
github.com/go-asmgen/wasm/...continue to work unchanged — the three shipped tags are immutable. New consumers should pingithub.com/go-asmgen/asmgen/wasm/...orgithub.com/go-asmgen/asmgen/examples/wasm/<kernel>instead:```go
//go:generate sh -c "go run github.com/go-asmgen/asmgen/examples/wasm/matchlen@v0.6.0 > matchlen.wat"
```
Docs + CI
lib(100% cov gate incl../wasm/...), 6 asm-arches unchanged, newwasm-e2e(drift + wat2wasm + wazero for all 9 kernels).License
BSD-3-Clause.
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate CLI.