Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s2: Add arm64 decompression #324

Merged
merged 15 commits into from
Feb 26, 2021
12 changes: 11 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ os:
- linux
- osx

arch:
- amd64

go:
- 1.13.x
- 1.14.x
- 1.15.x
- 1.16.x
Expand Down Expand Up @@ -34,6 +36,14 @@ jobs:
go: 1.16.x
script:
- GOOS=linux GOARCH=386 go test -short ./...
- stage: arm64 tests
arch: arm64
go:
- 1.16.x
script:
- go test -cpu=2 ./s2
- go test -cpu=2 -tags=noasm ./s2
- go build github.com/klauspost/compress/s2/cmd/s2c && go build github.com/klauspost/compress/s2/cmd/s2d && s2c s2c && s2d s2c.s2 && rm s2c && rm s2d && rm s2c.s2

deploy:
- provider: script
Expand Down
3 changes: 2 additions & 1 deletion s2/decode_amd64.s
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
// - R_TMP0 scratch
// - R_TMP1 scratch
// - R_LEN length or x (shared)
// - R_X length or x (shared)
// - R_OFF offset
// - R_SRC &src[s]
// - R_DST &dst[d]
Expand Down Expand Up @@ -172,13 +171,15 @@ callMemmove:
MOVQ R_DST, 24(SP)
MOVQ R_SRC, 32(SP)
MOVQ R_LEN, 40(SP)
MOVQ R_OFF, 48(SP)
CALL runtime·memmove(SB)

// Restore local variables: unspill registers from the stack and
// re-calculate R_DBASE-R_SEND.
MOVQ 24(SP), R_DST
MOVQ 32(SP), R_SRC
MOVQ 40(SP), R_LEN
MOVQ 48(SP), R_OFF
MOVQ dst_base+0(FP), R_DBASE
MOVQ dst_len+8(FP), R_DLEN
MOVQ R_DBASE, R_DEND
Expand Down
Loading