• 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
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...