]> Cypherpunks repositories - gostls13.git/commitdiff
test/codegen: tighten the TrailingZeros64 test on 386
authorJoel Sing <joel@sing.id.au>
Wed, 26 Feb 2025 10:03:15 +0000 (21:03 +1100)
committerGopher Robot <gobot@golang.org>
Fri, 14 Mar 2025 22:04:38 +0000 (15:04 -0700)
Make the TrailingZeros64 code generation check more specific for 386.
Just checking for BSFL will match both the generic 64 bit decomposition
and the custom 386 lowering.

Change-Id: I62076f1889af0ef1f29704cba01ab419cae0c6e3
Reviewed-on: https://go-review.googlesource.com/c/go/+/656996
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
test/codegen/mathbits.go

index 78556c636f85963f95f9be91a7bce3384e7d6427..1cee39283d73a1a12d7e82c96bcbcef99538700a 100644 (file)
@@ -372,7 +372,7 @@ func TrailingZeros(n uint) int {
 func TrailingZeros64(n uint64) int {
        // amd64/v1,amd64/v2:"BSFQ","MOVL\t\\$64","CMOVQEQ"
        // amd64/v3:"TZCNTQ"
-       // 386:"BSFL"
+       // 386:"BSFL","JNE"
        // arm64:"RBIT","CLZ"
        // loong64:"CTZV"
        // s390x:"FLOGR"