Skip to content

test/ken/convert.go fails for sparc64 SSA backend #31

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

Closed
binarycrusader opened this issue Jul 19, 2017 · 2 comments
Closed

test/ken/convert.go fails for sparc64 SSA backend #31

binarycrusader opened this issue Jul 19, 2017 · 2 comments

Comments

@binarycrusader
Copy link
Collaborator

# go run run.go -- ken/convert.go
incorrect output
78 +1.000000e+001 +5.500000e+000 8 9
139 +1.750000e+002 +1.740000e+002 2 8
148 +1.750000e+002 +1.740000e+002 3 8
157 +1.750000e+002 +1.740000e+002 4 8
166 +1.750000e+002 +1.740000e+002 5 8
175 +1.750000e+002 +1.740000e+002 6 8
184 +1.750000e+002 +1.740000e+002 7 8
193 +1.750000e+002 +1.740000e+002 8 8
194 +1.750000e+002 +9.500000e+001 8 9
195 +1.750000e+002 +1.740000e+002 8 10
202 +1.750000e+002 +1.740000e+002 9 8
211 +1.750000e+002 +1.740000e+002 10 8
217 +4.125900e+004 +4.125800e+004 4 8
224 +4.125900e+004 +4.125800e+004 5 8
231 +4.125900e+004 +4.125800e+004 6 8
238 +4.125900e+004 +4.125800e+004 7 8
245 +4.125900e+004 +4.125800e+004 8 8
246 +4.125900e+004 +2.267700e+004 8 9
247 +4.125900e+004 +4.125800e+004 8 10
252 +4.125900e+004 +4.125800e+004 9 8
259 +4.125900e+004 +4.125800e+004 10 8
275 +3.758096e+009 +2.013266e+009 8 9
287 +1.671736e+019 +1.729382e+018 8 8
288 +1.671736e+019 +9.367487e+017 8 9
289 +1.671736e+019 +1.729382e+018 8 10
290 +1.671736e+019 +9.223372e+018 9 8
293 +1.671736e+019 +1.729382e+018 10 8

FAIL    ken/convert.go  0.496s
@binarycrusader binarycrusader changed the title test/convert.go fails for sparc64 SSA backend test/ken/convert.go fails for sparc64 SSA backend Jul 21, 2017
@4ad
Copy link
Owner

4ad commented Aug 7, 2017

Interesting.

@binarycrusader
Copy link
Collaborator Author

FSTOX needs the same aglorithm applied as FDTOX (use native conversion if value less than 2^63; otherwise subtract 2^63, convert, and add back).

FXTOS/FXTOD were not handling the unsigned case correctly, not only did they need to copy the input value to a temporary register for adjustments, but they also had the 2^63 comparison reversed.

FXTOS was wrongly using AFMULD (instead of AFMULS) to double the value after conversion for the unsigned > 2^63 case.

test/ken/convert.go now passes; as of this moment, all tests in test that can be cross-compiled and executed work just as well as they did with the old compiler backend. There's only one known failure at the moment, as described in #33.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants