build: mov deduction for booleans (#341)

Updates #336
This commit is contained in:
Michael McLoughlin
2022-11-26 19:30:55 -08:00
committed by GitHub
parent ef60a33bf0
commit 127528d117
7 changed files with 280 additions and 146 deletions

View File

@@ -0,0 +1,16 @@
package issue336
import "testing"
//go:generate go run asm.go -out issue336.s -stubs stub.go
func TestNot(t *testing.T) {
nots := []func(bool) bool{Not8, Not16, Not32, Not64}
for _, not := range nots {
for _, x := range []bool{true, false} {
if not(x) != !x {
t.Fail()
}
}
}
}