• Michael Munday's avatar
    cmd/compile: fix uint64 to float casts on ppc64 · 1f4f2d0d
    Michael Munday authored
    Adds the FCFIDU instruction and uses it instead of the FCFID
    instruction for unsigned integer to float casts. This change means
    that unsigned integers do not have to be cast to signed integers
    before being cast to a floating point value. Therefore it is no
    longer necessary to insert instructions to detect and fix
    values that overflow int64.
    
    The previous code generating the uint64 to int64 cast handled
    overflow by truncating the uint64 value. This truncation can
    change the result of the rounding performed by the integer to
    float cast.
    
    The FCFIDU instruction was added in Power ISA 2.06B.
    
    Fixes #15539.
    
    Change-Id: Ia37a9631293eff91032d4cd9a9bec759d2142437
    Reviewed-on: https://go-review.googlesource.com/22772Reviewed-by: 's avatarDavid Chase <drchase@google.com>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    1f4f2d0d
Name
Last commit
Last update
..
addr2line Loading commit data...
api Loading commit data...
asm Loading commit data...
cgo Loading commit data...
compile Loading commit data...
cover Loading commit data...
dist Loading commit data...
doc Loading commit data...
fix Loading commit data...
go Loading commit data...
gofmt Loading commit data...
internal Loading commit data...
link Loading commit data...
nm Loading commit data...
objdump Loading commit data...
pack Loading commit data...
pprof Loading commit data...
trace Loading commit data...
vet Loading commit data...
yacc Loading commit data...