-
Notifications
You must be signed in to change notification settings - Fork 830
better handling of float ops in wasm2asm #1427
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
Conversation
|
These changes don't require updates in the existing wasm2asm tests? |
We weren't handling them before, but it wasn't obvious. Make the (non-) handling of them explicit in the code. We'll add handlers for them shortly.
min, max, and copysign will require more sophisticated handling.
It was previously grouped with the i32 ops.
e9983bc to
12bd93d
Compare
Good point, added tests for translating everything (no assertions yet, though). The asm.js looks a little funny (multiple returns, for instance), but that can be handled in a followup. |
|
|
||
| } | ||
|
|
||
| function $$1($$0, $$1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw, it would be nice to have wasm2asm emit proper function names (same name as in the wasm)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For ease of debugging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think it would help debugging and also reading the testcases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should only do it with -g or something like that?
|
Looks good, thanks! |
Running
wasm2asmon files intest/revealed some errors in handling float operations. This pull request is a first attempt at handling them. More complex operations, like conversion, reinterpretation, and copysign, are left for later.