New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/compile: ppc64x rounding large uint64 to float64 cast incorrectly #15539
Comments
CL https://golang.org/cl/22772 mentions this issue. |
I suspect the fix doesn't support ppc970, reopen the issue.
|
It probably doesn't since as far as I can tell I don't really like the idea of keeping the code the way it is on big endian machines. If a big endian builder is added it won't pass the tests. |
Based on Lynn and Russ' comments in golang-dev and in the CL I'm going to close this issue again for now. |
CL https://golang.org/cl/24191 mentions this issue. |
Use the same technique as mips64 for these casts (CL 22835). We could use the FCFIDU instruction for ppc64le however it seems better to keep it the same as ppc64 for now. Updates #15539, updates #16004. Change-Id: I550680e485327568bf3238c4615a6cc8de6438d7 Reviewed-on: https://go-review.googlesource.com/24191 Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Michael Munday <munday@ca.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Seen in TestFP/TestFp on the builder: https://build.golang.org/log/d9a463f06b55a67d70805a7bcb1cd18eed65d3ec
uint64
tofloat64
casts should round to nearest with ties to even. However on ppc64 largeuint64
values are shifted right by 1 so that they can be reinterpreted asint64
values (so that they can be fed into thefcfid
instruction). Unfortunately this truncates the original value, possibly (as in this test I think) resulting in a tie where there was none before.Can ppc64 use the
fcfidu
instruction instead?The text was updated successfully, but these errors were encountered: