• Keith Randall's avatar
    cmd/compile: intrinsics for math/bits.TrailingZerosX · d5dc4905
    Keith Randall authored
    Implement math/bits.TrailingZerosX using intrinsics.
    
    Generally reorganize the intrinsic spec a bit.
    The instrinsics data structure is now built at init time.
    This will make doing the other functions in math/bits easier.
    
    Update sys.CtzX to return int instead of uint{64,32} so it
    matches math/bits.TrailingZerosX.
    
    Improve the intrinsics a bit for amd64.  We don't need the CMOV
    for <64 bit versions.
    
    Update #18616
    
    Change-Id: Ic1c5339c943f961d830ae56f12674d7b29d4ff39
    Reviewed-on: https://go-review.googlesource.com/38155
    Run-TryBot: Keith Randall <khr@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
    d5dc4905
malloc.go 30.8 KB