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

arm64: bitwise, bit shift, boolean SIMD instructions #628

Merged
merged 3 commits into from
Jun 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ spectest:
@$(MAKE) spectest.v2

spectest.v1:
go test $$(go list ./... | grep $(spectest_v1_dir)) -v -timeout 120s
@go test $$(go list ./... | grep $(spectest_v1_dir)) -timeout 120s

spectest.v2:
go test $$(go list ./... | grep $(spectest_v2_dir)) -v -timeout 120s
mathetake marked this conversation as resolved.
Show resolved Hide resolved
@go test $$(go list ./... | grep $(spectest_v2_dir)) -timeout 120s

golangci_lint_path := $(shell go env GOPATH)/bin/golangci-lint

Expand Down
13 changes: 12 additions & 1 deletion internal/asm/arm64/assembler.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,23 @@ type Assembler interface {

// CompileVectorRegisterToVectorRegisterWithConst is the same as CompileVectorRegisterToVectorRegister but the
// additional constant can be provided.
// For example, the const can be used to specify the shift amount for USHLL instruction.
// For example, the const can be used to specify the shift amount for USHLLIMM instruction.
CompileVectorRegisterToVectorRegisterWithConst(instruction asm.Instruction, srcReg, dstReg asm.Register,
arrangement VectorArrangement, c asm.ConstantValue)

// CompileLoadStaticConstToVectorRegister adds an instruction where the source operand is StaticConstant located in
// the memory and the destination is the dstReg.
CompileLoadStaticConstToVectorRegister(instruction asm.Instruction, c asm.StaticConst, dstReg asm.Register,
arrangement VectorArrangement)

// CompileTwoVectorRegistersToVectorRegister adds an instruction where source are two vectors and destination is one
// vector. The vector's arrangement can be specified `arrangement`.
CompileTwoVectorRegistersToVectorRegister(instruction asm.Instruction, srcReg, srcReg2, dstReg asm.Register,
arrangement VectorArrangement)

// CompileTwoVectorRegistersToVectorRegisterWithConst is the same as CompileTwoVectorRegistersToVectorRegister except
// that this also accept additional constant.
// For example EXIT instruction needs the extraction target immediate as const.
CompileTwoVectorRegistersToVectorRegisterWithConst(instruction asm.Instruction, srcReg, srcReg2, dstReg asm.Register,
arrangement VectorArrangement, c asm.ConstantValue)
}
255 changes: 170 additions & 85 deletions internal/asm/arm64/consts.go

Large diffs are not rendered by default.

Loading