]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/amd64: simplify code generation for signed division
authorJoel Sing <joel@sing.id.au>
Wed, 5 Apr 2023 20:11:10 +0000 (06:11 +1000)
committerJoel Sing <joel@sing.id.au>
Sat, 8 Apr 2023 15:32:45 +0000 (15:32 +0000)
commit2a41dbf13c65267bb21dcdd3b9d92a49bc969a94
treede5a2a1185b9922151802e3fee05bd7a36d96a81
parent231f290e51e130a1699d5c29d28133d68f43d2e9
cmd/compile/internal/amd64: simplify code generation for signed division

The same switch statement handles code generation for signed division of
words, double words and quad words. Rather than using multiple switch
statements to select the appropriate instructions, determine all of the
correctly sized operands up front, then use them as needed.

Updates #59089

Change-Id: I2b7567c8e0ecb9904c37607332538c95b0521dca
Reviewed-on: https://go-review.googlesource.com/c/go/+/482657
Run-TryBot: Joel Sing <joel@sing.id.au>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/compile/internal/amd64/ssa.go