]> Cypherpunks repositories - gostls13.git/commit
math/big: new mini-compiler for arith assembly
authorRuss Cox <rsc@golang.org>
Thu, 10 Apr 2025 20:58:51 +0000 (16:58 -0400)
committerGopher Robot <gobot@golang.org>
Sat, 19 Apr 2025 15:19:14 +0000 (08:19 -0700)
commit8cc98a04efb961ba82bfa0737e086590c98d5c48
tree1a452bb2e9a87fa30d9a251d85d50ca7e182f811
parenta11643df8ff8a575abe4abc7f25d09631424ea49
math/big: new mini-compiler for arith assembly

The arith assembly is big enough, and the details that you have to keep
in mind are complex enough and varied enough, that it is worth using
a Go program to generate the assembly. That way, all the architectures
can use the same algorithms, and porting to new architectures will be
easier.

This is the first of a sequence of CLs to introduce a new mini-compiler
for generating the arith assembly, in math/big/internal/asmgen.
This CL has the basics of the compiler as well as a couple simple
architectures and the generator for addVV/subVV. It does not check
in the generated assembly yet. That will happen in a followup CL after
the other architectures and generators have been added.

Change-Id: Ib704c60fd972fc5690ac04d8fae3712ee2c1a80a
Reviewed-on: https://go-review.googlesource.com/c/go/+/664935
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Auto-Submit: Russ Cox <rsc@golang.org>
src/go/build/deps_test.go
src/math/big/internal/asmgen/add.go [new file with mode: 0644]
src/math/big/internal/asmgen/arch.go [new file with mode: 0644]
src/math/big/internal/asmgen/arm.go [new file with mode: 0644]
src/math/big/internal/asmgen/asm.go [new file with mode: 0644]
src/math/big/internal/asmgen/func.go [new file with mode: 0644]
src/math/big/internal/asmgen/main.go [new file with mode: 0644]
src/math/big/internal/asmgen/main_test.go [new file with mode: 0644]
src/math/big/internal/asmgen/mips.go [new file with mode: 0644]
src/math/big/internal/asmgen/mips64.go [new file with mode: 0644]
src/math/big/internal/asmgen/pipe.go [new file with mode: 0644]